Use generic state node documents for domain records

This commit is contained in:
Meta Vens 2026-06-29 01:35:11 +01:00
commit 673285bafe
5 changed files with 80 additions and 114 deletions

View file

@ -895,7 +895,7 @@ static async Task PublishRuntimeSessionAsync(
static async Task EnsureWorldDocumentAsync(AetheriaStateNode node)
{
var now = DateTimeOffset.UtcNow.ToString("O");
var world = node.World();
var world = node.MutableDocument<AetheriaWorldState>(AetheriaStateNode.WorldKey);
var existing = await world.ReadAsync().ConfigureAwait(false);
if (existing != null)
{
@ -953,7 +953,7 @@ static async Task EnsurePlayableRunDocumentsAsync(AetheriaStateNode node, string
.ReplaceAsync(settings)
.ConfigureAwait(false);
await node.RunState(runKey).ReplaceAsync(new AetheriaRunState
await node.MutableDocument<AetheriaRunState>(runKey).ReplaceAsync(new AetheriaRunState
{
RunId = runId,
EntranceZoneIndex = 0,
@ -966,7 +966,7 @@ static async Task EnsurePlayableRunDocumentsAsync(AetheriaStateNode node, string
UpdatedAtUtc = now
}).ConfigureAwait(false);
await node.ZoneState(zoneKey).ReplaceAsync(new AetheriaZoneState
await node.MutableDocument<AetheriaZoneState>(zoneKey).ReplaceAsync(new AetheriaZoneState
{
Name = "Daemon Local Testbed",
Position = Vec2(0, 0),
@ -1044,7 +1044,7 @@ static async Task EnsurePlayableRunDocumentsAsync(AetheriaStateNode node, string
GravityTerrainWaveFrequency = 0.6
}).ConfigureAwait(false);
await node.EntitySnapshot(new CultRecordKey(entityKeys[0])).ReplaceAsync(SeedEntity(
await node.MutableDocument<AetheriaEntitySnapshot>(new CultRecordKey(entityKeys[0])).ReplaceAsync(SeedEntity(
"Anchor Station",
"station",
Vec3(-220, 0, -90),
@ -1063,7 +1063,7 @@ static async Task EnsurePlayableRunDocumentsAsync(AetheriaStateNode node, string
Contact(entityKeys[7], 0.6, false)
],
["repair-parts", "reactor-fuel", "drone-core"])).ConfigureAwait(false);
await node.EntitySnapshot(new CultRecordKey(entityKeys[1])).ReplaceAsync(SeedEntity(
await node.MutableDocument<AetheriaEntitySnapshot>(new CultRecordKey(entityKeys[1])).ReplaceAsync(SeedEntity(
"Vanguard One",
"ship",
Vec3(-60, 0, -40),
@ -1080,7 +1080,7 @@ static async Task EnsurePlayableRunDocumentsAsync(AetheriaStateNode node, string
Contact(entityKeys[5], 0.85, true)
],
["coilgun-ammo", "field-rations"])).ConfigureAwait(false);
await node.EntitySnapshot(new CultRecordKey(entityKeys[2])).ReplaceAsync(SeedEntity(
await node.MutableDocument<AetheriaEntitySnapshot>(new CultRecordKey(entityKeys[2])).ReplaceAsync(SeedEntity(
"Wing Two",
"ship",
Vec3(180, 0, 120),
@ -1097,7 +1097,7 @@ static async Task EnsurePlayableRunDocumentsAsync(AetheriaStateNode node, string
Contact(entityKeys[6], 0.6, true)
],
["sensor-buoy", "shield-cell"])).ConfigureAwait(false);
await node.EntitySnapshot(new CultRecordKey(entityKeys[3])).ReplaceAsync(SeedEntity(
await node.MutableDocument<AetheriaEntitySnapshot>(new CultRecordKey(entityKeys[3])).ReplaceAsync(SeedEntity(
"Torch Three",
"ship",
Vec3(-160, 0, 210),
@ -1113,7 +1113,7 @@ static async Task EnsurePlayableRunDocumentsAsync(AetheriaStateNode node, string
Contact(entityKeys[5], 0.9, true)
],
["micro-missile", "coolant-pack"])).ConfigureAwait(false);
await node.EntitySnapshot(new CultRecordKey(entityKeys[4])).ReplaceAsync(SeedEntity(
await node.MutableDocument<AetheriaEntitySnapshot>(new CultRecordKey(entityKeys[4])).ReplaceAsync(SeedEntity(
"Ash Raider",
"ship",
Vec3(420, 0, 180),
@ -1129,7 +1129,7 @@ static async Task EnsurePlayableRunDocumentsAsync(AetheriaStateNode node, string
Contact(entityKeys[2], 0.5, true)
],
["scrap-metal", "stolen-capacitor"])).ConfigureAwait(false);
await node.EntitySnapshot(new CultRecordKey(entityKeys[5])).ReplaceAsync(SeedEntity(
await node.MutableDocument<AetheriaEntitySnapshot>(new CultRecordKey(entityKeys[5])).ReplaceAsync(SeedEntity(
"Cinder Knife",
"ship",
Vec3(560, 0, -110),
@ -1144,7 +1144,7 @@ static async Task EnsurePlayableRunDocumentsAsync(AetheriaStateNode node, string
Contact(entityKeys[3], 1, true)
],
["volatile-fuel"])).ConfigureAwait(false);
await node.EntitySnapshot(new CultRecordKey(entityKeys[6])).ReplaceAsync(SeedEntity(
await node.MutableDocument<AetheriaEntitySnapshot>(new CultRecordKey(entityKeys[6])).ReplaceAsync(SeedEntity(
"Blackwake",
"ship",
Vec3(680, 0, 260),
@ -1158,7 +1158,7 @@ static async Task EnsurePlayableRunDocumentsAsync(AetheriaStateNode node, string
Contact(entityKeys[2], 0.8, true)
],
["ore-cache", "burned-relay-core"])).ConfigureAwait(false);
await node.EntitySnapshot(new CultRecordKey(entityKeys[7])).ReplaceAsync(SeedEntity(
await node.MutableDocument<AetheriaEntitySnapshot>(new CultRecordKey(entityKeys[7])).ReplaceAsync(SeedEntity(
"Derelict Relay",
"station",
Vec3(-260, 0, 260),
@ -1325,7 +1325,7 @@ static async Task<AetheriaRuntimeRunCheckpointCommit?> ReadRuntimeRunCheckpointA
if (string.IsNullOrWhiteSpace(settings?.ActiveRunKey))
return null;
var run = await node.RunState(new CultRecordKey(settings.ActiveRunKey)).ReadAsync().ConfigureAwait(false);
var run = await node.MutableDocument<AetheriaRunState>(new CultRecordKey(settings.ActiveRunKey)).ReadAsync().ConfigureAwait(false);
if (run == null)
return null;
@ -1333,7 +1333,7 @@ static async Task<AetheriaRuntimeRunCheckpointCommit?> ReadRuntimeRunCheckpointA
var zoneKeys = run.ZoneKeys ?? Array.Empty<string>();
for (var zoneIndex = 0; zoneIndex < zoneKeys.Length; zoneIndex++)
{
var zone = await node.ZoneState(new CultRecordKey(zoneKeys[zoneIndex])).ReadAsync().ConfigureAwait(false);
var zone = await node.MutableDocument<AetheriaZoneState>(new CultRecordKey(zoneKeys[zoneIndex])).ReadAsync().ConfigureAwait(false);
if (zone == null)
continue;
@ -1376,7 +1376,7 @@ static async Task<AetheriaRuntimeZoneSnapshotCommit> ToRuntimeZoneAsync(
var entities = new List<AetheriaRuntimeEntitySnapshotCommit>();
for (var entityIndex = 0; entityIndex < entityKeys.Length; entityIndex++)
{
var entity = await node.EntitySnapshot(new CultRecordKey(entityKeys[entityIndex])).ReadAsync().ConfigureAwait(false);
var entity = await node.MutableDocument<AetheriaEntitySnapshot>(new CultRecordKey(entityKeys[entityIndex])).ReadAsync().ConfigureAwait(false);
if (entity != null)
entities.Add(ToRuntimeEntity(entity, entityIndex, entityIndices));
}

View file

@ -21,7 +21,7 @@ var nameFileKey = AetheriaCatalogKeys.NameFileFromLegacyId(nameFileLegacyId);
await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-state-smoke"))
{
await node.World().ReplaceAsync(new AetheriaWorldState
await node.MutableDocument<AetheriaWorldState>(AetheriaStateNode.WorldKey).ReplaceAsync(new AetheriaWorldState
{
Name = "Aetheria",
WorldId = "aetheria",
@ -30,7 +30,7 @@ await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-s
UpdatedAtUtc = now
});
await node.ItemDefinition(itemKey)
await node.MutableDocument<AetheriaItemDefinition>(itemKey)
.ReplaceAsync(new AetheriaItemDefinition
{
Name = "Smoke Aether Drive",
@ -42,7 +42,7 @@ await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-s
Tags = ["smoke", "state-spine"]
});
await node.MigrationLedger().ReplaceAsync(new AetheriaMigrationLedger
await node.MutableDocument<AetheriaMigrationLedger>(AetheriaStateNode.MigrationLedgerKey).ReplaceAsync(new AetheriaMigrationLedger
{
Source = LegacyMigrationBoundary.LegacyGameDataFile,
SourceFingerprint = "smoke",
@ -58,7 +58,7 @@ await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-s
Notes = ["Smoke proves the new state owner can write, flush, reopen, and read without old JSON/Rethink authority."]
});
await node.LegacyCatalogQuarantine().ReplaceAsync(new AetheriaLegacyCatalogQuarantine
await node.MutableDocument<AetheriaLegacyCatalogQuarantine>(AetheriaStateNode.LegacyCatalogQuarantineKey).ReplaceAsync(new AetheriaLegacyCatalogQuarantine
{
RootPath = root,
CapturedAtUtc = now,
@ -77,14 +77,14 @@ await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-s
Notes = ["Smoke proves legacy catalog quarantine state is typed and durable."]
});
await node.Corporation(factionKey).ReplaceAsync(new AetheriaCorporation
await node.MutableDocument<AetheriaCorporation>(factionKey).ReplaceAsync(new AetheriaCorporation
{
Name = "Smoke Faction",
LegacyId = factionLegacyId,
Description = "Typed faction/corporation document for legacy catalog migration smoke."
});
await node.NameFile(nameFileKey).ReplaceAsync(new AetheriaNameFile
await node.MutableDocument<AetheriaNameFile>(nameFileKey).ReplaceAsync(new AetheriaNameFile
{
Name = "Smoke Names",
LegacyId = nameFileLegacyId,
@ -183,7 +183,7 @@ await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-s
verseHostSettings: verseHostSettings,
runtimeSession: await node.MutableDocument<AetheriaRuntimeSession>(AetheriaStateNode.RuntimeSessionKey("smoke-runtime")).ReadAsync()));
await node.LoadoutTemplate(loadoutKey).ReplaceAsync(new AetheriaLoadoutTemplate
await node.MutableDocument<AetheriaLoadoutTemplate>(loadoutKey).ReplaceAsync(new AetheriaLoadoutTemplate
{
Name = "Smoke Aether Runner",
OwnerPlayerKey = "player:smoke",
@ -219,7 +219,7 @@ await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-s
}
});
await node.EntitySnapshot(entityKey).ReplaceAsync(new AetheriaEntitySnapshot
await node.MutableDocument<AetheriaEntitySnapshot>(entityKey).ReplaceAsync(new AetheriaEntitySnapshot
{
Name = "Smoke Aether Runner",
Kind = "ship",
@ -419,7 +419,7 @@ await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-s
]
});
await node.ZoneState(zoneKey).ReplaceAsync(new AetheriaZoneState
await node.MutableDocument<AetheriaZoneState>(zoneKey).ReplaceAsync(new AetheriaZoneState
{
Name = "Smoke Zone",
Position = new AetheriaVector2 { X = 4.0, Y = 8.0 },
@ -479,7 +479,7 @@ await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-s
]
});
await node.RunState(runKey).ReplaceAsync(new AetheriaRunState
await node.MutableDocument<AetheriaRunState>(runKey).ReplaceAsync(new AetheriaRunState
{
RunId = "smoke",
IsTutorial = false,
@ -618,11 +618,11 @@ await using (var node = await AetheriaStateNode.OpenAsync(statePath, "aetheria-s
}
await using (var reopened = await AetheriaStateNode.OpenAsync(statePath, "aetheria-state-smoke-reopen"))
{
var world = await reopened.World().ReadAsync();
var item = await reopened.ItemDefinitionByLegacyId(itemLegacyId).ReadAsync();
var faction = await reopened.CorporationByLegacyId(factionLegacyId).ReadAsync();
var nameFile = await reopened.NameFileByLegacyId(nameFileLegacyId).ReadAsync();
var quarantine = await reopened.LegacyCatalogQuarantine().ReadAsync();
var world = await reopened.MutableDocument<AetheriaWorldState>(AetheriaStateNode.WorldKey).ReadAsync();
var item = await reopened.MutableDocument<AetheriaItemDefinition>(AetheriaCatalogKeys.ItemDefinitionFromLegacyId(itemLegacyId)).ReadAsync();
var faction = await reopened.MutableDocument<AetheriaCorporation>(AetheriaCatalogKeys.CorporationFromLegacyId(factionLegacyId)).ReadAsync();
var nameFile = await reopened.MutableDocument<AetheriaNameFile>(AetheriaCatalogKeys.NameFileFromLegacyId(nameFileLegacyId)).ReadAsync();
var quarantine = await reopened.MutableDocument<AetheriaLegacyCatalogQuarantine>(AetheriaStateNode.LegacyCatalogQuarantineKey).ReadAsync();
var catalogSurface = await reopened.MutableDocument<EveSurfaceState>(AetheriaStateNode.CatalogSurfaceKey).ReadAsync();
var eveCommandStatus = await reopened.MutableDocument<AetheriaEveCommandAcceptanceStatus>(AetheriaStateNode.EveCommandAcceptanceStatusKey).ReadAsync();
var operationsSurface = await reopened.MutableDocument<EveSurfaceState>(AetheriaStateNode.OperationsSurfaceKey).ReadAsync();
@ -640,10 +640,10 @@ await using (var reopened = await AetheriaStateNode.OpenAsync(statePath, "aether
.ReadAsync();
var runtimeSession = await reopened.MutableDocument<AetheriaRuntimeSession>(AetheriaStateNode.RuntimeSessionKey("smoke-runtime")).ReadAsync();
var playerSettings = await reopened.MutableDocument<AetheriaPlayerSettings>(AetheriaStateNode.PlayerSettingsKey).ReadAsync();
var loadout = await reopened.LoadoutTemplate(loadoutKey).ReadAsync();
var runState = await reopened.RunState(runKey).ReadAsync();
var zoneState = await reopened.ZoneState(zoneKey).ReadAsync();
var entitySnapshot = await reopened.EntitySnapshot(entityKey).ReadAsync();
var loadout = await reopened.MutableDocument<AetheriaLoadoutTemplate>(loadoutKey).ReadAsync();
var runState = await reopened.MutableDocument<AetheriaRunState>(runKey).ReadAsync();
var zoneState = await reopened.MutableDocument<AetheriaZoneState>(zoneKey).ReadAsync();
var entitySnapshot = await reopened.MutableDocument<AetheriaEntitySnapshot>(entityKey).ReadAsync();
if (world?.WorldId != "aetheria")
{

View file

@ -106,9 +106,9 @@ await using var node = await AetheriaStateNode.OpenAsync(
"aetheria-state-verify",
enableDurableShardLogs: false);
var ledger = await node.MigrationLedger().ReadAsync()
var ledger = await node.MutableDocument<AetheriaMigrationLedger>(AetheriaStateNode.MigrationLedgerKey).ReadAsync()
?? throw new InvalidOperationException("Missing typed migration ledger.");
var quarantine = await node.LegacyCatalogQuarantine().ReadAsync()
var quarantine = await node.MutableDocument<AetheriaLegacyCatalogQuarantine>(AetheriaStateNode.LegacyCatalogQuarantineKey).ReadAsync()
?? throw new InvalidOperationException("Missing legacy catalog quarantine document.");
var publishedSurface = await node.MutableDocument<EveSurfaceState>(AetheriaStateNode.CatalogSurfaceKey).ReadAsync()
?? throw new InvalidOperationException("Missing Aetheria catalog Eve surface document.");
@ -529,15 +529,15 @@ if (publishedSurface.Schema != surface.Schema ||
await RequireLegacyLookupAsync(
items[0].LegacyId,
() => node.ItemDefinitionByLegacyId(items[0].LegacyId).ReadAsync(),
() => node.MutableDocument<AetheriaItemDefinition>(AetheriaCatalogKeys.ItemDefinitionFromLegacyId(items[0].LegacyId)).ReadAsync(),
"item definition");
await RequireLegacyLookupAsync(
corporations[0].LegacyId,
() => node.CorporationByLegacyId(corporations[0].LegacyId).ReadAsync(),
() => node.MutableDocument<AetheriaCorporation>(AetheriaCatalogKeys.CorporationFromLegacyId(corporations[0].LegacyId)).ReadAsync(),
"corporation");
await RequireLegacyLookupAsync(
nameFiles[0].LegacyId,
() => node.NameFileByLegacyId(nameFiles[0].LegacyId).ReadAsync(),
() => node.MutableDocument<AetheriaNameFile>(AetheriaCatalogKeys.NameFileFromLegacyId(nameFiles[0].LegacyId)).ReadAsync(),
"name file");
if (string.IsNullOrWhiteSpace(quarantine.CatalogFingerprint))
@ -10331,9 +10331,9 @@ static void RequireAetheriaStateNodeUsesManagedPointers(string root)
var stateNode = File.ReadAllText(stateNodePath);
var requiredSymbols = new[]
{
"public CultMeshMutableStatePointer<AetheriaWorldState> World()",
"public CultMeshMutableStatePointer<AetheriaMigrationLedger> MigrationLedger()",
"public CultMeshMutableStatePointer<AetheriaItemDefinition> ItemDefinition(",
"public static CultRecordKey WorldKey { get; }",
"public static CultRecordKey MigrationLedgerKey { get; }",
"public static CultRecordKey LegacyCatalogQuarantineKey { get; }",
"public CultMeshMutableStatePointer<TDocument> MutableDocument<TDocument>(CultRecordKey key)",
"private CultMeshMutableStatePointer<T> MutableDocumentPointer<T>(CultRecordKey key)",
"CultMesh.MutableStatePointer("
@ -10389,6 +10389,19 @@ static void RequireAetheriaStateNodeUsesManagedPointers(string root)
"public Task<AetheriaEntitySnapshot?> GetEntitySnapshotAsync(",
"public Task<CultRecordHandle<AetheriaVerseHostSettings>> PutVerseHostSettingsAsync(",
"public Task<AetheriaVerseHostSettings?> GetVerseHostSettingsAsync(",
"public CultMeshMutableStatePointer<AetheriaWorldState> World()",
"public CultMeshMutableStatePointer<AetheriaMigrationLedger> MigrationLedger()",
"public CultMeshMutableStatePointer<AetheriaLegacyCatalogQuarantine> LegacyCatalogQuarantine()",
"public CultMeshMutableStatePointer<AetheriaItemDefinition> ItemDefinition(",
"public CultMeshMutableStatePointer<AetheriaItemDefinition> ItemDefinitionByLegacyId(",
"public CultMeshMutableStatePointer<AetheriaCorporation> Corporation(",
"public CultMeshMutableStatePointer<AetheriaCorporation> CorporationByLegacyId(",
"public CultMeshMutableStatePointer<AetheriaNameFile> NameFile(",
"public CultMeshMutableStatePointer<AetheriaNameFile> NameFileByLegacyId(",
"public CultMeshMutableStatePointer<AetheriaLoadoutTemplate> LoadoutTemplate(",
"public CultMeshMutableStatePointer<AetheriaRunState> RunState(",
"public CultMeshMutableStatePointer<AetheriaZoneState> ZoneState(",
"public CultMeshMutableStatePointer<AetheriaEntitySnapshot> EntitySnapshot(",
"public CultMeshMutableStatePointer<AetheriaRuntimeDaemonProviderAdvertisementDocument> ProviderAdvertisement()",
"public CultMeshMutableStatePointer<AetheriaRuntimeDaemonHealthDocument> Health()",
"public CultMeshMutableStatePointer<AetheriaRuntimeDaemonCommandBoundaryDocument> CommandBoundary()",
@ -10710,11 +10723,9 @@ static void RequireDaemonVersePublication(string root)
"public CultMeshDocumentHandle<AetheriaRuntimeCatalogSnapshot> RuntimeCatalog()",
"AetheriaRuntimeCatalogStore.OpenReadOnly(StatePath)",
"public CultMeshMutableStatePointer<TDocument> MutableDocument<TDocument>(CultRecordKey key)",
"public CultMeshMutableStatePointer<AetheriaMigrationLedger> MigrationLedger()",
"public CultMeshMutableStatePointer<AetheriaLegacyCatalogQuarantine> LegacyCatalogQuarantine()",
"public CultMeshMutableStatePointer<AetheriaItemDefinition> ItemDefinition(CultRecordKey key)",
"public CultMeshMutableStatePointer<AetheriaCorporation> Corporation(CultRecordKey key)",
"public CultMeshMutableStatePointer<AetheriaNameFile> NameFile(CultRecordKey key)",
"public static CultRecordKey WorldKey { get; }",
"public static CultRecordKey MigrationLedgerKey { get; }",
"public static CultRecordKey LegacyCatalogQuarantineKey { get; }",
"private CultMeshMutableStatePointer<T> MutableDocumentPointer<T>(CultRecordKey key)",
"CultMesh.MutableStatePointer(",
"AetheriaRuntimeVerseRecordKeys.DaemonFrameLatest"
@ -10731,6 +10742,19 @@ static void RequireDaemonVersePublication(string root)
var forbiddenDaemonNodeSymbols = new[]
{
"public CultMeshMutableStatePointer<AetheriaWorldState> World()",
"public CultMeshMutableStatePointer<AetheriaMigrationLedger> MigrationLedger()",
"public CultMeshMutableStatePointer<AetheriaLegacyCatalogQuarantine> LegacyCatalogQuarantine()",
"public CultMeshMutableStatePointer<AetheriaItemDefinition> ItemDefinition(",
"public CultMeshMutableStatePointer<AetheriaItemDefinition> ItemDefinitionByLegacyId(",
"public CultMeshMutableStatePointer<AetheriaCorporation> Corporation(",
"public CultMeshMutableStatePointer<AetheriaCorporation> CorporationByLegacyId(",
"public CultMeshMutableStatePointer<AetheriaNameFile> NameFile(",
"public CultMeshMutableStatePointer<AetheriaNameFile> NameFileByLegacyId(",
"public CultMeshMutableStatePointer<AetheriaLoadoutTemplate> LoadoutTemplate(",
"public CultMeshMutableStatePointer<AetheriaRunState> RunState(",
"public CultMeshMutableStatePointer<AetheriaZoneState> ZoneState(",
"public CultMeshMutableStatePointer<AetheriaEntitySnapshot> EntitySnapshot(",
"public CultMeshMutableStatePointer<AetheriaRuntimeDaemonProviderAdvertisementDocument> ProviderAdvertisement()",
"public CultMeshMutableStatePointer<AetheriaRuntimeDaemonHealthDocument> Health()",
"public CultMeshMutableStatePointer<AetheriaRuntimeDaemonCommandBoundaryDocument> CommandBoundary()",

View file

@ -297,7 +297,7 @@ public static class AetheriaEveCommandBridge
var commit = command.LoadoutTemplate ?? throw new InvalidOperationException(
$"Loadout template command '{command.CommandId}' is missing its typed payload.");
var loadout = AetheriaRuntimeStateMapper.ToLoadoutTemplate(commit, command.IssuedAtUtc);
await node.LoadoutTemplate(AetheriaRuntimeStateMapper.LoadoutKey(loadout.Name))
await node.MutableDocument<AetheriaLoadoutTemplate>(AetheriaRuntimeStateMapper.LoadoutKey(loadout.Name))
.ReplaceAsync(loadout)
.ConfigureAwait(false);
}

View file

@ -116,73 +116,6 @@ public sealed class AetheriaStateNode : IAsyncDisposable, IDisposable
routeHint: new CultMeshRouteHint(CultMeshLocalityKind.SharedMemory, "Aetheria typed catalog state"));
}
public CultMeshMutableStatePointer<AetheriaWorldState> World()
{
return MutableDocumentPointer<AetheriaWorldState>(new CultRecordKey("global:aetheria.world_state.v1"));
}
public CultMeshMutableStatePointer<AetheriaMigrationLedger> MigrationLedger()
{
return MutableDocumentPointer<AetheriaMigrationLedger>(
new CultRecordKey("global:aetheria.migration_ledger.v1"));
}
public CultMeshMutableStatePointer<AetheriaLegacyCatalogQuarantine> LegacyCatalogQuarantine()
{
return MutableDocumentPointer<AetheriaLegacyCatalogQuarantine>(
new CultRecordKey("global:aetheria.legacy_catalog_quarantine.v1"));
}
public CultMeshMutableStatePointer<AetheriaItemDefinition> ItemDefinition(CultRecordKey key)
{
return MutableDocumentPointer<AetheriaItemDefinition>(key);
}
public CultMeshMutableStatePointer<AetheriaItemDefinition> ItemDefinitionByLegacyId(string legacyId)
{
return ItemDefinition(AetheriaCatalogKeys.ItemDefinitionFromLegacyId(legacyId));
}
public CultMeshMutableStatePointer<AetheriaCorporation> Corporation(CultRecordKey key)
{
return MutableDocumentPointer<AetheriaCorporation>(key);
}
public CultMeshMutableStatePointer<AetheriaCorporation> CorporationByLegacyId(string legacyId)
{
return Corporation(AetheriaCatalogKeys.CorporationFromLegacyId(legacyId));
}
public CultMeshMutableStatePointer<AetheriaNameFile> NameFile(CultRecordKey key)
{
return MutableDocumentPointer<AetheriaNameFile>(key);
}
public CultMeshMutableStatePointer<AetheriaNameFile> NameFileByLegacyId(string legacyId)
{
return NameFile(AetheriaCatalogKeys.NameFileFromLegacyId(legacyId));
}
public CultMeshMutableStatePointer<AetheriaLoadoutTemplate> LoadoutTemplate(CultRecordKey key)
{
return MutableDocumentPointer<AetheriaLoadoutTemplate>(key);
}
public CultMeshMutableStatePointer<AetheriaRunState> RunState(CultRecordKey key)
{
return MutableDocumentPointer<AetheriaRunState>(key);
}
public CultMeshMutableStatePointer<AetheriaZoneState> ZoneState(CultRecordKey key)
{
return MutableDocumentPointer<AetheriaZoneState>(key);
}
public CultMeshMutableStatePointer<AetheriaEntitySnapshot> EntitySnapshot(CultRecordKey key)
{
return MutableDocumentPointer<AetheriaEntitySnapshot>(key);
}
public Task<CultRecordHandle<AetheriaRuntimeDaemonCommandDocument>> SubmitDaemonCommandAsync(
AetheriaRuntimeDaemonCommandDocument command)
{
@ -292,6 +225,15 @@ public sealed class AetheriaStateNode : IAsyncDisposable, IDisposable
return new CultRecordKey($"runtime:{runtimeId}:aetheria.runtime_session.v1");
}
public static CultRecordKey WorldKey { get; } =
new("global:aetheria.world_state.v1");
public static CultRecordKey MigrationLedgerKey { get; } =
new("global:aetheria.migration_ledger.v1");
public static CultRecordKey LegacyCatalogQuarantineKey { get; } =
new("global:aetheria.legacy_catalog_quarantine.v1");
public static CultRecordKey CatalogSurfaceKey { get; } =
new(AetheriaCatalogSurfaceProjector.SurfaceKey);