From c3b8d914352c67ec1731b37a3d12fe8a08f540a0 Mon Sep 17 00:00:00 2001 From: axiomlogicnexus Date: Thu, 18 Jun 2026 07:01:24 +0000 Subject: [PATCH] Land Phase 6C higher-dimensional interactive scene surfaces --- ...rainingHigherDimensionalRuntimeLibrary.cpp | 377 +++++++++++++++++- .../HyperTwistTrainingPanelWidget.cpp | 18 + .../HyperTwistTrainingRuntimeLibrary.cpp | 83 ++++ .../HyperTwistTrainingSessionActor.cpp | 18 + ...tTrainingHigherDimensionalRuntimeLibrary.h | 188 +++++++++ .../HyperTwistTrainingPanelWidget.h | 10 + .../HyperTwistTrainingRuntimeLibrary.h | 28 ++ .../HyperTwistTrainingSessionActor.h | 10 + ...mensionalPhase6CActivationContractTest.cpp | 151 +++++++ ...NSIVE_RECONSTRUCTION_ROADMAP_2026-06-10.md | 13 +- .../HyperTwist/FEATURE_REGISTRY.md | 1 + .../HyperTwist/ROADMAP.md | 18 +- 12 files changed, 909 insertions(+), 6 deletions(-) diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingHigherDimensionalRuntimeLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingHigherDimensionalRuntimeLibrary.cpp index aa330df..24c5bb8 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingHigherDimensionalRuntimeLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingHigherDimensionalRuntimeLibrary.cpp @@ -86,6 +86,19 @@ namespace HyperTwistTrainingHigherDimensionalRuntimeLibraryInternal return Attribution; } + FHyperTwistTrainingSourceAttribution MakeInteractiveSceneAttribution( + const FString& SceneSurfaceId, + const FString& Notes + ) + { + FHyperTwistTrainingSourceAttribution Attribution; + Attribution.SourceMode = EHyperTwistTrainingSourceMode::FirstParty; + Attribution.SourceTrackId = TEXT("phase6c/higher-dimensional-interactive-scene"); + Attribution.SourceCaseId = SceneSurfaceId; + Attribution.SourceNotes = Notes; + return Attribution; + } + FHyperTwistTrainingImportedRuntimeSelector MakeSelector( const FString& SelectorId, const FString& Label, @@ -114,6 +127,82 @@ namespace HyperTwistTrainingHigherDimensionalRuntimeLibraryInternal return Choice; } + FString BuildPlaceholderSceneStatePayloadJson( + const FString& EnvelopeId, + const FString& SessionSurfaceId, + const FString& ActivationProfileId, + const FString& PuzzleId, + const FString& StateSemanticsId, + const FString& ProjectionProfile, + const FString& ContextPresetId, + const FString& VisibilityPresetId, + const FString& FocusPresetId + ) + { + return FString::Printf( + TEXT("{\"EnvelopeId\":\"%s\",\"SessionSurfaceId\":\"%s\",\"ActivationProfileId\":\"%s\",\"PuzzleId\":\"%s\",\"StateSemanticsId\":\"%s\",\"ProjectionProfile\":\"%s\",\"ContextPresetId\":\"%s\",\"VisibilityPresetId\":\"%s\",\"FocusPresetId\":\"%s\",\"bSolved\":true}"), + *EnvelopeId, + *SessionSurfaceId, + *ActivationProfileId, + *PuzzleId, + *StateSemanticsId, + *ProjectionProfile, + *ContextPresetId, + *VisibilityPresetId, + *FocusPresetId + ); + } + + FHyperTwistSimulationSceneContext BuildPlaceholderInteractiveSceneContext( + const FHyperTwistTrainingHigherDimensionalRuntimeActivationProfile& Profile, + const FString& SessionSurfaceId, + const FString& SceneContextId, + const FString& EncodingProfile, + const FString& ProjectionProfile, + const float ProjectionDepth, + const FString& RenderStateProfile, + const FString& StateSemanticsId, + const FString& ContextPresetId, + const FString& VisibilityPresetId, + const FString& FocusPresetId + ) + { + FHyperTwistSimulationSceneContext SceneContext; + if (!Profile.IsStructurallyValid()) + { + return SceneContext; + } + + SceneContext.SceneContextId = SceneContextId; + SceneContext.PuzzleState.Definition = Profile.ToDefinitionRef(); + SceneContext.PuzzleState.StateEncodingKind = EHyperTwistStateEncodingKind::CellComplex; + SceneContext.PuzzleState.StateEncoding.EncodingProfile = EncodingProfile; + SceneContext.PuzzleState.StateEncoding.PayloadJson = BuildPlaceholderSceneStatePayloadJson( + FString::Printf(TEXT("%s/envelope"), *SceneContextId), + SessionSurfaceId, + Profile.ActivationProfileId, + Profile.PuzzleId, + StateSemanticsId, + ProjectionProfile, + ContextPresetId, + VisibilityPresetId, + FocusPresetId + ); + SceneContext.PuzzleState.OrientationFrame.Reference = + TEXT("phase6c/higher-dimensional-interactive-scene"); + SceneContext.PuzzleState.bIsSolved = true; + SceneContext.PuzzleState.Source = EHyperTwistStateSource::Runtime; + SceneContext.PuzzleState.CapturedAtUtc = TEXT("2026-06-18T00:00:00Z"); + SceneContext.PuzzleState.SourceSessionId = SessionSurfaceId; + SceneContext.PuzzleState.Notes = + TEXT("Placeholder higher-dimensional interactive scene envelope until dedicated family runtime-state ownership replaces the shared-map bridge."); + SceneContext.ProjectionSettings.ProjectionKind = EHyperTwistProjectionKind::HyperProjection; + SceneContext.ProjectionSettings.ProjectionProfile = ProjectionProfile; + SceneContext.ProjectionSettings.ProjectionDepth = ProjectionDepth; + SceneContext.RenderStateProfile = RenderStateProfile; + return SceneContext; + } + bool ContainsSelectorId( const TArray& Selectors, const FString& SelectorId @@ -1103,6 +1192,183 @@ namespace HyperTwistTrainingHigherDimensionalRuntimeLibraryInternal ); return SessionSurface; } + + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface + BuildMagic120CellInteractiveSceneSurface() + { + const FHyperTwistTrainingHigherDimensionalRuntimeActivationCatalog ActivationCatalog = + UHyperTwistTrainingHigherDimensionalRuntimeLibrary::BuildBundledHigherDimensionalRuntimeActivationCatalog(); + FHyperTwistTrainingHigherDimensionalRuntimeActivationProfile Profile; + if (!UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetRuntimeActivationProfileById( + ActivationCatalog, + TEXT("magic120cell-cleanroom-runtime-activation"), + Profile)) + { + return FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + } + + FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface SessionSurface; + if (!UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetRuntimeSessionSurfaceByActivationProfileId( + UHyperTwistTrainingHigherDimensionalRuntimeLibrary::BuildBundledHigherDimensionalRuntimeSessionCatalog(), + Profile.ActivationProfileId, + SessionSurface)) + { + return FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + } + + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface SceneSurface; + SceneSurface.SceneSurfaceId = TEXT("phase6c/magic120cell/interactive-scene-surface"); + SceneSurface.SessionSurfaceId = SessionSurface.SessionSurfaceId; + SceneSurface.ActivationProfileId = SessionSurface.ActivationProfileId; + SceneSurface.HostSurfaceId = SessionSurface.HostSurfaceId; + SceneSurface.LaunchSurfaceId = SessionSurface.LaunchSurfaceId; + SceneSurface.ViewContextSurfaceId = SessionSurface.ViewContextSurfaceId; + SceneSurface.Title = TEXT("Magic120Cell interactive scene surface"); + SceneSurface.Summary = + TEXT("Dedicated-family interactive scene surface that promotes the Magic120Cell runtime session into an explicit simulation scene-context contract while dedicated maps and family-owned runtime state are still being authored."); + SceneSurface.HostMapPath = SessionSurface.HostMapPath; + SceneSurface.HostMapRouteId = SessionSurface.HostMapRouteId; + SceneSurface.HostMapLabel = SessionSurface.HostMapLabel; + SceneSurface.bUsesSharedTrainingMapFallback = + SessionSurface.bUsesSharedTrainingMapFallback; + SceneSurface.RuntimeModeId = SessionSurface.RuntimeModeId; + SceneSurface.PrimaryPersistenceBoundaryId = + SessionSurface.PrimaryPersistenceBoundaryId; + SceneSurface.PrimaryViewProfileContractId = + SessionSurface.PrimaryViewProfileContractId; + SceneSurface.StateSemanticsId = + TEXT("phase6c/higher-dimensional-placeholder-solved-envelope"); + SceneSurface.bUsesPlaceholderStateEnvelope = true; + SceneSurface.SceneContext = BuildPlaceholderInteractiveSceneContext( + Profile, + SessionSurface.SessionSurfaceId, + TEXT("phase6c/magic120cell/interactive-scene-context"), + TEXT("phase6c/magic120cell-interactive-scene-envelope-v1"), + TEXT("magic120cell-4d-projection-distance-v1"), + 4.0f, + TEXT("magic120cell-center-cell-focus-scene-runtime-v1"), + SceneSurface.StateSemanticsId, + TEXT("full-puzzle-default-mode"), + TEXT("logical-visibility-depth-ladder"), + TEXT("center-cell-recentering") + ); + AppendUniqueStrings( + SceneSurface.InteractionSurfaceTags, + SessionSurface.InteractionSurfaceTags); + AppendUniqueStrings(SceneSurface.ViewSurfaceTags, SessionSurface.ViewSurfaceTags); + SceneSurface.SceneTags = + { + TEXT("phase6c"), + TEXT("higher-dimensional"), + TEXT("interactive-scene"), + TEXT("family:magic120cell"), + TEXT("scene-state:placeholder-envelope"), + TEXT("projection:magic120cell-4d-projection-distance-v1"), + TEXT("focus:center-cell-recentering"), + TEXT("visibility:logical-visibility-depth-ladder"), + FString::Printf(TEXT("activation-profile:%s"), + *SceneSurface.ActivationProfileId.ToLower()), + FString::Printf(TEXT("session-surface:%s"), + *SceneSurface.SessionSurfaceId.ToLower()) + }; + AppendUniqueStrings(SceneSurface.SceneTags, SessionSurface.SessionTags); + AppendUniqueStrings(SceneSurface.SceneTags, SceneSurface.InteractionSurfaceTags); + AppendUniqueStrings(SceneSurface.SceneTags, SceneSurface.ViewSurfaceTags); + SceneSurface.SourceAttribution = MakeInteractiveSceneAttribution( + SceneSurface.SceneSurfaceId, + TEXT("Phase 6C dedicated-family interactive scene surface for Magic120Cell that keeps the simulation-side scene contract explicit and intentionally placeholder-backed while the shared training-map host remains authoritative.") + ); + return SceneSurface; + } + + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface + BuildMagicCube5DInteractiveSceneSurface() + { + const FHyperTwistTrainingHigherDimensionalRuntimeActivationCatalog ActivationCatalog = + UHyperTwistTrainingHigherDimensionalRuntimeLibrary::BuildBundledHigherDimensionalRuntimeActivationCatalog(); + FHyperTwistTrainingHigherDimensionalRuntimeActivationProfile Profile; + if (!UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetRuntimeActivationProfileById( + ActivationCatalog, + TEXT("magiccube5d-cleanroom-runtime-activation"), + Profile)) + { + return FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + } + + FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface SessionSurface; + if (!UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetRuntimeSessionSurfaceByActivationProfileId( + UHyperTwistTrainingHigherDimensionalRuntimeLibrary::BuildBundledHigherDimensionalRuntimeSessionCatalog(), + Profile.ActivationProfileId, + SessionSurface)) + { + return FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + } + + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface SceneSurface; + SceneSurface.SceneSurfaceId = TEXT("phase6c/magiccube5d/interactive-scene-surface"); + SceneSurface.SessionSurfaceId = SessionSurface.SessionSurfaceId; + SceneSurface.ActivationProfileId = SessionSurface.ActivationProfileId; + SceneSurface.HostSurfaceId = SessionSurface.HostSurfaceId; + SceneSurface.LaunchSurfaceId = SessionSurface.LaunchSurfaceId; + SceneSurface.ViewContextSurfaceId = SessionSurface.ViewContextSurfaceId; + SceneSurface.Title = TEXT("MagicCube5D interactive scene surface"); + SceneSurface.Summary = + TEXT("Dedicated-family interactive scene surface that promotes the MagicCube5D runtime session into an explicit simulation scene-context contract while dedicated maps and family-owned runtime state are still being authored."); + SceneSurface.HostMapPath = SessionSurface.HostMapPath; + SceneSurface.HostMapRouteId = SessionSurface.HostMapRouteId; + SceneSurface.HostMapLabel = SessionSurface.HostMapLabel; + SceneSurface.bUsesSharedTrainingMapFallback = + SessionSurface.bUsesSharedTrainingMapFallback; + SceneSurface.RuntimeModeId = SessionSurface.RuntimeModeId; + SceneSurface.PrimaryPersistenceBoundaryId = + SessionSurface.PrimaryPersistenceBoundaryId; + SceneSurface.PrimaryViewProfileContractId = + SessionSurface.PrimaryViewProfileContractId; + SceneSurface.StateSemanticsId = + TEXT("phase6c/higher-dimensional-placeholder-solved-envelope"); + SceneSurface.bUsesPlaceholderStateEnvelope = true; + SceneSurface.SceneContext = BuildPlaceholderInteractiveSceneContext( + Profile, + SessionSurface.SessionSurfaceId, + TEXT("phase6c/magiccube5d/interactive-scene-context"), + TEXT("phase6c/magiccube5d-interactive-scene-envelope-v1"), + TEXT("magiccube5d-5d-projection-distance-v1"), + 5.0f, + TEXT("magiccube5d-order3-scene-runtime-v1"), + SceneSurface.StateSemanticsId, + TEXT("stereo-disabled-default"), + TEXT("all-faces-visible-default"), + TEXT("view-centered-solved-progress") + ); + AppendUniqueStrings( + SceneSurface.InteractionSurfaceTags, + SessionSurface.InteractionSurfaceTags); + AppendUniqueStrings(SceneSurface.ViewSurfaceTags, SessionSurface.ViewSurfaceTags); + SceneSurface.SceneTags = + { + TEXT("phase6c"), + TEXT("higher-dimensional"), + TEXT("interactive-scene"), + TEXT("family:magiccube5d"), + TEXT("scene-state:placeholder-envelope"), + TEXT("projection:magiccube5d-5d-projection-distance-v1"), + TEXT("context:stereo-disabled-default"), + TEXT("visibility:all-faces-visible-default"), + TEXT("focus:view-centered-solved-progress"), + FString::Printf(TEXT("activation-profile:%s"), + *SceneSurface.ActivationProfileId.ToLower()), + FString::Printf(TEXT("session-surface:%s"), + *SceneSurface.SessionSurfaceId.ToLower()) + }; + AppendUniqueStrings(SceneSurface.SceneTags, SessionSurface.SessionTags); + AppendUniqueStrings(SceneSurface.SceneTags, SceneSurface.InteractionSurfaceTags); + AppendUniqueStrings(SceneSurface.SceneTags, SceneSurface.ViewSurfaceTags); + SceneSurface.SourceAttribution = MakeInteractiveSceneAttribution( + SceneSurface.SceneSurfaceId, + TEXT("Phase 6C dedicated-family interactive scene surface for MagicCube5D that keeps the simulation-side scene contract explicit and intentionally placeholder-backed while the shared training-map host remains authoritative.") + ); + return SceneSurface; + } } FHyperTwistTrainingHigherDimensionalRuntimeActivationCatalog @@ -1372,6 +1638,15 @@ bool UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryBuildTrainingDeckFro return false; } + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface InteractiveSceneSurface; + if (!TryGetInteractiveSceneSurfaceByActivationProfileId( + BuildBundledHigherDimensionalInteractiveSceneCatalog(), + LaunchSurface.ActivationProfileId, + InteractiveSceneSurface)) + { + return false; + } + FHyperTwistTrainingImportedRuntimeSurface RuntimeSurface; RuntimeSurface.SurfaceKind = LaunchSurface.SurfaceKind; RuntimeSurface.SurfaceId = LaunchSurface.SurfaceId; @@ -1381,6 +1656,8 @@ bool UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryBuildTrainingDeckFro RuntimeSurface.Selectors = SessionSurface.Selectors; RuntimeSurface.OriginPaths = { + InteractiveSceneSurface.SceneSurfaceId, + InteractiveSceneSurface.SceneContext.SceneContextId, SessionSurface.SessionSurfaceId, SessionSurface.ViewContextSurfaceId, LaunchSurface.LaunchSurfaceId, @@ -1414,8 +1691,12 @@ bool UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryBuildTrainingDeckFro SeedCase.Tags, SessionSurface.SessionTags ); + HyperTwistTrainingHigherDimensionalRuntimeLibraryInternal::AppendUniqueStrings( + SeedCase.Tags, + InteractiveSceneSurface.SceneTags + ); SeedCase.AllowedDeliveryModes = {EHyperTwistTrainingDeliveryMode::VirtualCube}; - SeedCase.SourceAttribution = SessionSurface.SourceAttribution; + SeedCase.SourceAttribution = InteractiveSceneSurface.SourceAttribution; SeedCase.SourceAttribution.SourceDeckId = LaunchSurface.DeckId; SeedCase.SourceAttribution.SourceCaseId = SeedCase.CaseId; @@ -1445,7 +1726,11 @@ bool UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryBuildTrainingDeckFro OutDeck.Tags, SessionSurface.SessionTags ); - OutDeck.SourceAttribution = SessionSurface.SourceAttribution; + HyperTwistTrainingHigherDimensionalRuntimeLibraryInternal::AppendUniqueStrings( + OutDeck.Tags, + InteractiveSceneSurface.SceneTags + ); + OutDeck.SourceAttribution = InteractiveSceneSurface.SourceAttribution; OutDeck.SourceAttribution.SourceDeckId = LaunchSurface.DeckId; OutDeck.ImportedRuntimeSurface = RuntimeSurface; return OutDeck.IsStructurallyValid() @@ -1578,3 +1863,91 @@ bool UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetRuntimeSessionSur OutSessionSurface ); } + +FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog +UHyperTwistTrainingHigherDimensionalRuntimeLibrary::BuildBundledHigherDimensionalInteractiveSceneCatalog() +{ + FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog Catalog; + Catalog.SceneSurfaces = + { + HyperTwistTrainingHigherDimensionalRuntimeLibraryInternal::BuildMagic120CellInteractiveSceneSurface(), + HyperTwistTrainingHigherDimensionalRuntimeLibraryInternal::BuildMagicCube5DInteractiveSceneSurface() + }; + return Catalog; +} + +bool UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetInteractiveSceneSurfaceBySessionSurfaceId( + const FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog& Catalog, + const FString& SessionSurfaceId, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface +) +{ + if (SessionSurfaceId.IsEmpty()) + { + OutSceneSurface = FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + return false; + } + + for (const FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& SceneSurface : + Catalog.SceneSurfaces) + { + if (SceneSurface.SessionSurfaceId.Equals(SessionSurfaceId, ESearchCase::IgnoreCase)) + { + OutSceneSurface = SceneSurface; + return true; + } + } + + OutSceneSurface = FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + return false; +} + +bool UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetInteractiveSceneSurfaceByActivationProfileId( + const FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog& Catalog, + const FString& ActivationProfileId, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface +) +{ + if (ActivationProfileId.IsEmpty()) + { + OutSceneSurface = FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + return false; + } + + for (const FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& SceneSurface : + Catalog.SceneSurfaces) + { + if (SceneSurface.ActivationProfileId.Equals(ActivationProfileId, ESearchCase::IgnoreCase)) + { + OutSceneSurface = SceneSurface; + return true; + } + } + + OutSceneSurface = FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + return false; +} + +bool UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetInteractiveSceneSurfaceByPuzzleId( + const FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog& Catalog, + const FString& PuzzleId, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface +) +{ + FHyperTwistTrainingHigherDimensionalRuntimeActivationProfile Profile; + if (PuzzleId.IsEmpty() + || !TryGetRuntimeActivationProfileByPuzzleId( + BuildBundledHigherDimensionalRuntimeActivationCatalog(), + PuzzleId, + Profile)) + { + OutSceneSurface = FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + return false; + } + + return TryGetInteractiveSceneSurfaceByActivationProfileId( + Catalog, + Profile.ActivationProfileId, + OutSceneSurface + ); +} diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingPanelWidget.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingPanelWidget.cpp index 571bbfe..40baa2d 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingPanelWidget.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingPanelWidget.cpp @@ -163,6 +163,13 @@ void UHyperTwistTrainingPanelWidget::RefreshTrainingState() CachedHigherDimensionalRuntimeSessionSurface = FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface(); } + if (!UHyperTwistTrainingRuntimeLibrary::TryGetActiveHigherDimensionalInteractiveSceneSurface( + this, + CachedHigherDimensionalInteractiveSceneSurface)) + { + CachedHigherDimensionalInteractiveSceneSurface = + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + } CachedMethodDrillRunState = UHyperTwistTrainingRuntimeLibrary::GetActiveMethodDrillRunState(this); CachedMethodDrillSummary = UHyperTwistTrainingRuntimeLibrary::GetActiveMethodDrillSummary(this); CachedMethodDrillDiagnosticPacket = @@ -489,6 +496,17 @@ UHyperTwistTrainingPanelWidget::GetDisplayedHigherDimensionalRuntimeSessionSurfa return CachedHigherDimensionalRuntimeSessionSurface; } +bool UHyperTwistTrainingPanelWidget::HasDisplayedHigherDimensionalInteractiveSceneSurface() const +{ + return CachedHigherDimensionalInteractiveSceneSurface.IsStructurallyValid(); +} + +FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface +UHyperTwistTrainingPanelWidget::GetDisplayedHigherDimensionalInteractiveSceneSurface() const +{ + return CachedHigherDimensionalInteractiveSceneSurface; +} + FHyperTwistTrainingDeck UHyperTwistTrainingPanelWidget::BuildActiveCoachRecommendedDeck(const int32 MaxCases) { CachedCoachRecommendedDeck = UHyperTwistTrainingRuntimeLibrary::BuildActiveCoachRecommendedDeck( diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRuntimeLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRuntimeLibrary.cpp index bf1be37..5fff397 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRuntimeLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRuntimeLibrary.cpp @@ -295,6 +295,37 @@ namespace HyperTwistTrainingRuntimeLibraryInternal OutSessionSurface ); } + + bool TryResolveHigherDimensionalInteractiveSceneSurface( + const FHyperTwistTrainingRunState& RunState, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface + ) + { + FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface SessionSurface; + if (TryResolveHigherDimensionalRuntimeSessionSurface(RunState, SessionSurface)) + { + if (UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetInteractiveSceneSurfaceBySessionSurfaceId( + UHyperTwistTrainingHigherDimensionalRuntimeLibrary::BuildBundledHigherDimensionalInteractiveSceneCatalog(), + SessionSurface.SessionSurfaceId, + OutSceneSurface)) + { + return true; + } + } + + FHyperTwistTrainingHigherDimensionalRuntimeActivationProfile ActivationProfile; + if (!TryResolveHigherDimensionalRuntimeActivationProfile(RunState, ActivationProfile)) + { + OutSceneSurface = FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + return false; + } + + return UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetInteractiveSceneSurfaceByActivationProfileId( + UHyperTwistTrainingHigherDimensionalRuntimeLibrary::BuildBundledHigherDimensionalInteractiveSceneCatalog(), + ActivationProfile.ActivationProfileId, + OutSceneSurface + ); + } } UHyperTwistTrainingSubsystem* UHyperTwistTrainingRuntimeLibrary::GetTrainingSubsystem(UObject* WorldContextObject) @@ -728,6 +759,12 @@ UHyperTwistTrainingRuntimeLibrary::GetBundledHigherDimensionalRuntimeSessionCata return UHyperTwistTrainingHigherDimensionalRuntimeLibrary::BuildBundledHigherDimensionalRuntimeSessionCatalog(); } +FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog +UHyperTwistTrainingRuntimeLibrary::GetBundledHigherDimensionalInteractiveSceneCatalog() +{ + return UHyperTwistTrainingHigherDimensionalRuntimeLibrary::BuildBundledHigherDimensionalInteractiveSceneCatalog(); +} + FHyperTwistTrainingLearnedSearchReferenceBundle UHyperTwistTrainingRuntimeLibrary::GetBundledLearnedSearchReferenceBundle() { @@ -7407,6 +7444,41 @@ bool UHyperTwistTrainingRuntimeLibrary::TryGetHigherDimensionalRuntimeSessionSur ); } +bool UHyperTwistTrainingRuntimeLibrary::TryGetBundledHigherDimensionalInteractiveSceneSurfaceByActivationProfileId( + const FString& ActivationProfileId, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface +) +{ + return UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetInteractiveSceneSurfaceByActivationProfileId( + GetBundledHigherDimensionalInteractiveSceneCatalog(), + ActivationProfileId, + OutSceneSurface + ); +} + +bool UHyperTwistTrainingRuntimeLibrary::TryGetBundledHigherDimensionalInteractiveSceneSurfaceByPuzzleId( + const FString& PuzzleId, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface +) +{ + return UHyperTwistTrainingHigherDimensionalRuntimeLibrary::TryGetInteractiveSceneSurfaceByPuzzleId( + GetBundledHigherDimensionalInteractiveSceneCatalog(), + PuzzleId, + OutSceneSurface + ); +} + +bool UHyperTwistTrainingRuntimeLibrary::TryGetHigherDimensionalInteractiveSceneSurfaceForRunState( + const FHyperTwistTrainingRunState& RunState, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface +) +{ + return HyperTwistTrainingRuntimeLibraryInternal::TryResolveHigherDimensionalInteractiveSceneSurface( + RunState, + OutSceneSurface + ); +} + bool UHyperTwistTrainingRuntimeLibrary::TryGetActiveHigherDimensionalRuntimeHostSurface( UObject* WorldContextObject, FHyperTwistTrainingHigherDimensionalRuntimeHostSurface& OutHostSurface @@ -7451,6 +7523,17 @@ bool UHyperTwistTrainingRuntimeLibrary::TryGetActiveHigherDimensionalRuntimeSess ); } +bool UHyperTwistTrainingRuntimeLibrary::TryGetActiveHigherDimensionalInteractiveSceneSurface( + UObject* WorldContextObject, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface +) +{ + return TryGetHigherDimensionalInteractiveSceneSurfaceForRunState( + GetActiveTrainingRunState(WorldContextObject), + OutSceneSurface + ); +} + bool UHyperTwistTrainingRuntimeLibrary::TryStartHigherDimensionalLaunchSurface( UObject* WorldContextObject, const FString& ActivationProfileId, diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSessionActor.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSessionActor.cpp index bb0f672..e7218c8 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSessionActor.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingSessionActor.cpp @@ -263,6 +263,13 @@ void AHyperTwistTrainingSessionActor::RefreshCachedTrainingState() CachedHigherDimensionalRuntimeSessionSurface = FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface(); } + if (!UHyperTwistTrainingRuntimeLibrary::TryGetActiveHigherDimensionalInteractiveSceneSurface( + this, + CachedHigherDimensionalInteractiveSceneSurface)) + { + CachedHigherDimensionalInteractiveSceneSurface = + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface(); + } CachedActiveTrainingSessionTemplates = UHyperTwistTrainingRuntimeLibrary::GetActiveTrainingSessionTemplates(this); if (AutoStartUserId.IsEmpty()) @@ -462,6 +469,17 @@ AHyperTwistTrainingSessionActor::GetDisplayedHigherDimensionalRuntimeSessionSurf return CachedHigherDimensionalRuntimeSessionSurface; } +bool AHyperTwistTrainingSessionActor::HasDisplayedHigherDimensionalInteractiveSceneSurface() const +{ + return CachedHigherDimensionalInteractiveSceneSurface.IsStructurallyValid(); +} + +FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface +AHyperTwistTrainingSessionActor::GetDisplayedHigherDimensionalInteractiveSceneSurface() const +{ + return CachedHigherDimensionalInteractiveSceneSurface; +} + FHyperTwistTrainingDeck AHyperTwistTrainingSessionActor::BuildCoachRecommendedDeck(const int32 MaxCases) { CachedCoachRecommendedDeck = UHyperTwistTrainingRuntimeLibrary::BuildActiveCoachRecommendedDeck( diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingHigherDimensionalRuntimeLibrary.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingHigherDimensionalRuntimeLibrary.h index 3f26c01..b60c01e 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingHigherDimensionalRuntimeLibrary.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingHigherDimensionalRuntimeLibrary.h @@ -2,6 +2,7 @@ #include "CoreMinimal.h" #include "Kismet/BlueprintFunctionLibrary.h" +#include "HyperTwistSimulation/HyperTwistSimulationTypes.h" #include "HyperTwistTraining/HyperTwistTrainingMagic120CellLibrary.h" #include "HyperTwistTraining/HyperTwistTrainingMagicCube5DLibrary.h" #include "HyperTwistTrainingHigherDimensionalRuntimeLibrary.generated.h" @@ -883,6 +884,168 @@ struct FHyperTwistTrainingHigherDimensionalRuntimeSessionCatalog } }; +USTRUCT(BlueprintType) +struct FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString SceneSurfaceId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString SessionSurfaceId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString ActivationProfileId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString HostSurfaceId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString LaunchSurfaceId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString ViewContextSurfaceId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString Title; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString Summary; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString HostMapPath; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString HostMapRouteId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString HostMapLabel; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + bool bUsesSharedTrainingMapFallback = false; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString RuntimeModeId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString PrimaryPersistenceBoundaryId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString PrimaryViewProfileContractId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString StateSemanticsId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + bool bUsesPlaceholderStateEnvelope = false; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FHyperTwistSimulationSceneContext SceneContext; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + TArray InteractionSurfaceTags; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + TArray ViewSurfaceTags; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + TArray SceneTags; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FHyperTwistTrainingSourceAttribution SourceAttribution; + + bool IsStructurallyValid() const + { + return !SceneSurfaceId.IsEmpty() + && !SessionSurfaceId.IsEmpty() + && !ActivationProfileId.IsEmpty() + && !HostSurfaceId.IsEmpty() + && !LaunchSurfaceId.IsEmpty() + && !ViewContextSurfaceId.IsEmpty() + && !Title.IsEmpty() + && !Summary.IsEmpty() + && !HostMapPath.IsEmpty() + && !HostMapRouteId.IsEmpty() + && !HostMapLabel.IsEmpty() + && !RuntimeModeId.IsEmpty() + && !PrimaryPersistenceBoundaryId.IsEmpty() + && !PrimaryViewProfileContractId.IsEmpty() + && !StateSemanticsId.IsEmpty() + && SceneContext.IsStructurallyValid() + && SourceAttribution.IsStructurallyValid(); + } +}; + +USTRUCT(BlueprintType) +struct FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString CatalogId = TEXT("phase6c/higher-dimensional-interactive-scene"); + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + FString CatalogVersion = TEXT("2026.06.18"); + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HyperTwist") + TArray SceneSurfaces; + + bool IsStructurallyValid() const + { + if (CatalogId.IsEmpty() || CatalogVersion.IsEmpty() || SceneSurfaces.Num() == 0) + { + return false; + } + + TSet SeenSceneSurfaceIds; + TSet SeenSessionSurfaceIds; + TSet SeenActivationProfileIds; + TSet SeenSceneContextIds; + for (const FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& SceneSurface : + SceneSurfaces) + { + if (!SceneSurface.IsStructurallyValid()) + { + return false; + } + + const FString NormalizedSceneSurfaceId = SceneSurface.SceneSurfaceId.ToLower(); + if (SeenSceneSurfaceIds.Contains(NormalizedSceneSurfaceId)) + { + return false; + } + + const FString NormalizedSessionSurfaceId = SceneSurface.SessionSurfaceId.ToLower(); + if (SeenSessionSurfaceIds.Contains(NormalizedSessionSurfaceId)) + { + return false; + } + + const FString NormalizedActivationProfileId = + SceneSurface.ActivationProfileId.ToLower(); + if (SeenActivationProfileIds.Contains(NormalizedActivationProfileId)) + { + return false; + } + + const FString NormalizedSceneContextId = + SceneSurface.SceneContext.SceneContextId.ToLower(); + if (SeenSceneContextIds.Contains(NormalizedSceneContextId)) + { + return false; + } + + SeenSceneSurfaceIds.Add(NormalizedSceneSurfaceId); + SeenSessionSurfaceIds.Add(NormalizedSessionSurfaceId); + SeenActivationProfileIds.Add(NormalizedActivationProfileId); + SeenSceneContextIds.Add(NormalizedSceneContextId); + } + + return true; + } +}; + UCLASS() class UNREALHYPERTWIST_API UHyperTwistTrainingHigherDimensionalRuntimeLibrary : public UBlueprintFunctionLibrary { @@ -998,4 +1161,29 @@ public: const FString& PuzzleId, FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface& OutSessionSurface ); + + UFUNCTION(BlueprintPure, Category = "HyperTwist|Training|HigherDimensional") + static FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog + BuildBundledHigherDimensionalInteractiveSceneCatalog(); + + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|HigherDimensional") + static bool TryGetInteractiveSceneSurfaceBySessionSurfaceId( + const FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog& Catalog, + const FString& SessionSurfaceId, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface + ); + + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|HigherDimensional") + static bool TryGetInteractiveSceneSurfaceByActivationProfileId( + const FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog& Catalog, + const FString& ActivationProfileId, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface + ); + + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|HigherDimensional") + static bool TryGetInteractiveSceneSurfaceByPuzzleId( + const FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog& Catalog, + const FString& PuzzleId, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface + ); }; diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingPanelWidget.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingPanelWidget.h index 0e54953..2a9281e 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingPanelWidget.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingPanelWidget.h @@ -126,6 +126,9 @@ public: UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|HigherDimensional") FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface CachedHigherDimensionalRuntimeSessionSurface; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|HigherDimensional") + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface CachedHigherDimensionalInteractiveSceneSurface; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training") FHyperTwistTrainingRepositoryRoundTripVerification CachedRepositoryRoundTripVerification; @@ -266,6 +269,13 @@ public: FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface GetDisplayedHigherDimensionalRuntimeSessionSurface() const; + UFUNCTION(BlueprintPure, Category = "HyperTwist|Training|HigherDimensional") + bool HasDisplayedHigherDimensionalInteractiveSceneSurface() const; + + UFUNCTION(BlueprintPure, Category = "HyperTwist|Training|HigherDimensional") + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface + GetDisplayedHigherDimensionalInteractiveSceneSurface() const; + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach") FHyperTwistTrainingDeck BuildActiveCoachRecommendedDeck(int32 MaxCases); diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingRuntimeLibrary.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingRuntimeLibrary.h index 20415b5..ae2894d 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingRuntimeLibrary.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingRuntimeLibrary.h @@ -217,6 +217,10 @@ public: static FHyperTwistTrainingHigherDimensionalRuntimeSessionCatalog GetBundledHigherDimensionalRuntimeSessionCatalog(); + UFUNCTION(BlueprintPure, Category = "HyperTwist|Training|HigherDimensional") + static FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog + GetBundledHigherDimensionalInteractiveSceneCatalog(); + UFUNCTION(BlueprintPure, Category = "HyperTwist|Training|LearnedSearch") static FHyperTwistTrainingLearnedSearchReferenceBundle GetBundledLearnedSearchReferenceBundle(); @@ -3500,6 +3504,24 @@ public: FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface& OutSessionSurface ); + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|HigherDimensional") + static bool TryGetBundledHigherDimensionalInteractiveSceneSurfaceByActivationProfileId( + const FString& ActivationProfileId, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface + ); + + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|HigherDimensional") + static bool TryGetBundledHigherDimensionalInteractiveSceneSurfaceByPuzzleId( + const FString& PuzzleId, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface + ); + + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|HigherDimensional") + static bool TryGetHigherDimensionalInteractiveSceneSurfaceForRunState( + const FHyperTwistTrainingRunState& RunState, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface + ); + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|HigherDimensional", meta = (WorldContext = "WorldContextObject")) static bool TryGetActiveHigherDimensionalRuntimeHostSurface( UObject* WorldContextObject, @@ -3524,6 +3546,12 @@ public: FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface& OutSessionSurface ); + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|HigherDimensional", meta = (WorldContext = "WorldContextObject")) + static bool TryGetActiveHigherDimensionalInteractiveSceneSurface( + UObject* WorldContextObject, + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface& OutSceneSurface + ); + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|HigherDimensional", meta = (WorldContext = "WorldContextObject")) static bool TryStartHigherDimensionalLaunchSurface( UObject* WorldContextObject, diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingSessionActor.h b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingSessionActor.h index 7471ab9..3d2a33b 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingSessionActor.h +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Public/HyperTwistTraining/HyperTwistTrainingSessionActor.h @@ -113,6 +113,9 @@ public: UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|HigherDimensional") FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface CachedHigherDimensionalRuntimeSessionSurface; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training|HigherDimensional") + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface CachedHigherDimensionalInteractiveSceneSurface; + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "HyperTwist|Training") FHyperTwistTrainingRepositoryRoundTripVerification CachedRepositoryRoundTripVerification; @@ -243,6 +246,13 @@ public: FHyperTwistTrainingHigherDimensionalRuntimeSessionSurface GetDisplayedHigherDimensionalRuntimeSessionSurface() const; + UFUNCTION(BlueprintPure, Category = "HyperTwist|Training|HigherDimensional") + bool HasDisplayedHigherDimensionalInteractiveSceneSurface() const; + + UFUNCTION(BlueprintPure, Category = "HyperTwist|Training|HigherDimensional") + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface + GetDisplayedHigherDimensionalInteractiveSceneSurface() const; + UFUNCTION(BlueprintCallable, Category = "HyperTwist|Training|Coach") FHyperTwistTrainingDeck BuildCoachRecommendedDeck(int32 MaxCases); diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistHigherDimensionalPhase6CActivationContractTest.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistHigherDimensionalPhase6CActivationContractTest.cpp index df82f34..6b01a70 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistHigherDimensionalPhase6CActivationContractTest.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Tests/HyperTwistHigherDimensionalPhase6CActivationContractTest.cpp @@ -3,6 +3,7 @@ #include "Engine/GameInstance.h" #include "Misc/AutomationTest.h" +#include "HyperTwistSimulation/HyperTwistSimulationLibrary.h" #include "HyperTwistTraining/HyperTwistTrainingLibrary.h" #include "HyperTwistTraining/HyperTwistTrainingRuntimeLibrary.h" #include "HyperTwistTraining/HyperTwistTrainingSubsystem.h" @@ -429,6 +430,112 @@ bool FHyperTwistHigherDimensionalPhase6CSessionCatalogTest::RunTest(const FStrin return true; } +IMPLEMENT_SIMPLE_AUTOMATION_TEST( + FHyperTwistHigherDimensionalPhase6CInteractiveSceneCatalogTest, + "HyperTwist.FirstParty.HigherDimensional.Phase6C.InteractiveSceneCatalog", + EAutomationTestFlags::EditorContext | EAutomationTestFlags::EngineFilter +) + +bool FHyperTwistHigherDimensionalPhase6CInteractiveSceneCatalogTest::RunTest(const FString& Parameters) +{ + const FHyperTwistTrainingHigherDimensionalInteractiveSceneCatalog Catalog = + UHyperTwistTrainingRuntimeLibrary::GetBundledHigherDimensionalInteractiveSceneCatalog(); + + TestTrue( + TEXT("The Phase 6C higher-dimensional interactive-scene catalog must be structurally valid."), + Catalog.IsStructurallyValid() + ); + TestEqual( + TEXT("The Phase 6C higher-dimensional interactive-scene catalog must expose both retained family scene surfaces."), + Catalog.SceneSurfaces.Num(), + 2 + ); + + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface Magic120CellSceneSurface; + TestTrue( + TEXT("The Magic120Cell interactive scene surface must resolve from the bundled catalog."), + UHyperTwistTrainingRuntimeLibrary::TryGetBundledHigherDimensionalInteractiveSceneSurfaceByActivationProfileId( + TEXT("magic120cell-cleanroom-runtime-activation"), + Magic120CellSceneSurface + ) + ); + TestEqual( + TEXT("The Magic120Cell interactive scene surface must preserve the session-surface linkage."), + Magic120CellSceneSurface.SessionSurfaceId, + TEXT("phase6c/magic120cell/shared-training-session-surface") + ); + TestTrue( + TEXT("The Magic120Cell interactive scene surface must remain renderable."), + UHyperTwistSimulationLibrary::CanRenderSceneContext(Magic120CellSceneSurface.SceneContext) + ); + TestTrue( + TEXT("The Magic120Cell interactive scene surface must keep the placeholder-state posture explicit."), + Magic120CellSceneSurface.bUsesPlaceholderStateEnvelope + ); + TestEqual( + TEXT("The Magic120Cell interactive scene surface must preserve the canonical puzzle id."), + Magic120CellSceneSurface.SceneContext.PuzzleState.Definition.PuzzleId, + TEXT("polychoron/magic120cell") + ); + TestEqual( + TEXT("The Magic120Cell interactive scene surface must preserve the dedicated projection profile."), + Magic120CellSceneSurface.SceneContext.ProjectionSettings.ProjectionProfile, + TEXT("magic120cell-4d-projection-distance-v1") + ); + TestEqual( + TEXT("The Magic120Cell interactive scene surface must preserve the dedicated render state profile."), + Magic120CellSceneSurface.SceneContext.RenderStateProfile, + TEXT("magic120cell-center-cell-focus-scene-runtime-v1") + ); + + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface MagicCube5DSceneSurface; + TestTrue( + TEXT("The MagicCube5D interactive scene surface must resolve from the bundled catalog."), + UHyperTwistTrainingRuntimeLibrary::TryGetBundledHigherDimensionalInteractiveSceneSurfaceByPuzzleId( + TEXT("hypercube/magiccube5d/order3"), + MagicCube5DSceneSurface + ) + ); + TestEqual( + TEXT("The MagicCube5D interactive scene surface must preserve the session-surface linkage."), + MagicCube5DSceneSurface.SessionSurfaceId, + TEXT("phase6c/magiccube5d/shared-training-session-surface") + ); + TestTrue( + TEXT("The MagicCube5D interactive scene surface must remain renderable."), + UHyperTwistSimulationLibrary::CanRenderSceneContext(MagicCube5DSceneSurface.SceneContext) + ); + TestTrue( + TEXT("The MagicCube5D interactive scene surface must keep the placeholder-state posture explicit."), + MagicCube5DSceneSurface.bUsesPlaceholderStateEnvelope + ); + TestEqual( + TEXT("The MagicCube5D interactive scene surface must preserve the canonical puzzle id."), + MagicCube5DSceneSurface.SceneContext.PuzzleState.Definition.PuzzleId, + TEXT("hypercube/magiccube5d/order3") + ); + TestEqual( + TEXT("The MagicCube5D interactive scene surface must preserve the dedicated projection profile."), + MagicCube5DSceneSurface.SceneContext.ProjectionSettings.ProjectionProfile, + TEXT("magiccube5d-5d-projection-distance-v1") + ); + TestEqual( + TEXT("The MagicCube5D interactive scene surface must preserve the dedicated render state profile."), + MagicCube5DSceneSurface.SceneContext.RenderStateProfile, + TEXT("magiccube5d-order3-scene-runtime-v1") + ); + TestEqual( + TEXT("The MagicCube5D interactive scene surface must keep the family-specific placeholder encoding profile."), + MagicCube5DSceneSurface.SceneContext.PuzzleState.StateEncoding.EncodingProfile, + TEXT("phase6c/magiccube5d-interactive-scene-envelope-v1") + ); + TestTrue( + TEXT("The MagicCube5D interactive scene surface must carry the explicit placeholder-scene tag."), + MagicCube5DSceneSurface.SceneTags.Contains(TEXT("scene-state:placeholder-envelope")) + ); + return true; +} + IMPLEMENT_SIMPLE_AUTOMATION_TEST( FHyperTwistHigherDimensionalPhase6CMagic120CellActivationProfileTest, "HyperTwist.FirstParty.HigherDimensional.Phase6C.Magic120CellActivationProfile", @@ -814,6 +921,50 @@ bool FHyperTwistHigherDimensionalPhase6CLaunchExecutionTest::RunTest(const FStri TEXT("phase6c/magiccube5d/shared-training-session-surface") ) ); + + FHyperTwistTrainingHigherDimensionalInteractiveSceneSurface InteractiveSceneSurface; + TestTrue( + TEXT("The launch-execution proof must resolve the active higher-dimensional interactive scene surface."), + UHyperTwistTrainingRuntimeLibrary::TryGetHigherDimensionalInteractiveSceneSurfaceForRunState( + StartedRunState, + InteractiveSceneSurface + ) + ); + TestEqual( + TEXT("The launch-execution proof must preserve the resolved interactive scene surface id."), + InteractiveSceneSurface.SceneSurfaceId, + TEXT("phase6c/magiccube5d/interactive-scene-surface") + ); + TestTrue( + TEXT("The launch-execution proof must keep the interactive scene renderable."), + UHyperTwistSimulationLibrary::CanRenderSceneContext(InteractiveSceneSurface.SceneContext) + ); + TestEqual( + TEXT("The launch-execution proof must preserve the interactive-scene context id."), + InteractiveSceneSurface.SceneContext.SceneContextId, + TEXT("phase6c/magiccube5d/interactive-scene-context") + ); + TestEqual( + TEXT("The launch-execution proof must preserve the interactive-scene encoding profile."), + InteractiveSceneSurface.SceneContext.PuzzleState.StateEncoding.EncodingProfile, + TEXT("phase6c/magiccube5d-interactive-scene-envelope-v1") + ); + TestTrue( + TEXT("The launch-execution proof must keep the placeholder interactive-scene posture explicit."), + InteractiveSceneSurface.bUsesPlaceholderStateEnvelope + ); + TestTrue( + TEXT("The launch-execution proof must record the explicit higher-dimensional interactive scene surface in runtime lineage."), + StartedRunState.ActiveDeck.ImportedRuntimeSurface.OriginPaths.Contains( + TEXT("phase6c/magiccube5d/interactive-scene-surface") + ) + ); + TestTrue( + TEXT("The launch-execution proof must record the interactive scene context in runtime lineage."), + StartedRunState.ActiveDeck.ImportedRuntimeSurface.OriginPaths.Contains( + TEXT("phase6c/magiccube5d/interactive-scene-context") + ) + ); return true; } diff --git a/docs/ops/HYPERTWIST_COMPREHENSIVE_RECONSTRUCTION_ROADMAP_2026-06-10.md b/docs/ops/HYPERTWIST_COMPREHENSIVE_RECONSTRUCTION_ROADMAP_2026-06-10.md index 4a60f09..192565a 100644 --- a/docs/ops/HYPERTWIST_COMPREHENSIVE_RECONSTRUCTION_ROADMAP_2026-06-10.md +++ b/docs/ops/HYPERTWIST_COMPREHENSIVE_RECONSTRUCTION_ROADMAP_2026-06-10.md @@ -361,7 +361,9 @@ Closure read: - `2026-06-18` Windows checkpoint: the same isolated worktree `C:\HyperTwist_worktrees\phase10validate` rebuilt the widened host-surface slice with `Result: Succeeded` / UnrealBuildTool `Total execution time: 2858.02 seconds`, and targeted `UnrealEditor-Cmd` automation found `9` tests under `HyperTwist.FirstParty.HigherDimensional.Phase6C` and passed all `9`, including the new `HostCatalog`; `LaunchExecution` again emitted `Ignoring very large delta of 425.99 seconds`, confirming that long quiet interval remains a known-good characteristic rather than a corruption signal - `2026-06-18` continuation proof: current code now adds an explicit higher-dimensional runtime-session catalog that merges the launch, host, and view-context seams into one executed family-owned session posture, threads that session surface through the training runtime library plus the live training panel/session-actor caches, and upgrades generated-mode deck lineage and start-time selector application to use the merged launch-plus-view defaults instead of only the narrower launch defaults - `2026-06-18` Windows checkpoint: the same isolated worktree `C:\HyperTwist_worktrees\phase10validate` rebuilt the widened session-surface slice with `Result: Succeeded` / UnrealBuildTool `Total execution time: 3541.98 seconds`, and targeted `UnrealEditor-Cmd` automation found `10` tests under `HyperTwist.FirstParty.HigherDimensional.Phase6C` and passed all `10`, including the new `SessionCatalog`; `LaunchExecution` emitted `Ignoring very large delta of 573.84 seconds`, so that longer quiet interval also remains confirmed as known-good on this lane rather than a corruption signal -- [ ] Implement the full owned interactive `120-cell` and `5D` projection/runtime surfaces in Unreal above the new activation catalog +- `2026-06-18` continuation proof: current code now adds an explicit higher-dimensional interactive-scene catalog that promotes the landed `Magic120Cell` / `MagicCube5D` runtime-session seams into family-owned scene-context contracts, mirrors those scene surfaces through the training runtime library plus the live training panel/session-actor caches, and upgrades generated-mode lineage plus source attribution to record the explicit interactive scene surface and scene-context ids while dedicated maps and family-owned runtime state remain placeholder-backed +- `2026-06-18` Windows checkpoint: the same isolated worktree `C:\HyperTwist_worktrees\phase10validate` rebuilt the widened interactive-scene slice with `Result: Succeeded` / UnrealBuildTool `Total execution time: 3528.60 seconds`, and targeted `UnrealEditor-Cmd` automation found `11` tests under `HyperTwist.FirstParty.HigherDimensional.Phase6C` and passed all `11`, including the new `InteractiveSceneCatalog`; `LaunchExecution` emitted `Ignoring very large delta of 479.46 seconds`, so that quiet interval also remains confirmed as known-good on this lane rather than a corruption signal +- [ ] Replace the current placeholder interactive-scene envelopes with full owned `120-cell` and `5D` simulation-state, projection, and persistence ownership in Unreal above the landed higher-dimensional scene-context catalog - [ ] Replace the current shared-map execution bridge with full owned dedicated-family interactive launch, map, and persistence surfaces for `120-cell` and `5D` **Estimated actions:** 100–200 @@ -553,4 +555,13 @@ Recommended next widening order: `localhost:22022` with `10` passing `HyperTwist.FirstParty.HigherDimensional.Phase6C` tests, including the new `SessionCatalog` +- `2026-06-18`: the next `Phase 6C` continuation added an explicit + higher-dimensional interactive-scene catalog that promotes the landed + `Magic120Cell` / `MagicCube5D` runtime-session seams into family-owned + scene-context contracts, mirrors those surfaces through the training runtime + library plus the live training panel/session caches, upgrades generated-mode + lineage plus source attribution to record the scene-surface and scene-context + ids, and revalidated the widened slice on `localhost:22022` with `11` + passing `HyperTwist.FirstParty.HigherDimensional.Phase6C` tests, including + the new `InteractiveSceneCatalog` - later classic-cube polish only when a concrete presentation gap remains, not as the default next move diff --git a/docs/v6_5_deep_manual_pack/HyperTwist/FEATURE_REGISTRY.md b/docs/v6_5_deep_manual_pack/HyperTwist/FEATURE_REGISTRY.md index 484c3db..96e88a6 100644 --- a/docs/v6_5_deep_manual_pack/HyperTwist/FEATURE_REGISTRY.md +++ b/docs/v6_5_deep_manual_pack/HyperTwist/FEATURE_REGISTRY.md @@ -271,6 +271,7 @@ repo. | Higher-dimensional shared-map launch and view-context execution bridge | Implemented now | landed `Phase 6C` continuation packet | First-party current code now bundles higher-dimensional launch surfaces and view-context surfaces for `Magic120Cell` and `MagicCube5D`, resolves those surfaces through the training runtime library plus the live training panel/session-actor caches, and lets the training subsystem start the shared-map seed run, apply default selector posture, persist the generated-mode launch request, and start the owned generated run without widening into external-process ownership. After recovering an interrupted follow-up, the primary reverse-SSH `localhost:22022` Windows lane rebuilt the cleaned slice on `2026-06-18` with `Result: Succeeded`, UnrealBuildTool `Total execution time: 124.81 seconds`, and passed all `8` `HyperTwist.FirstParty.HigherDimensional.Phase6C` tests, including `LaunchCatalog`, `ViewContextCatalog`, `LaunchExecution`, and `RunStateActivationResolution`; the quiet `LaunchExecution` interval is now known to be healthy rather than a stalled commandlet. | | Higher-dimensional explicit dedicated-host seam | Implemented now | landed `Phase 6C` host-surface continuation packet | First-party current code now records the preferred dedicated-family `Magic120Cell` / `MagicCube5D` host-map targets in an explicit higher-dimensional host-surface catalog while keeping the current shared training map as the effective runtime fallback, mirrors that resolved host seam through the training runtime library plus the panel/session caches, and threads the host-surface id into the launch/view-context surfaces and generated-mode lineage. The primary reverse-SSH `localhost:22022` Windows lane rebuilt this widened slice on `2026-06-18` with `Result: Succeeded`, UnrealBuildTool `Total execution time: 2858.02 seconds`, and passed all `9` `HyperTwist.FirstParty.HigherDimensional.Phase6C` tests, including the new `HostCatalog`; the long `LaunchExecution` quiet interval remained known-good. | | Higher-dimensional executed runtime session surface | Implemented now | landed `Phase 6C` session-surface continuation packet | First-party current code now merges the higher-dimensional launch, host, and view-context seams into an explicit runtime-session catalog for `Magic120Cell` and `MagicCube5D`, mirrors that session surface through the training runtime library plus the panel/session caches, upgrades generated-mode deck lineage to record the resolved session surface, and applies the merged launch-plus-view selector posture at start time instead of only the narrower launch defaults. The primary reverse-SSH `localhost:22022` Windows lane rebuilt this widened slice on `2026-06-18` with `Result: Succeeded`, UnrealBuildTool `Total execution time: 3541.98 seconds`, and passed all `10` `HyperTwist.FirstParty.HigherDimensional.Phase6C` tests, including the new `SessionCatalog`; the longer `LaunchExecution` quiet interval of `573.84 seconds` remained known-good. | +| Higher-dimensional explicit interactive scene surface | Implemented now | landed `Phase 6C` interactive-scene continuation packet | First-party current code now promotes the higher-dimensional runtime-session seams into explicit `Magic120Cell` and `MagicCube5D` interactive-scene surfaces with renderable placeholder scene-context envelopes, mirrors those scene surfaces through the training runtime library plus the panel/session caches, and upgrades generated-mode lineage plus source attribution to record the resolved scene-surface and scene-context ids. The primary reverse-SSH `localhost:22022` Windows lane rebuilt this widened slice on `2026-06-18` with `Result: Succeeded`, UnrealBuildTool `Total execution time: 3528.60 seconds`, and passed all `11` `HyperTwist.FirstParty.HigherDimensional.Phase6C` tests, including the new `InteractiveSceneCatalog`; the `LaunchExecution` quiet interval of `479.46 seconds` remained known-good. | | Broad non-Euclidean interaction shell and host ownership | Deep-source grounded retained | `MagicTile` retained remainder | Broad interaction-shell, WinForms/OpenTK host ownership, and generic runtime replacement remain deferred after the landed `Phase 6R-T` slice. | ### 7. Speech input and voice sidecars diff --git a/docs/v6_5_deep_manual_pack/HyperTwist/ROADMAP.md b/docs/v6_5_deep_manual_pack/HyperTwist/ROADMAP.md index 1370b08..874a10a 100644 --- a/docs/v6_5_deep_manual_pack/HyperTwist/ROADMAP.md +++ b/docs/v6_5_deep_manual_pack/HyperTwist/ROADMAP.md @@ -148,9 +148,21 @@ Current consolidated milestone snapshot: `Total execution time: 3541.98 seconds`, and all `10` `HyperTwist.FirstParty.HigherDimensional.Phase6C` tests passing, including the new `SessionCatalog` -- the remaining `Phase 6C` gap is now the full dedicated interactive - `120-cell` / `5D` runtime and map replacement, not selector/view default - activation, the shared-map execution bridge, or the current active-run proof +- `2026-06-18`: the next `Phase 6C` continuation added an explicit + higher-dimensional interactive-scene catalog that promotes the landed + `Magic120Cell` / `MagicCube5D` runtime-session seams into family-owned + scene-context contracts, mirrors those scene surfaces through the training + runtime library plus the live training panel/session caches, upgrades + generated-mode lineage plus source attribution to record the scene-surface + and scene-context ids, and revalidated the widened slice on the same + `localhost:22022` lane with `Result: Succeeded`, UnrealBuildTool `Total + execution time: 3528.60 seconds`, and all `11` + `HyperTwist.FirstParty.HigherDimensional.Phase6C` tests passing, including + the new `InteractiveSceneCatalog`; `LaunchExecution` again remained healthy + through an `Ignoring very large delta of 479.46 seconds` quiet interval +- the remaining `Phase 6C` gap is now the full dedicated-family + `120-cell` / `5D` map, runtime-state, and persistence replacement, not the + activation, host, session, or explicit interactive-scene contract layers - the canonical HyperTwist repo-row portfolio is now treated as `75` rows, not `71` - currently implemented rows are now `35`, not `20`