From 7558b8559bc242afd5053df52365a3c38386bb10 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 11:28:40 +0100 Subject: [PATCH] Add Unity state runtime package boundary --- .voidbot/state/aetheria.cc | Bin 26721 -> 27437 bytes Assets/Scripts/Gameplay/ActionGameManager.cs | 3 ++- .../Scripts/Gameplay/AetheriaStateBoundary.cs | 11 --------- .../Runtime/AetheriaRuntimeStateBoundary.cs | 14 ++++++++++++ .../GameCult.Aetheria.State.Unity.asmdef | 14 ++++++++++++ .../org.gamecult.aetheria.state/package.json | 15 +++++++++++++ docs/aetheria-perfect-machine-map.md | 21 ++++++++++-------- 7 files changed, 57 insertions(+), 21 deletions(-) delete mode 100644 Assets/Scripts/Gameplay/AetheriaStateBoundary.cs create mode 100644 Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateBoundary.cs create mode 100644 Packages/org.gamecult.aetheria.state/Runtime/GameCult.Aetheria.State.Unity.asmdef create mode 100644 Packages/org.gamecult.aetheria.state/package.json diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 43fb51f2af8ec65baddcf8a3f00ad25ab795fd03..5a97fcf5f589b7039a67b3c21f97c523c13d428d 100644 GIT binary patch delta 1502 zcmb7^J!}+56vtzq<>1EX6b>Zw;fI23g19|&#z$fyTYM#e1TxrAI3d<}_wC+@-I??3 ztetZTD}s^+jT9+$5}}|Ffv%*1DCwa=vV?@vrVCxVyxo~SK%{``Mzizo{oen*|NHC7 zz`bV!_wNjjv}TSpz3I6pLh}S6)f5jaQflvK zKW04H`gh(&rVXhgFJcM$S*$&Vx{Zo6&qfHj4!+zWG~*%#`UGFl%TxJFQ$4@qG_W)Y zFeI=5PPov^Hs?Z~@}$f}z*N_R6TaqB)|4?mg4xCQYduX1-VXT zNI@s7kFB!9Jl(cDSx)J}ISqlt6ok~!MGZXZNTmw_yo+ZR&Fa}2K*)R+V2+}4G#@Dp z6Ib43Y97yhv{_#vnW+&aB{ecY7 z?=BO5TdK<#rq4fU_S8f$yu5sYbtscBRbZ#2RGvAiNxCiuvJ{+h=DAccIbo(Vg?){R zvR)tP-a!3U_0tcG2_9mqt!HRv$|-i1aZ-CW z`PFw%?p)BYeyLc))P}8J%+qGA-LMX3X-b}^iCl4BDNw9VWuuGPwg{Kr8^JuDs+rX) z%+{T1Z*0v@6g5eS#)UM9tD;V^M6vBl(}vcT608-2&}wP?A`9(w-c8=nc{7hUlcv!{ zz=f-BWWcQ(rQioB58Swsf(VMJ8=>IFKjFIbKH^7kd+ywG?>YC(%kQb5UsJDk(z%Jb z^0ZZ+oUK1h9n&j!viei{K>|+4pvc@yfSGdi>d?UP^sPd0dcZw7DLqCNQXLO$(Ps;%x?>UdMXc~T zmas(m#{9L4Q6KjEAO+hr`zXg3t)>%cV9>>o;Qq1UGK)7#k zbhF~0@yQ7yz5l(A6&Zcg+^gsGSg4Vs2AC-P?OB^Dvz58N2b}WeziN8Nww_^59O17* zL;g5W47Lk)c64+Zd&UJKd^-+7oU^`UMG*|Hj&J7&U%)1{ffI;nPG~kYAN)H1Ew6`f zkL$N^SU;|1^Ks-$6ZIzwH_fy&!JAqo9i(p@$sJ5;`b%ag3H`ZJ@-^P|fcO`POjeiI ZydD_;mEE=b2{1bqwgu~WH`haE>ihE;JV*cl diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 20016ed1b..bb178e507 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Cinemachine; +using GameCult.Aetheria.State.Unity; using Ink; using Ink.Runtime; using TMPro; @@ -35,7 +36,7 @@ public class ActionGameManager : MonoBehaviour get => _gameDataDirectory ??= new DirectoryInfo(Application.dataPath).Parent.CreateSubdirectory("GameData"); } - public static string AetheriaStateFilePath => AetheriaStateBoundary.GetStateFilePath(GameDataDirectory); + public static string AetheriaStateFilePath => AetheriaRuntimeStateBoundary.GetStateFilePath(GameDataDirectory); private static string LegacyAetherDatabasePath => LegacyCatalogBoundary.GetLegacyCatalogPath(GameDataDirectory); private static ILegacyCatalogReader LegacyCatalog => LegacyCatalogBoundary.GetCatalog(GameDataDirectory); diff --git a/Assets/Scripts/Gameplay/AetheriaStateBoundary.cs b/Assets/Scripts/Gameplay/AetheriaStateBoundary.cs deleted file mode 100644 index 1dbb894f1..000000000 --- a/Assets/Scripts/Gameplay/AetheriaStateBoundary.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.IO; - -public static class AetheriaStateBoundary -{ - public const string RuntimeStateFileName = "aetheria-world.cc"; - - public static string GetStateFilePath(DirectoryInfo gameDataDirectory) - { - return Path.Combine(gameDataDirectory.FullName, RuntimeStateFileName); - } -} diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateBoundary.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateBoundary.cs new file mode 100644 index 000000000..d3a99ac74 --- /dev/null +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateBoundary.cs @@ -0,0 +1,14 @@ +using System.IO; + +namespace GameCult.Aetheria.State.Unity +{ + public static class AetheriaRuntimeStateBoundary + { + public const string RuntimeStateFileName = "aetheria-world.cc"; + + public static string GetStateFilePath(DirectoryInfo gameDataDirectory) + { + return Path.Combine(gameDataDirectory.FullName, RuntimeStateFileName); + } + } +} diff --git a/Packages/org.gamecult.aetheria.state/Runtime/GameCult.Aetheria.State.Unity.asmdef b/Packages/org.gamecult.aetheria.state/Runtime/GameCult.Aetheria.State.Unity.asmdef new file mode 100644 index 000000000..8d4d3aa6f --- /dev/null +++ b/Packages/org.gamecult.aetheria.state/Runtime/GameCult.Aetheria.State.Unity.asmdef @@ -0,0 +1,14 @@ +{ + "name": "GameCult.Aetheria.State.Unity", + "rootNamespace": "GameCult.Aetheria.State.Unity", + "references": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": true +} diff --git a/Packages/org.gamecult.aetheria.state/package.json b/Packages/org.gamecult.aetheria.state/package.json new file mode 100644 index 000000000..8e56cee29 --- /dev/null +++ b/Packages/org.gamecult.aetheria.state/package.json @@ -0,0 +1,15 @@ +{ + "name": "org.gamecult.aetheria.state", + "displayName": "Aetheria State Runtime", + "version": "0.1.0", + "unity": "2021.3", + "description": "Unity runtime boundary for Aetheria typed CultCache state and future CultMesh catalog boot.", + "keywords": [ + "Aetheria", + "CultCache", + "CultMesh", + "State" + ], + "license": "MPL-2.0", + "category": "Scripting" +} diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index c164cd883..48e805ea6 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -21,12 +21,14 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. item/name catalog through a private `ActionGameManager` boot helper, which is now the only runtime entrypoint that calls `LegacyCatalogBoundary.GetCatalog`. `ActionGameManager` no longer owns a global legacy cache. - `AetheriaStateBoundary` owns the Unity runtime path to - `GameData/aetheria-world.cc`; `LegacyCatalogBoundary` no longer names or owns - typed state paths. Local run saves, loadouts, player settings files, zone - files, and generated keyboard layout caches no longer write bespoke durable - files. The legacy `PlayerSettings` runtime object is no longer decorated as a - MessagePack persistence shape. + `GameCult.Aetheria.State.Unity`, the embedded Unity package under + `Packages/org.gamecult.aetheria.state`, owns the Unity runtime path to + `GameData/aetheria-world.cc` through `AetheriaRuntimeStateBoundary`; + `LegacyCatalogBoundary` no longer names or owns typed state paths. Local run + saves, loadouts, player settings files, zone files, and generated keyboard + layout caches no longer write bespoke durable files. The legacy + `PlayerSettings` runtime object is no longer decorated as a MessagePack + persistence shape. - Shared domain state is still partly built around `DatabaseEntry`, GUID identity, MessagePack attributes, and static cache references. Newtonsoft, JsonKnownTypes, RethinkDB, LiteNetLib client transport, and the broken @@ -129,8 +131,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - `GameData/aetheria-world.cc` is now materialized from the importer as the project-local typed state file for the checked-in catalog. The importer stores relative provenance in the state document, not machine-local absolute paths. - Unity resolves this path through `AetheriaStateBoundary`, not through the - legacy catalog boundary. + Unity resolves this path through the embedded `GameCult.Aetheria.State.Unity` + runtime package, not through the legacy catalog boundary. Import rebuilds clear the generated `.cc`, `.cc.records`, and `.cultmesh` outputs for the selected state path after capturing legacy inputs, so schema evolution can rematerialize typed state instead of being blocked by stale @@ -194,7 +196,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. ## Current Authority Map - Owner: `Aetheria.State` owns the new typed state spine for durable state. - `AetheriaStateBoundary` owns Unity's runtime typed state file path. + The embedded `GameCult.Aetheria.State.Unity` package owns Unity's runtime + typed state file path and is the landing zone for future typed catalog boot. `LegacyCatalogBoundary` is the only named owner for opening the old catalog and binding legacy `DatabaseLink` resolution until catalog migration lands. `ActionGameManager` has a private boot helper that calls it only to construct