Demote legacy runtime cache names

This commit is contained in:
Meta Vens 2026-06-13 17:22:03 +01:00
commit e7d33e5e43
29 changed files with 62 additions and 53 deletions

Binary file not shown.

View file

@ -83,7 +83,7 @@ rebuild the typed artifact instead of failing on a stale embedded schema catalog
`AetheriaCatalogSnapshot` is the typed read surface over materialized catalog
documents. It exposes trade items, legacy-ID lookup, manufacturer lookup,
corporation prefix lookup, corporation name-file lookup, equipment items,
behavior lookup, and hardpoint lookup without reading `DatabaseEntry` objects.
behavior lookup, and hardpoint lookup without reading runtime projection DTOs.
`AetheriaCatalogSurfaceProjector` publishes the first Eve-compatible provider
surface from typed catalog state. The importer materializes
@ -98,7 +98,7 @@ equipment, behavior, hardpoint, manufacturer, corporation, and name-file
queries, exposes typed item shape masks for layout and fitting consumers, and
exposes typed interior masks and hardpoints for equipment/cargo layout
consumers, exposes typed behavior payload read models, and can read the
published Eve catalog surface. It does not deserialize legacy `DatabaseEntry`
published Eve catalog surface. It does not deserialize legacy runtime projection
objects and does not write state. Unity can use this as the first package
boundary once CultLib/Eve runtime packaging is available.
`Galaxy` now consumes this package-owned runtime catalog for faction selection

View file

@ -1,4 +1,4 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
@ -485,7 +485,7 @@ public class ActionGameManager : MonoBehaviour
}
var runtimeItemCatalog = new AetheriaRuntimeItemCatalog(RuntimeCatalog);
DatabaseLinkBase.BindRuntimeItemCatalog(runtimeItemCatalog);
RuntimeCatalogLinkBase.BindRuntimeItemCatalog(runtimeItemCatalog);
ItemManager = new ItemManager(
runtimeItemCatalog,
Settings.GameplaySettings,

View file

@ -4,7 +4,7 @@
using System;
public abstract class AgentTask : DatabaseEntry
public abstract class AgentTask : RuntimeCatalogEntry
{
public int Priority;

View file

@ -7,7 +7,7 @@ using System.Linq;
[Inspectable, Order(-5), RuntimeInspectable]
public class ItemUsageData : BehaviorData
{
[InspectableDatabaseLink(typeof(SimpleCommodityData)), RuntimeCatalogKey(1), RuntimeInspectable]
[InspectableRuntimeCatalogLink(typeof(SimpleCommodityData)), RuntimeCatalogKey(1), RuntimeInspectable]
public Guid Item;
public override Behavior CreateInstance(EquippedItem item)

View file

@ -44,7 +44,7 @@ public abstract class WeaponData : BehaviorData
[InspectablePrefab, RuntimeCatalogKey(11), RuntimeInspectable]
public PerformanceStat Visibility = new PerformanceStat();
[InspectableDatabaseLink(typeof(SimpleCommodityData)), RuntimeCatalogKey(12), RuntimeInspectable]
[InspectableRuntimeCatalogLink(typeof(SimpleCommodityData)), RuntimeCatalogKey(12), RuntimeInspectable]
public Guid AmmoType;
[InspectablePrefab, RuntimeCatalogKey(13)]

View file

@ -8,7 +8,7 @@ using System.Collections.Generic;
using Unity.Mathematics;
[LegacyCatalogGroup("Galaxy"), Inspectable]
public class Faction : DatabaseEntry, INamedEntry
public class Faction : RuntimeCatalogEntry, INamedEntry
{
[Inspectable]
public string Name;
@ -22,7 +22,7 @@ public class Faction : DatabaseEntry, INamedEntry
[InspectableTexture]
public string Logo;
[InspectableDatabaseLink(typeof(PersonalityAttribute))]
[InspectableRuntimeCatalogLink(typeof(PersonalityAttribute))]
public Dictionary<Guid, float> Personality = new Dictionary<Guid, float>();
// [Inspectable]
@ -34,16 +34,16 @@ public class Faction : DatabaseEntry, INamedEntry
[InspectableColor]
public float3 SecondaryColor;
[InspectableDatabaseLink(typeof(NameFile))]
[InspectableRuntimeCatalogLink(typeof(NameFile))]
public Guid GeonameFile;
[InspectableDatabaseLink(typeof(HullData))]
[InspectableRuntimeCatalogLink(typeof(HullData))]
public Guid BossHull;
[Inspectable]
public int InfluenceDistance = 4;
[InspectableDatabaseLink(typeof(Faction)), RangedFloat(0, 1)]
[InspectableRuntimeCatalogLink(typeof(Faction)), RangedFloat(0, 1)]
public Dictionary<Guid, float> Allegiance = new Dictionary<Guid, float>();
[InspectableSoundBank]
@ -63,7 +63,7 @@ public class Faction : DatabaseEntry, INamedEntry
}
[Inspectable]
public class NameFile : DatabaseEntry, INamedEntry
public class NameFile : RuntimeCatalogEntry, INamedEntry
{
public string Name;
public string[] Names;

View file

@ -11,7 +11,7 @@ using static Unity.Mathematics.noise;
using static NoiseFbm;
[Inspectable, Serializable, LegacyCatalogGroup("Galaxy")]
public class GalaxyMapLayerData : DatabaseEntry, INamedEntry
public class GalaxyMapLayerData : RuntimeCatalogEntry, INamedEntry
{
[Inspectable]
public float CoreBoost = 1.05f;

View file

@ -260,7 +260,7 @@ public class Shape
}
public abstract class ItemData : DatabaseEntry, INamedEntry
public abstract class ItemData : RuntimeCatalogEntry, INamedEntry
{
[Inspectable, RuntimeCatalogKey(1)]
public string Name;
@ -268,7 +268,7 @@ public abstract class ItemData : DatabaseEntry, INamedEntry
[InspectableText, RuntimeCatalogKey(2)]
public string Description;
[InspectableDatabaseLink(typeof(Faction)), RuntimeCatalogKey(3)]
[InspectableRuntimeCatalogLink(typeof(Faction)), RuntimeCatalogKey(3)]
public Guid Manufacturer;
[Inspectable, RuntimeCatalogKey(4)]
@ -303,7 +303,7 @@ public class SimpleCommodityData : ItemData
// public BodyType ResourceBodyType;
//
// // Link to map(s) controlling density of resource, multiplied together when more than one
// [InspectableDatabaseLink(typeof(GalaxyMapLayerData)), RuntimeCatalogKey(7)]
// [InspectableRuntimeCatalogLink(typeof(GalaxyMapLayerData)), RuntimeCatalogKey(7)]
// public List<Guid> ResourceDensity = new List<Guid>();
//
// // Controls the lowest value in the resource distribution curve
@ -330,7 +330,7 @@ public abstract class CraftedItemData : ItemData
[LegacyCatalogGroup("Items"), Inspectable]
public class CompoundCommodityData : CraftedItemData
{
[InspectableDatabaseLink(typeof(PersonalityAttribute)), RuntimeCatalogKey(10)]
[InspectableRuntimeCatalogLink(typeof(PersonalityAttribute)), RuntimeCatalogKey(10)]
public Dictionary<Guid, float> DemandProfile = new Dictionary<Guid, float>();
[Inspectable, RuntimeCatalogKey(11)]
@ -613,7 +613,7 @@ public class PerformanceStat
}
[LegacyCatalogGroup("Items"), Inspectable]
public class PersonalityAttribute : DatabaseEntry, INamedEntry
public class PersonalityAttribute : RuntimeCatalogEntry, INamedEntry
{
[Inspectable, RuntimeCatalogKey(1)]
public string Name;

View file

@ -12,7 +12,7 @@ using static Unity.Mathematics.math;
public abstract class ItemInstance
{
public DatabaseLink<ItemData> Data;
public RuntimeCatalogLink<ItemData> Data;
public ItemRotation Rotation;
}

View file

@ -1,4 +1,4 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
@ -128,7 +128,7 @@ public class ItemManager
{
var newItem = new SimpleCommodity
{
Data = new DatabaseLink<ItemData>{LinkID = item.ID},
Data = new RuntimeCatalogLink<ItemData>{LinkID = item.ID},
Quantity = count
};
//ItemData.Add(newItem);
@ -163,13 +163,13 @@ public class ItemManager
{
return new EquippableItem
{
Data = new DatabaseLink<ItemData> {LinkID = item.ID}, Quality = quality, Durability = equippableItemData.Durability
Data = new RuntimeCatalogLink<ItemData> {LinkID = item.ID}, Quality = quality, Durability = equippableItemData.Durability
};
}
var newCommodity = new CompoundCommodity
{
Data = new DatabaseLink<ItemData>{LinkID = item.ID},
Data = new RuntimeCatalogLink<ItemData>{LinkID = item.ID},
Quality = quality
};
return newCommodity;

View file

@ -5,7 +5,7 @@
using System;
[LegacyCatalogGroup("Users")]
public class PlayerData : DatabaseEntry, INamedEntry
public class PlayerData : RuntimeCatalogEntry, INamedEntry
{
public string Email;

View file

@ -33,11 +33,11 @@ public class InspectableEnumValuesAttribute : PreferredInspectorAttribute
}
}
public class InspectableDatabaseLinkAttribute : PreferredInspectorAttribute
public class InspectableRuntimeCatalogLinkAttribute : PreferredInspectorAttribute
{
public readonly Type EntryType;
public InspectableDatabaseLinkAttribute(Type entryType)
public InspectableRuntimeCatalogLinkAttribute(Type entryType)
{
EntryType = entryType;
}

View file

@ -10,7 +10,7 @@ public interface INamedEntry
string EntryName { get; set; }
}
public abstract class DatabaseEntry
public abstract class RuntimeCatalogEntry
{
public Guid ID = Guid.NewGuid();
@ -21,17 +21,17 @@ public abstract class DatabaseEntry
public override bool Equals(object obj)
{
if (obj is DatabaseEntry entry) return entry.ID == ID;
if (obj is RuntimeCatalogEntry entry) return entry.ID == ID;
return false;
}
}
public class DatabaseLink<T> : DatabaseLinkBase where T : ItemData
public class RuntimeCatalogLink<T> : RuntimeCatalogLinkBase where T : ItemData
{
public T Value => ResolveRuntimeItemCatalog<T>(LinkID);
}
public class DatabaseLinkBase
public class RuntimeCatalogLinkBase
{
public Guid LinkID;

View file

@ -21,7 +21,7 @@ public class ZonePack
public double Time;
}
public abstract class BodyData : DatabaseEntry, INamedEntry
public abstract class BodyData : RuntimeCatalogEntry, INamedEntry
{
public string Name = "";
@ -101,7 +101,7 @@ public class Asteroid
public float RotationSpeed;
}
public class OrbitData : DatabaseEntry
public class OrbitData : RuntimeCatalogEntry
{
public Guid Parent;

View file

@ -46,8 +46,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
the provider-owned Eve command bridge on startup and on a daemon polling loop
while hosting the CultMesh state node. `Aetheria.State.ApplyPending` remains a
bounded local operator applicator for both pending lanes.
- Shared domain state is still partly built around `DatabaseEntry`, GUID
identity, MessagePack attributes, and static cache references. Newtonsoft,
- Shared domain state is still partly built around `RuntimeCatalogEntry`, GUID
identity, runtime catalog metadata, and static projection references. Newtonsoft,
JsonKnownTypes, RethinkDB, LiteNetLib client transport, and the broken
`Economy.Shared` wrapper have been removed from live source. The stale
`StrategyGameManager.csbak` backup file and unused Unity asset MessagePack
@ -86,11 +86,12 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
remains a UI/session cache, not durable authority.
- `ActionGameManager` opens `AetheriaRuntimeCatalogStore` over
`aetheria-world.cc`, projects it through `AetheriaRuntimeItemCatalog`, and
binds `DatabaseLinkBase` to that typed runtime item reader before gameplay
binds `RuntimeCatalogLinkBase` to that typed runtime item reader before gameplay
objects read `ItemInstance.Data.Value`. The old `LegacyItemCatalogBoundary`,
`LegacyItemCatalogCache`, and runtime MessagePack deserializer path have been
deleted. `DatabaseEntry` and `DatabaseLink<T>` are plain runtime identity/link
helpers now, not MessagePack objects or a global union root.
deleted. The old `DatabaseEntry`/`DatabaseLink<T>` names have been demoted to
`RuntimeCatalogEntry`/`RuntimeCatalogLink<T>` runtime projection helpers, not
MessagePack objects or a global union root.
- `ItemManager` no longer exposes the raw runtime item catalog reader as public
gameplay/UI API. Temporary item instantiation bridges now go through the
narrow `ItemManager.GetCatalogEntry<T>` method. `ItemManager` no longer
@ -115,10 +116,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
`Faction` DTOs, including allegiance edges, for the existing simulation shape
and resolves full name arrays from `aetheria.name_file.v2` records. The
runtime no longer opens the old `GameData/NameFile/*.msgpack` directory.
- `DatabaseLink<T>.Value` can resolve legacy links only after
- `RuntimeCatalogLink<T>.Value` can resolve legacy links only after
`ActionGameManager` binds the typed runtime item catalog projected from
`aetheria-world.cc`. MessagePack catalog construction no longer grabs global
`DatabaseLinkBase` authority.
link-resolution authority.
- `Economy.Server` now starts the modern `Aetheria.State` CultMesh node, drains
pending Unity runtime commits through the typed state applicator, and no
longer owns RethinkDB/LiteNetLib state.
@ -147,14 +148,14 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
- `AetheriaCatalogSnapshot` is the typed catalog read surface over materialized
`.cc` records. It exposes trade-item, manufacturer, corporation prefix, and
corporation name-file queries, plus equipment, hardpoint, and behavior
queries without touching `DatabaseEntry`.
queries without touching runtime projection DTOs.
- The embedded `GameCult.Aetheria.State.Unity` package now owns the
Unity-visible immutable catalog read-model contract for
trade/equipment/behavior/hardpoint/manufacturer/corporation/name queries,
typed item shape masks, typed interior masks, hardpoints, and behavior
payloads. It also owns a read-only Unity-compatible CultCache directory-store
opener for the known Aetheria catalog schemas, so Unity runtime code can read
`aetheria-world.cc` catalog records without `DatabaseEntry` or a MessagePack
`aetheria-world.cc` catalog records without runtime projection DTOs or a MessagePack
catalog cache. The SDK-style `Aetheria.State.Unity` facade includes
that package source and owns the full `Aetheria.State` mapper plus Eve surface
read path for .NET smokes. Neither is a simulation owner and neither writes
@ -230,9 +231,11 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
not registered as a VoidBot Discord identity yet, so mutations use the
repo-local `void-self-state.mjs apply-operation` typed boundary rather than
the registered Face MCP path.
- The old IMGUI DB inspector under `Assets/Scripts/CultCache/Editor/` has been
deleted. `NameTools` can still clean/generate names, but legacy NameFile
`.msgpack` export is disabled.
- The old IMGUI DB inspector has been deleted. `NameTools` can still
clean/generate names, but legacy NameFile `.msgpack` export is disabled. The
remaining Unity helper files formerly under `Assets/Scripts/CultCache` now
live under `Assets/Scripts/UnitySupport` because they are color/curve helpers,
not cache authority.
- Galaxy generation no longer reads legacy `Faction` or `NameFile` entries
through `ItemManager`; it requires the typed runtime catalog opened from
`GameData/aetheria-world.cc`.
@ -319,7 +322,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
typed state file path plus the boot-time state-file probe, and is the landing
zone for future typed catalog boot.
`ActionGameManager` opens the package-owned typed runtime catalog snapshot
and binds `DatabaseLink<T>` resolution through `AetheriaRuntimeItemCatalog`.
and binds `RuntimeCatalogLink<T>` resolution through `AetheriaRuntimeItemCatalog`.
Runtime code receives narrow `ItemManager` catalog methods where gameplay
only needs item lookups. `Galaxy`, entity restore, and faction-distance
loadout weighting have been moved off legacy faction catalog reads.
@ -330,9 +333,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
contract for full .NET smokes and Eve surface reads. Neither writes state or
owns simulation. The runtime no longer has a MessagePack catalog cache.
`AetheriaRuntimeItemCatalog` materializes temporary `ItemData` DTOs from typed
item records for the old simulation object model. `DatabaseEntry` no longer
carries MessagePack union metadata, and behavior type selection now uses an
explicit runtime catalog map instead of `UnionAttribute` reflection.
item records for the old simulation object model. `RuntimeCatalogEntry` is a
projection identity helper, not a persistence base, and behavior type
selection now uses an explicit runtime catalog map instead of
`UnionAttribute` reflection.
Item/behavior DTO field layout for the temporary projection bridge is now
marked with project-owned `RuntimeCatalogKeyAttribute`, not MessagePack
metadata. Item properties
@ -365,7 +369,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
file save, and migration all need to converge on one typed commit primitive.
- Deletion line: no new behavior should be added to old `ItemData` DTO
metadata or MessagePack catalog paths except bounded migration readers and the
current typed item projection bridge. `DatabaseEntry` is no longer a
current typed item projection bridge. `RuntimeCatalogEntry` is no longer a
persistence owner.
## Target Authority Map
@ -379,10 +383,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
- Derived state: Unity scene objects, HUD panels, editor inspectors, debug
views, server dashboards, and compatibility DTOs.
- Forbidden writers: Unity UI components, RethinkDB, legacy JSON stores,
`DatabaseEntry.ID`, global cache statics, and any compatibility reader.
`RuntimeCatalogEntry.ID`, global cache statics, and any compatibility reader.
- Shared paths: gameplay input, editor edits, import/deep-load, replication,
simulation ticks, and tests all call the same typed state service.
- Deletion line: replace the remaining `DatabaseEntry`/`ItemData` runtime DTO
- Deletion line: replace the remaining `RuntimeCatalogEntry`/`ItemData` runtime DTO
projection with native typed item instances, then remove old MessagePack
catalog metadata from live Unity source once import-only migration no longer
needs it.
@ -523,6 +527,11 @@ First Aetheria surfaces to publish:
`LegacyItemCatalogCache`, and the runtime MessagePack deserializer path.
- Done: demote `DatabaseEntry` and `DatabaseLink<T>` from MessagePack
union/object shapes to plain runtime identity/link helpers.
- Done: rename live Unity projection helpers from `DatabaseEntry`,
`DatabaseLink<T>`, and `InspectableDatabaseLinkAttribute` to
`RuntimeCatalogEntry`, `RuntimeCatalogLink<T>`, and
`InspectableRuntimeCatalogLinkAttribute`, and move the old
`ServerShared/CultCache` folder to `ServerShared/RuntimeProjection`.
- Done: replace behavior union reflection with an explicit runtime catalog
behavior map and remove all live `Union(...)` annotations.
- Done: demote agent task runtime shapes from MessagePack object/key/union
@ -620,7 +629,7 @@ First Aetheria surfaces to publish:
## Verification
- `rg "Newtonsoft|JsonObject|JsonProperty|JsonConvert|JsonKnownTypes|RethinkDb|RethinkTable|DatabaseCache"` is zero outside migration quarantine and docs.
- `rg "DatabaseEntry" Assets Economy.*` shows no live runtime ownership path.
- `rg "DatabaseEntry|DatabaseLink|InspectableDatabaseLink|ServerShared\\\\CultCache" Assets Economy.*` shows no live runtime ownership path.
- `dotnet list package --vulnerable --include-transitive` is clean for active
maintained projects.
- CultCache smoke proves write, flush, reopen, query, and typed reference