using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Microsoft.CodeAnalysis; using Spherewright.Contracts.Errors; using Spherewright.Contracts.Factory; using Spherewright.Contracts.Logistics; using Spherewright.Contracts.Sessions; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("Spherewright.Contracts")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.3.3.0")] [assembly: AssemblyInformationalVersion("0.3.3+f0cd11105957ae63cb4b45fd5756b0a42508857f")] [assembly: AssemblyProduct("Spherewright.Contracts")] [assembly: AssemblyTitle("Spherewright.Contracts")] [assembly: AssemblyVersion("0.3.3.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Spherewright.Contracts.Versioning { public static class SpherewrightProduct { public const string CurrentVersion = "0.3.3"; } } namespace Spherewright.Contracts.Testing { public sealed class CommitTestWorldRequest { public string PlanToken { get; set; } = string.Empty; public string IdempotencyKey { get; set; } = string.Empty; } public sealed class PreparedTestWorldPlan { public string PlanToken { get; set; } = string.Empty; public DateTimeOffset ExpiresAtUtc { get; set; } public string SaveName { get; set; } = string.Empty; public int GalaxySeed { get; set; } public int StarCount { get; set; } public float ResourceMultiplier { get; set; } public bool PeacefulMode { get; set; } public bool SandboxMode { get; set; } public bool CommitAllowed { get; set; } public List Warnings { get; set; } = new List(); } public sealed class PrepareTestWorldRequest { public int GalaxySeed { get; set; } = 13572468; public int StarCount { get; set; } = 32; } public sealed class TestWorldCreationResult { public string ActionId { get; set; } = string.Empty; public bool Accepted { get; set; } public bool IdempotentReplay { get; set; } public string SaveName { get; set; } = string.Empty; public int GalaxySeed { get; set; } public int StarCount { get; set; } public string State { get; set; } = string.Empty; } } namespace Spherewright.Contracts.Sessions { public sealed class BridgeStatus { public bool BridgeConnected { get; set; } public string BridgeInstanceId { get; set; } = string.Empty; public string PluginVersion { get; set; } = string.Empty; public int ProtocolVersion { get; set; } public string GameVersion { get; set; } = string.Empty; public bool GameLoaded { get; set; } public bool WritesConfigured { get; set; } public string WriteHealth { get; set; } = "healthy"; } public sealed class PrepareFlightCheckpointReloadRequest { public string ReloadToken { get; set; } = string.Empty; } public sealed class CommitFlightCheckpointReloadRequest { public string PlanToken { get; set; } = string.Empty; public string IdempotencyKey { get; set; } = string.Empty; } public sealed class PreparedFlightCheckpointReloadPlan { public bool Prepared { get; set; } public string PlanToken { get; set; } = string.Empty; public DateTimeOffset ExpiresAtUtc { get; set; } public string CheckpointId { get; set; } = string.Empty; public int OriginPlanetId { get; set; } public int DestinationPlanetId { get; set; } public long SavedGameTick { get; set; } public bool CommitAllowedNow { get; set; } public List CommitBlockers { get; set; } = new List(); public string CompletionCondition { get; set; } = string.Empty; } public sealed class FlightCheckpointReloadResult { public string ActionId { get; set; } = string.Empty; public string CheckpointId { get; set; } = string.Empty; public bool Accepted { get; set; } public bool IdempotentReplay { get; set; } public string State { get; set; } = string.Empty; } public sealed class LocalPlanetRequest { public int PlanetId { get; set; } } public static class OwnedSaveStates { public const string None = "none"; public const string WaitingForWorld = "waiting_for_world"; public const string WaitingToSave = "waiting_to_save"; public const string Saved = "saved"; public const string SaveFailed = "save_failed"; } public sealed class PrepareOwnedWorldResumeRequest { public string ResumeToken { get; set; } = string.Empty; } public sealed class CommitOwnedWorldResumeRequest { public string PlanToken { get; set; } = string.Empty; public string IdempotencyKey { get; set; } = string.Empty; } public sealed class PreparedOwnedWorldResumePlan { public bool Prepared { get; set; } public string PlanToken { get; set; } = string.Empty; public DateTimeOffset ExpiresAtUtc { get; set; } public int ExpectedPlanetId { get; set; } public long MinimumGameTick { get; set; } public bool CommitAllowedNow { get; set; } public List CommitBlockers { get; set; } = new List(); public string CompletionCondition { get; set; } = string.Empty; } public sealed class OwnedWorldResumeResult { public string ActionId { get; set; } = string.Empty; public bool Accepted { get; set; } public bool IdempotentReplay { get; set; } public string State { get; set; } = string.Empty; } public static class PeacefulModeStates { public const string ConfirmedPeaceful = "confirmed_peaceful"; public const string ConfirmedCombat = "confirmed_combat"; public const string Unknown = "unknown"; } public static class SandboxModeStates { public const string ConfirmedDisabled = "confirmed_disabled"; public const string Enabled = "enabled"; public const string Unknown = "unknown"; } public sealed class SessionState { public bool BridgeConnected { get; set; } public bool GameLoaded { get; set; } public bool OwnedBySpherewright { get; set; } public bool AccessRestricted { get; set; } public string GameVersion { get; set; } = string.Empty; public string? SessionId { get; set; } public string? SaveName { get; set; } public long? GameTick { get; set; } public long Revision { get; set; } public int? LocalPlanetId { get; set; } public string? LocalPlanetName { get; set; } public string PeacefulMode { get; set; } = "unknown"; public string SandboxMode { get; set; } = "unknown"; public float? ResourceMultiplier { get; set; } public bool WritesAllowed { get; set; } public string WriteHealth { get; set; } = "healthy"; public string? WriteQuarantineActionId { get; set; } public List WriteBlockers { get; set; } = new List(); public string OwnedSaveState { get; set; } = "none"; public string? OwnedSaveError { get; set; } public long? LastOwnedSaveGameTick { get; set; } public bool RestartResumeAvailable { get; set; } public string? RestartResumeToken { get; set; } public bool FlightCheckpointAvailable { get; set; } public string? FlightCheckpointId { get; set; } public string? FlightCheckpointReloadToken { get; set; } public int? FlightCheckpointOriginPlanetId { get; set; } public int? FlightCheckpointDestinationPlanetId { get; set; } public long? FlightCheckpointGameTick { get; set; } public bool CurrentSessionLoadedFromFlightCheckpoint { get; set; } public bool UserSaveImportConfigured { get; set; } public List Capabilities { get; set; } = new List(); } public sealed class PrepareUserSaveImportRequest { public long ExpectedRevision { get; set; } } public sealed class CommitUserSaveImportRequest { public string PlanToken { get; set; } = string.Empty; public string IdempotencyKey { get; set; } = string.Empty; public bool UserConfirmedInConversation { get; set; } public bool AcknowledgeOriginalSaveRemainsUnchanged { get; set; } public bool AcknowledgeJournalStartsAtImport { get; set; } } public sealed class PreparedUserSaveImportPlan { public bool Prepared { get; set; } public string PlanToken { get; set; } = string.Empty; public DateTimeOffset ExpiresAtUtc { get; set; } public long ExpectedRevision { get; set; } public bool OriginalSavePreserved { get; set; } = true; public string JournalTrackingMode { get; set; } = "attached_existing_save"; public bool HistoricalCoverageComplete { get; set; } public bool UserConfirmationRequired { get; set; } = true; public string ConfirmationPrompt { get; set; } = string.Empty; public bool CommitAllowedNow { get; set; } public List CommitBlockers { get; set; } = new List(); public string CompletionCondition { get; set; } = string.Empty; } public sealed class UserSaveImportResult { public string ActionId { get; set; } = string.Empty; public bool Accepted { get; set; } public bool IdempotentReplay { get; set; } public string State { get; set; } = string.Empty; public string? SessionId { get; set; } public int? PlanetId { get; set; } public long? SavedGameTick { get; set; } public bool OriginalSavePreserved { get; set; } = true; public string JournalTrackingMode { get; set; } = "attached_existing_save"; public bool HistoricalCoverageComplete { get; set; } } public sealed class WriteBlocker { public string Code { get; set; } = string.Empty; public string Message { get; set; } = string.Empty; } public static class WriteHealthStates { public const string Healthy = "healthy"; public const string Quarantined = "quarantined"; } } namespace Spherewright.Contracts.Resources { public static class ResourceNodeKinds { public const string Vein = "vein"; public const string Vegetation = "vegetation"; } public sealed class ListResourceNodesRequest { public int PlanetId { get; set; } public string? Kind { get; set; } public string? ResourceType { get; set; } public int? ProductItemId { get; set; } public int Limit { get; set; } = 50; public string? Cursor { get; set; } } public sealed class ListResourceNodesResult { public string SessionId { get; set; } = string.Empty; public int PlanetId { get; set; } public long CapturedAtGameTick { get; set; } public string SnapshotId { get; set; } = string.Empty; public DateTimeOffset SnapshotExpiresAtUtc { get; set; } public List Nodes { get; set; } = new List(); public string? NextCursor { get; set; } } public sealed class InspectResourceNodeRequest { public int PlanetId { get; set; } public string Kind { get; set; } = string.Empty; public int NodeId { get; set; } } public sealed class ResourceNodeSnapshot { public string SessionId { get; set; } = string.Empty; public int PlanetId { get; set; } public string Kind { get; set; } = string.Empty; public int NodeId { get; set; } public string ResourceType { get; set; } = string.Empty; public int ProtoId { get; set; } public string Name { get; set; } = string.Empty; public int RemainingAmount { get; set; } public int GroupIndex { get; set; } public int MinerCount { get; set; } public Vector3Snapshot Position { get; set; } = new Vector3Snapshot(); public float DistanceFromPlayer { get; set; } public bool SameLocalPlanet { get; set; } public bool WithinPlayerBuildArea { get; set; } public List Yields { get; set; } = new List(); public long CapturedAtGameTick { get; set; } public string StateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class ResourceYieldSnapshot { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int Count { get; set; } public float Chance { get; set; } } } namespace Spherewright.Contracts.Protocol { public sealed class BridgeEnvelopeHeader { public int ProtocolVersion { get; set; } public string MessageType { get; set; } = string.Empty; public string RequestId { get; set; } = string.Empty; public string? SessionId { get; set; } public string? Method { get; set; } } public static class BridgeMessageTypes { public const string Handshake = "handshake"; public const string Request = "request"; public const string Response = "response"; public const string Event = "event"; } public static class BridgeMethods { public const string GetBridgeStatus = "get_bridge_status"; public const string GetSessionState = "get_session_state"; public const string GetPlayerState = "get_player_state"; public const string GetProgressionState = "get_progression_state"; public const string GetGameplayJournal = "get_gameplay_journal"; public const string GetLocalStarSystem = "get_local_star_system"; public const string GetRecipeCatalog = "get_recipe_catalog"; public const string ListResourceNodes = "list_resource_nodes"; public const string InspectResourceNode = "inspect_resource_node"; public const string ListFactoryEntities = "list_factory_entities"; public const string InspectFactoryEntity = "inspect_factory_entity"; public const string GetPowerSummary = "get_power_summary"; public const string GetActionResult = "get_action_result"; public const string ListAssemblers = "list_assemblers"; public const string InspectAssembler = "inspect_assembler"; public const string GetBuildCatalog = "get_build_catalog"; public const string PrepareNewGame = "prepare_new_game"; public const string CommitNewGame = "commit_new_game"; public const string PrepareImportCurrentGame = "prepare_import_current_game"; public const string CommitImportCurrentGame = "commit_import_current_game"; public const string PrepareMove = "prepare_move"; public const string CommitMove = "commit_move"; public const string PrepareInterplanetaryFlight = "prepare_interplanetary_flight"; public const string CommitInterplanetaryFlight = "commit_interplanetary_flight"; public const string PrepareHarvest = "prepare_harvest"; public const string CommitHarvest = "commit_harvest"; public const string PrepareHandcraft = "prepare_handcraft"; public const string CommitHandcraft = "commit_handcraft"; public const string PrepareSelectResearch = "prepare_select_research"; public const string CommitSelectResearch = "commit_select_research"; public const string PrepareBuild = "prepare_build"; public const string CommitBuild = "commit_build"; public const string PrepareDismantle = "prepare_dismantle"; public const string CommitDismantle = "commit_dismantle"; public const string PrepareConfigureBuilding = "prepare_configure_building"; public const string CommitConfigureBuilding = "commit_configure_building"; public const string PrepareTransfer = "prepare_transfer"; public const string CommitTransfer = "commit_transfer"; public const string PrepareLogisticsStationFleetTransfer = "prepare_logistics_station_fleet_transfer"; public const string CommitLogisticsStationFleetTransfer = "commit_logistics_station_fleet_transfer"; public const string PrepareRefuel = "prepare_refuel"; public const string CommitRefuel = "commit_refuel"; public const string PrepareSave = "prepare_save"; public const string CommitSave = "commit_save"; public const string PrepareQuarantineReconciliation = "prepare_quarantine_reconciliation"; public const string CommitQuarantineReconciliation = "commit_quarantine_reconciliation"; public const string PrepareResumeOwnedGame = "prepare_resume_owned_game"; public const string CommitResumeOwnedGame = "commit_resume_owned_game"; public const string PrepareReloadFlightCheckpoint = "prepare_reload_flight_checkpoint"; public const string CommitReloadFlightCheckpoint = "commit_reload_flight_checkpoint"; } public sealed class BridgeRequestEnvelope { public int ProtocolVersion { get; set; } = 1; public string MessageType { get; set; } = "request"; public string RequestId { get; set; } = string.Empty; public string? SessionId { get; set; } public string? Method { get; set; } public TPayload Payload { get; set; } } public sealed class BridgeResponseEnvelope { public int ProtocolVersion { get; set; } = 1; public string MessageType { get; set; } = "response"; public string RequestId { get; set; } = string.Empty; public string? SessionId { get; set; } public bool Success { get; set; } public TResult? Result { get; set; } public BridgeError? Error { get; set; } } public sealed class BridgeRuntimeDescriptor { public int ProcessId { get; set; } public string BridgeInstanceId { get; set; } = string.Empty; public string PipeName { get; set; } = string.Empty; public string AuthToken { get; set; } = string.Empty; public int ProtocolVersion { get; set; } = 1; public string PluginVersion { get; set; } = string.Empty; public DateTimeOffset CreatedAtUtc { get; set; } } public sealed class EmptyPayload { } public sealed class HandshakeRequest { public string BridgeInstanceId { get; set; } = string.Empty; public string AuthToken { get; set; } = string.Empty; public string ClientName { get; set; } = string.Empty; public string ClientVersion { get; set; } = string.Empty; } public sealed class HandshakeResponse { public bool Accepted { get; set; } public string BridgeInstanceId { get; set; } = string.Empty; public int ProtocolVersion { get; set; } = 1; public string PluginVersion { get; set; } = string.Empty; } public static class ProtocolConstants { public const int CurrentVersion = 1; public const int DefaultMaxFrameBytes = 1048576; } } namespace Spherewright.Contracts.Progression { public sealed class ProgressionStateSnapshot { public string SessionId { get; set; } = string.Empty; public int PlanetId { get; set; } public long CapturedAtGameTick { get; set; } public string StateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; public string SelectionStateHash { get; set; } = string.Empty; public int SelectionStateHashVersion { get; set; } = 1; public int CurrentTechId { get; set; } public string? CurrentTechName { get; set; } public List TechQueue { get; set; } = new List(); public List Technologies { get; set; } = new List(); } public sealed class TechStateSnapshot { public int TechId { get; set; } public string Name { get; set; } = string.Empty; public bool Unlocked { get; set; } public int CurrentLevel { get; set; } public int MaximumLevel { get; set; } public long HashUploaded { get; set; } public long HashRequired { get; set; } public long UnlockTick { get; set; } public bool IsLabTech { get; set; } public bool IsQueued { get; set; } public List PrerequisiteTechIds { get; set; } = new List(); public List UnlockRecipeIds { get; set; } = new List(); public List MatrixRequirements { get; set; } = new List(); public List ItemRequirements { get; set; } = new List(); } public sealed class TechMatrixRequirement { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int PointsPerHash { get; set; } public long RequiredItemCount { get; set; } } public sealed class TechItemRequirement { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int PointsPerHash { get; set; } public long RequiredItemCount { get; set; } public bool IsMatrix { get; set; } } public sealed class RecipeCatalogSnapshot { public string SessionId { get; set; } = string.Empty; public int PlanetId { get; set; } public long CapturedAtGameTick { get; set; } public List Items { get; set; } = new List(); public List Recipes { get; set; } = new List(); public RuntimeDependencyGraph FirstRedMatrixDependencies { get; set; } = new RuntimeDependencyGraph(); } public sealed class ItemCatalogEntry { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int StackSize { get; set; } public bool IsRaw { get; set; } public bool CanBuild { get; set; } public bool Unlocked { get; set; } public int? HandcraftRecipeId { get; set; } } public sealed class RecipeCatalogEntry { public int RecipeId { get; set; } public string Name { get; set; } = string.Empty; public string RecipeType { get; set; } = string.Empty; public bool Handcraft { get; set; } public bool Unlocked { get; set; } public int TimeSpend { get; set; } public int? PrerequisiteTechId { get; set; } public string? PrerequisiteTechName { get; set; } public List Inputs { get; set; } = new List(); public List Outputs { get; set; } = new List(); } public sealed class CatalogItemAmount { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int Count { get; set; } } public sealed class RuntimeDependencyGraph { public int TargetItemId { get; set; } public string TargetItemName { get; set; } = string.Empty; public List ItemIds { get; set; } = new List(); public List RecipeIds { get; set; } = new List(); public List Edges { get; set; } = new List(); } public sealed class RuntimeDependencyEdge { public string FromKind { get; set; } = string.Empty; public int FromId { get; set; } public string ToKind { get; set; } = string.Empty; public int ToId { get; set; } } } namespace Spherewright.Contracts.Power { public sealed class PowerSummarySnapshot { public string SessionId { get; set; } = string.Empty; public int PlanetId { get; set; } public long CapturedAtGameTick { get; set; } public long TotalEnergyRequired { get; set; } public long TotalEnergyServed { get; set; } public long TotalEnergyCapacity { get; set; } public long TotalEnergyGenerated { get; set; } public List Networks { get; set; } = new List(); } public sealed class PowerNetworkSnapshot { public int NetworkId { get; set; } public int NodeCount { get; set; } public int ConsumerCount { get; set; } public int GeneratorCount { get; set; } public int AccumulatorCount { get; set; } public int ExchangerCount { get; set; } public long EnergyRequired { get; set; } public long EnergyServed { get; set; } public long EnergyCapacity { get; set; } public long EnergyGenerated { get; set; } public long EnergyStored { get; set; } public double ConsumerRatio { get; set; } public double GeneratorRatio { get; set; } } } namespace Spherewright.Contracts.Players { public sealed class PlayerStateSnapshot { public string SessionId { get; set; } = string.Empty; public int PlanetId { get; set; } public long CapturedAtGameTick { get; set; } public string StateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; public Vector3Snapshot Position { get; set; } = new Vector3Snapshot(); public string MovementState { get; set; } = string.Empty; public bool IsAlive { get; set; } public bool IsOnPlanet { get; set; } public bool IsFlying { get; set; } public bool IsSailing { get; set; } public float Speed { get; set; } public double CoreEnergy { get; set; } public double CoreEnergyCapacity { get; set; } public double ReactorEnergy { get; set; } public int ReactorItemId { get; set; } public string? ReactorItemName { get; set; } public int ReactorItemInc { get; set; } public bool AutoReplenishFuel { get; set; } public int FuelStorageSlotCount { get; set; } public int FuelStorageOccupiedSlotCount { get; set; } public List FuelStorage { get; set; } = new List(); public float BuildArea { get; set; } public int InventorySlotCount { get; set; } public int InventoryOccupiedSlotCount { get; set; } public List Inventory { get; set; } = new List(); public PlayerInventoryItem? InHandItem { get; set; } public bool AutoManageResearchItems { get; set; } public double MechaResearchPower { get; set; } public List MechaResearchItemBuffer { get; set; } = new List(); public List HandcraftQueue { get; set; } = new List(); public ConstructionDroneSnapshot ConstructionDrones { get; set; } = new ConstructionDroneSnapshot(); } public sealed class MechaResearchItemSnapshot { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int PointCount { get; set; } public int WholeItemCount { get; set; } public int RemainderPoints { get; set; } } public sealed class PlayerInventoryItem { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int Count { get; set; } public int Inc { get; set; } public int SlotCount { get; set; } } public sealed class HandcraftTaskSnapshot { public int QueueIndex { get; set; } public int RecipeId { get; set; } public string RecipeName { get; set; } = string.Empty; public int RemainingCraftCount { get; set; } public int Progress { get; set; } public int ProgressRequired { get; set; } public int ParentTaskIndex { get; set; } public bool IngredientsReserved { get; set; } public List Inputs { get; set; } = new List(); public List Outputs { get; set; } = new List(); } public sealed class PlayerItemAmount { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int Count { get; set; } public int BufferedCount { get; set; } } public sealed class ConstructionDroneSnapshot { public bool Enabled { get; set; } public bool ConstructionEnabled { get; set; } public int Total { get; set; } public int Alive { get; set; } public int Idle { get; set; } public int Working { get; set; } public int PendingBuildTargets { get; set; } public int PendingRepairTargets { get; set; } } } namespace Spherewright.Contracts.Logistics { public sealed class LogisticsStationSnapshot { public string SessionId { get; set; } = string.Empty; public int PlanetId { get; set; } public int EntityId { get; set; } public int StationId { get; set; } public int GalacticStationId { get; set; } public int BuildingItemId { get; set; } public string BuildingName { get; set; } = string.Empty; public Vector3Snapshot Position { get; set; } = new Vector3Snapshot(); public bool IsInterstellar { get; set; } public bool IsCollector { get; set; } public bool IsVeinCollector { get; set; } public int? PowerNetworkId { get; set; } public double? PowerServeRatio { get; set; } public long Energy { get; set; } public long EnergyCapacity { get; set; } public long RequestedChargeEnergyPerTick { get; set; } public long RequestedChargePowerWatts { get; set; } public long MaximumChargeEnergyPerTick { get; set; } public long MaximumChargePowerWatts { get; set; } public int WarperCount { get; set; } public int WarperCapacity { get; set; } public int IdleDroneCount { get; set; } public int DroneCapacity { get; set; } public int WorkingDroneCount { get; set; } public int IdleVesselCount { get; set; } public int VesselCapacity { get; set; } public int WorkingVesselCount { get; set; } public double DroneTripRangeRaw { get; set; } public double VesselTripRangeRaw { get; set; } public bool IncludeOrbitCollectors { get; set; } public double WarpEnableDistanceRaw { get; set; } public bool WarpersRequired { get; set; } public int DroneDeliverySetting { get; set; } public int VesselDeliverySetting { get; set; } public int PilerCount { get; set; } public bool DroneAutoReplenish { get; set; } public bool VesselAutoReplenish { get; set; } public long RemoteGroupMask { get; set; } public string RemoteRoutePriority { get; set; } = string.Empty; public List NeededItemIds { get; set; } = new List(); public List StorageSlots { get; set; } = new List(); public List BeltSlots { get; set; } = new List(); public long CapturedAtGameTick { get; set; } public string StateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; public string ConfigurationStateHash { get; set; } = string.Empty; public int ConfigurationStateHashVersion { get; set; } = 1; public string FleetStateHash { get; set; } = string.Empty; public int FleetStateHashVersion { get; set; } = 1; } public sealed class LogisticsStationStorageSlotSnapshot { public int Index { get; set; } public int ItemId { get; set; } public string? ItemName { get; set; } public int Count { get; set; } public int Inc { get; set; } public int MaximumCount { get; set; } public int LocalOrder { get; set; } public int RemoteOrder { get; set; } public int TotalOrdered { get; set; } public int LocalSupplyCount { get; set; } public int LocalDemandCount { get; set; } public int RemoteSupplyCount { get; set; } public int RemoteDemandCount { get; set; } public string LocalLogic { get; set; } = string.Empty; public string RemoteLogic { get; set; } = string.Empty; public int KeepMode { get; set; } public float KeepIncRatio { get; set; } } public sealed class LogisticsStationBeltSlotSnapshot { public int Index { get; set; } public string Direction { get; set; } = string.Empty; public int BeltComponentId { get; set; } public int BeltEntityId { get; set; } public int StorageIndex { get; set; } public int Counter { get; set; } } } namespace Spherewright.Contracts.Journals { public static class GameplayJournalEventKinds { public const string ManualItemFirst = "manual_item_first"; public const string ProductionLineItemFirst = "production_line_item_first"; public const string TechnologyFirstSelected = "technology_first_selected"; public const string UpgradeFirstSelected = "upgrade_first_selected"; } public static class GameplayJournalTrackingModes { public const string FromNewGame = "from_new_game"; public const string AttachedExistingSave = "attached_existing_save"; } public sealed class GameplayJournalSnapshot { public string SessionId { get; set; } = string.Empty; public string JournalId { get; set; } = string.Empty; public string TrackingMode { get; set; } = string.Empty; public bool HistoricalCoverageComplete { get; set; } public string CreatedAtActualTime { get; set; } = string.Empty; public long TrackingStartedAtGameTick { get; set; } public string TrackingStartedAtGameTime { get; set; } = string.Empty; public long CapturedAtGameTick { get; set; } public long DurableThroughSequence { get; set; } public bool PersistencePending { get; set; } public string? PersistenceError { get; set; } public List Entries { get; set; } = new List(); } public sealed class GameplayJournalEntry { public long Sequence { get; set; } public string Kind { get; set; } = string.Empty; public int ItemId { get; set; } public int TechId { get; set; } public string Name { get; set; } = string.Empty; public long ObservedCount { get; set; } public string ActualTime { get; set; } = string.Empty; public long GameTick { get; set; } public string GameTime { get; set; } = string.Empty; public string Source { get; set; } = string.Empty; } } namespace Spherewright.Contracts.Factory { public sealed class AssemblerSnapshot { public int PlanetId { get; set; } public int EntityId { get; set; } public int ComponentId { get; set; } public int BuildingItemId { get; set; } public string BuildingName { get; set; } = string.Empty; public int RecipeId { get; set; } public string? RecipeName { get; set; } public int TimeSpent { get; set; } public int TimeRequired { get; set; } public bool IsWorking { get; set; } public Vector3Snapshot Position { get; set; } = new Vector3Snapshot(); public long Revision { get; set; } } public sealed class BasicProductionLinePlan { public string PlanToken { get; set; } = string.Empty; public DateTimeOffset ExpiresAtUtc { get; set; } public string SessionId { get; set; } = string.Empty; public long ExpectedRevision { get; set; } public bool DryRun { get; set; } = true; public bool CommitAllowed { get; set; } public int RecipeId { get; set; } public string RecipeName { get; set; } = string.Empty; public int InputItemId { get; set; } public string InputItemName { get; set; } = string.Empty; public int InputItemCount { get; set; } public int OutputItemId { get; set; } public string OutputItemName { get; set; } = string.Empty; public List Buildings { get; set; } = new List(); public List Warnings { get; set; } = new List(); } public sealed class PlannedBuildingSnapshot { public string Role { get; set; } = string.Empty; public int ItemId { get; set; } public string ItemName { get; set; } = string.Empty; public Vector3Snapshot Position { get; set; } = new Vector3Snapshot(); } public sealed class BasicProductionLineResult { public string ActionId { get; set; } = string.Empty; public bool Completed { get; set; } public bool Changed { get; set; } public bool IdempotentReplay { get; set; } public string SessionId { get; set; } = string.Empty; public long Revision { get; set; } public int RecipeId { get; set; } public int InputItemId { get; set; } public int InputItemCount { get; set; } public int OutputItemId { get; set; } public BasicProductionLineEntities Entities { get; set; } = new BasicProductionLineEntities(); public bool RecipeVerified { get; set; } public bool ConnectionsVerified { get; set; } public bool InputStockVerified { get; set; } public bool Saved { get; set; } public string ProductionState { get; set; } = string.Empty; } public sealed class BasicProductionLineEntities { public int InputStorageEntityId { get; set; } public int AssemblerEntityId { get; set; } public int OutputStorageEntityId { get; set; } public int InputInserterEntityId { get; set; } public int OutputInserterEntityId { get; set; } public int PowerGeneratorEntityId { get; set; } } public sealed class BasicProductionLineSnapshot { public string ActionId { get; set; } = string.Empty; public string SessionId { get; set; } = string.Empty; public long Revision { get; set; } public bool StructureValid { get; set; } public bool ConnectionsValid { get; set; } public bool RecipeValid { get; set; } public bool PowerNetworkValid { get; set; } public bool Producing { get; set; } public string ProductionState { get; set; } = string.Empty; public int RecipeId { get; set; } public int InputItemId { get; set; } public int InputStorageCount { get; set; } public int OutputItemId { get; set; } public int OutputStorageCount { get; set; } public bool AssemblerWorking { get; set; } public BasicProductionLineEntities Entities { get; set; } = new BasicProductionLineEntities(); } public sealed class BuildCatalog { public int PlanetId { get; set; } public long Revision { get; set; } public Vector3Snapshot PlayerPosition { get; set; } = new Vector3Snapshot(); public float PlayerBuildArea { get; set; } public bool SandboxToolsEnabled { get; set; } public List Buildings { get; set; } = new List(); public List Recipes { get; set; } = new List(); public BasicLineRecommendation? RecommendedBasicLine { get; set; } } public sealed class BuildCatalogItem { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public string Role { get; set; } = string.Empty; public int ModelIndex { get; set; } public int Grade { get; set; } public int BuildMode { get; set; } public bool Unlocked { get; set; } public bool Available { get; set; } public string RecipeType { get; set; } = string.Empty; public int SlotCount { get; set; } public float RoughRadius { get; set; } public float PowerConnectDistance { get; set; } public float PowerCoverRadius { get; set; } } public sealed class BuildCatalogRecipe { public int RecipeId { get; set; } public string Name { get; set; } = string.Empty; public string RecipeType { get; set; } = string.Empty; public bool Unlocked { get; set; } public int TimeSpend { get; set; } public List Inputs { get; set; } = new List(); public List Outputs { get; set; } = new List(); } public sealed class BuildCatalogIngredient { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int Count { get; set; } public bool RawMaterial { get; set; } } public sealed class BasicLineRecommendation { public int StorageItemId { get; set; } public int AssemblerItemId { get; set; } public int InserterItemId { get; set; } public int PowerGeneratorItemId { get; set; } public int RecipeId { get; set; } public int InputItemId { get; set; } public int OutputItemId { get; set; } } public sealed class CommitBasicProductionLineRequest { public string PlanToken { get; set; } = string.Empty; public string IdempotencyKey { get; set; } = string.Empty; } public static class FactoryObjectKinds { public const string Entity = "entity"; public const string Prebuild = "prebuild"; } public sealed class ListFactoryEntitiesRequest { public int PlanetId { get; set; } public string? ObjectKind { get; set; } public string? ComponentKind { get; set; } public int? ItemId { get; set; } public int Limit { get; set; } = 50; public string? Cursor { get; set; } } public sealed class ListFactoryEntitiesResult { public string SessionId { get; set; } = string.Empty; public int PlanetId { get; set; } public long CapturedAtGameTick { get; set; } public string SnapshotId { get; set; } = string.Empty; public DateTimeOffset SnapshotExpiresAtUtc { get; set; } public List Entities { get; set; } = new List(); public string? NextCursor { get; set; } } public sealed class InspectFactoryEntityRequest { public int PlanetId { get; set; } public int ObjectId { get; set; } } public sealed class FactoryEntitySnapshot { public string SessionId { get; set; } = string.Empty; public int PlanetId { get; set; } public int ObjectId { get; set; } public string ObjectKind { get; set; } = string.Empty; public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public string ComponentKind { get; set; } = string.Empty; public Vector3Snapshot Position { get; set; } = new Vector3Snapshot(); public QuaternionSnapshot Rotation { get; set; } = new QuaternionSnapshot(); public int RecipeId { get; set; } public string? RecipeName { get; set; } public bool IsWorking { get; set; } public int Progress { get; set; } public int ProgressRequired { get; set; } public int? PowerNetworkId { get; set; } public long? PowerDemandPerTick { get; set; } public double? PowerServeRatio { get; set; } public List Connections { get; set; } = new List(); public List Buffers { get; set; } = new List(); public List ResourceNodeIds { get; set; } = new List(); public LogisticsStationSnapshot? LogisticsStation { get; set; } public int? PickTargetObjectId { get; set; } public int? InsertTargetObjectId { get; set; } public int? FilterItemId { get; set; } public string? FilterItemName { get; set; } public string? InserterStage { get; set; } public int? InserterStackCount { get; set; } public int? RequiredBuildItemCount { get; set; } public float? ConstructionProgress { get; set; } public long CapturedAtGameTick { get; set; } public string StateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; public string ConfigurationStateHash { get; set; } = string.Empty; public int ConfigurationStateHashVersion { get; set; } = 1; public string EndpointStateHash { get; set; } = string.Empty; public int EndpointStateHashVersion { get; set; } = 1; } public sealed class QuaternionSnapshot { public float X { get; set; } public float Y { get; set; } public float Z { get; set; } public float W { get; set; } } public sealed class FactoryConnectionSnapshot { public int Slot { get; set; } public bool IsOutput { get; set; } public int OtherObjectId { get; set; } public int OtherSlot { get; set; } } public sealed class FactoryBufferSnapshot { public string Role { get; set; } = string.Empty; public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int Count { get; set; } public int Inc { get; set; } } public sealed class InspectAssemblerRequest { public int EntityId { get; set; } } public sealed class InspectBasicProductionLineRequest { public string ActionId { get; set; } = string.Empty; } public sealed class ListAssemblersRequest { public int Limit { get; set; } = 50; public string? Cursor { get; set; } } public sealed class ListAssemblersResult { public List Assemblers { get; set; } = new List(); public string? NextCursor { get; set; } public long Revision { get; set; } } public sealed class PrepareBasicProductionLineRequest { public long ExpectedRevision { get; set; } public int InputItemCount { get; set; } = 20; } public sealed class Vector3Snapshot { public float X { get; set; } public float Y { get; set; } public float Z { get; set; } } } namespace Spherewright.Contracts.Errors { public sealed class BridgeError { public string Code { get; set; } = string.Empty; public string Message { get; set; } = string.Empty; public bool Retryable { get; set; } public string Recovery { get; set; } = string.Empty; public static BridgeError Create(string code, string message, bool retryable, string recovery) { return new BridgeError { Code = code, Message = message, Retryable = retryable, Recovery = recovery }; } } public static class BridgeErrorCodes { public const string BridgeNotReady = "BRIDGE_NOT_READY"; public const string AuthFailed = "AUTH_FAILED"; public const string ServerBusy = "SERVER_BUSY"; public const string QueueFull = "QUEUE_FULL"; public const string GameNotLoaded = "GAME_NOT_LOADED"; public const string NoLocalPlanet = "NO_LOCAL_PLANET"; public const string UnsupportedGameVersion = "UNSUPPORTED_GAME_VERSION"; public const string PeacefulModeRequired = "PEACEFUL_MODE_REQUIRED"; public const string PeacefulModeUnknown = "PEACEFUL_MODE_UNKNOWN"; public const string SandboxModeActive = "SANDBOX_MODE_ACTIVE"; public const string SandboxModeUnknown = "SANDBOX_MODE_UNKNOWN"; public const string NormalResourceMultiplierRequired = "NORMAL_RESOURCE_MULTIPLIER_REQUIRED"; public const string WritesDisabled = "WRITES_DISABLED"; public const string UserConfirmationRequired = "USER_CONFIRMATION_REQUIRED"; public const string WriteSubsystemQuarantined = "WRITE_SUBSYSTEM_QUARANTINED"; public const string InvalidRequest = "INVALID_REQUEST"; public const string InvalidEntity = "INVALID_ENTITY"; public const string InvalidResourceTarget = "INVALID_RESOURCE_TARGET"; public const string TargetIdentityMismatch = "TARGET_IDENTITY_MISMATCH"; public const string InvalidRecipe = "INVALID_RECIPE"; public const string RecipeNotSupportedByBuilding = "RECIPE_NOT_SUPPORTED_BY_BUILDING"; public const string RecipeLocked = "RECIPE_LOCKED"; public const string InvalidTechnology = "INVALID_TECHNOLOGY"; public const string TechnologyLocked = "TECHNOLOGY_LOCKED"; public const string TechnologyPrerequisiteNotMet = "TECHNOLOGY_PREREQUISITE_NOT_MET"; public const string TargetOutOfRange = "TARGET_OUT_OF_RANGE"; public const string TargetUnreachable = "TARGET_UNREACHABLE"; public const string PlayerStateUnavailable = "PLAYER_STATE_UNAVAILABLE"; public const string PlayerBusy = "PLAYER_BUSY"; public const string InventoryInsufficient = "INVENTORY_INSUFFICIENT"; public const string InventoryFull = "INVENTORY_FULL"; public const string MechaEnergyInsufficient = "MECHA_ENERGY_INSUFFICIENT"; public const string BuildLocationInvalid = "BUILD_LOCATION_INVALID"; public const string BuildItemMissing = "BUILD_ITEM_MISSING"; public const string BuildConnectionInvalid = "BUILD_CONNECTION_INVALID"; public const string PrebuildNotCompleted = "PREBUILD_NOT_COMPLETED"; public const string NoPower = "NO_POWER"; public const string AssemblerNotIdle = "ASSEMBLER_NOT_IDLE"; public const string AssemblerBuffersNotEmpty = "ASSEMBLER_BUFFERS_NOT_EMPTY"; public const string StaleSession = "STALE_SESSION"; public const string SessionNotOwned = "SESSION_NOT_OWNED"; public const string StaleState = "STALE_STATE"; public const string StaleRevision = "STALE_REVISION"; public const string StaleCursor = "STALE_CURSOR"; public const string PlanNotFound = "PLAN_NOT_FOUND"; public const string PlanExpired = "PLAN_EXPIRED"; public const string PlanAlreadyBound = "PLAN_ALREADY_BOUND"; public const string IdempotencyConflict = "IDEMPOTENCY_CONFLICT"; public const string IdempotencyCapacityExceeded = "IDEMPOTENCY_CAPACITY_EXCEEDED"; public const string ActionNotFound = "ACTION_NOT_FOUND"; public const string ActionRejected = "ACTION_REJECTED"; public const string ActionNotStarted = "ACTION_NOT_STARTED"; public const string ActionInProgress = "ACTION_IN_PROGRESS"; public const string ActionFailed = "ACTION_FAILED"; public const string ActionOutcomeUnknown = "ACTION_OUTCOME_UNKNOWN"; public const string RequestTimeout = "REQUEST_TIMEOUT"; public const string InternalError = "INTERNAL_ERROR"; } } namespace Spherewright.Contracts.Celestial { public sealed class LocalStarSystemSnapshot { public string SessionId { get; set; } = string.Empty; public int LocalPlanetId { get; set; } public int StarId { get; set; } public string StarName { get; set; } = string.Empty; public long CapturedAtGameTick { get; set; } public string StateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; public List Planets { get; set; } = new List(); } public sealed class PlanetSnapshot { public int PlanetId { get; set; } public string Name { get; set; } = string.Empty; public string PlanetType { get; set; } = string.Empty; public int ThemeId { get; set; } public string ThemeName { get; set; } = string.Empty; public bool IsCurrentPlanet { get; set; } public bool IsBirthPlanet { get; set; } public bool IsGasGiant { get; set; } public bool FactoryLoaded { get; set; } public float RealRadius { get; set; } public float OrbitRadius { get; set; } public double DistanceFromPlayer { get; set; } public UniversalPositionSnapshot UniversalPosition { get; set; } = new UniversalPositionSnapshot(); public List PotentialResourceTypes { get; set; } = new List(); } public sealed class UniversalPositionSnapshot { public double X { get; set; } public double Y { get; set; } public double Z { get; set; } } } namespace Spherewright.Contracts.Actions { public static class MovementFailureKinds { public const string PositionStalled = "position_stalled"; public const string RouteStalled = "route_stalled"; public const string BoundedTimeout = "bounded_timeout"; } public sealed class GetActionResultRequest { public string ActionId { get; set; } = string.Empty; } public sealed class ActionResultSnapshot { public string ActionId { get; set; } = string.Empty; public string ActionKind { get; set; } = string.Empty; public string State { get; set; } = string.Empty; public bool Terminal { get; set; } public bool Succeeded { get; set; } public string? SessionId { get; set; } public int? PlanetId { get; set; } public string? Message { get; set; } public string? IdempotencyKey { get; set; } public long? StartedAtGameTick { get; set; } public long? CompletedAtGameTick { get; set; } public string? BeforeStateHash { get; set; } public string? AfterStateHash { get; set; } public int? TargetObjectId { get; set; } public List TargetObjectIds { get; set; } = new List(); public int? TargetItemId { get; set; } public int? RequestedCount { get; set; } public int? BeforeTargetAmount { get; set; } public int? AfterTargetAmount { get; set; } public List ItemDeltas { get; set; } = new List(); public bool ReconciledFromOutcomeUnknown { get; set; } public long? ReconciledAtGameTick { get; set; } public string? FlightCheckpointId { get; set; } public string? FlightCheckpointReloadToken { get; set; } public long? FlightCheckpointGameTick { get; set; } public bool Stalled { get; set; } public bool RecoveryRequired { get; set; } public string? FailureKind { get; set; } public long? StalledGameTicks { get; set; } public double? RemainingDistance { get; set; } public bool DoNotRetrySameTarget { get; set; } public string? RecommendedRecovery { get; set; } public double? RecommendedShortMoveDistanceMeters { get; set; } public double? OrthogonalProbeDistanceMeters { get; set; } public int? MaximumOrthogonalProbeAttempts { get; set; } } public static class NormalActionKinds { public const string Move = "move"; public const string InterplanetaryFlight = "interplanetary-flight"; public const string Harvest = "harvest"; public const string Handcraft = "handcraft"; public const string SelectResearch = "select-research"; public const string Build = "build"; public const string Dismantle = "dismantle"; public const string Transfer = "transfer"; public const string LogisticsStationFleetTransfer = "logistics-station-fleet-transfer"; public const string ConfigureBuilding = "configure-building"; public const string Refuel = "refuel"; public const string Save = "save"; public const string ReconcileQuarantine = "reconcile-quarantine"; public const string UserSaveImport = "user-save-import"; } public static class NormalBuildKinds { public const string Core = "core"; public const string Resource = "resource"; public const string Belt = "belt"; public const string Inserter = "inserter"; } public static class TransferDirections { public const string PlayerToStorage = "player-to-storage"; public const string StorageToPlayer = "storage-to-player"; } public static class LogisticsStationFleetTransferDirections { public const string PlayerToStation = "player-to-station"; public const string StationToPlayer = "station-to-player"; } public static class LogisticsFleetItemIds { public const int Drone = 5001; public const int Vessel = 5002; } public static class BuildingConfigurationModes { public const string Production = "production"; public const string Research = "research"; public const string SorterFilter = "sorter-filter"; public const string LogisticsStationStorage = "logistics-station-storage"; public const string LogisticsStationBelt = "logistics-station-belt"; public const string LogisticsStationCharge = "logistics-station-charge"; } public static class LogisticsStorageLogics { public const string None = "none"; public const string Supply = "supply"; public const string Demand = "demand"; } public static class NormalActionStates { public const string Reserved = "reserved"; public const string Queued = "queued"; public const string Executing = "executing"; public const string WaitingForGame = "waiting_for_game"; public const string Completed = "completed"; public const string ActionFailed = "action_failed"; public const string RecoveryRequired = "recovery_required"; public const string OutcomeUnknown = "outcome_unknown"; } public sealed class PrepareMoveRequest { public int PlanetId { get; set; } public Vector3Snapshot Target { get; set; } = new Vector3Snapshot(); public float ArrivalTolerance { get; set; } = 1.5f; public string ExpectedPlayerStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareHarvestRequest { public int PlanetId { get; set; } public string ResourceKind { get; set; } = string.Empty; public int NodeId { get; set; } public int RequestedYieldCount { get; set; } = 1; public string ExpectedResourceStateHash { get; set; } = string.Empty; public string ExpectedPlayerStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareHandcraftRequest { public int PlanetId { get; set; } public int RecipeId { get; set; } public int Count { get; set; } = 1; public string ExpectedPlayerStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareSelectResearchRequest { public int PlanetId { get; set; } public int TechId { get; set; } public string ExpectedSelectionStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareBuildRequest { public int PlanetId { get; set; } public int BuildingItemId { get; set; } public float PreferredDistance { get; set; } = 12f; public Vector3Snapshot? PreferredPosition { get; set; } public float? PreferredYaw { get; set; } public int? ResourceNodeId { get; set; } public string? ExpectedResourceStateHash { get; set; } public int? SourceObjectId { get; set; } public string? ExpectedSourceStateHash { get; set; } public int? DestinationObjectId { get; set; } public string? ExpectedDestinationStateHash { get; set; } public Vector3Snapshot? PathEnd { get; set; } public float PathLength { get; set; } = 6f; public string ExpectedPlayerStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareConfigureBuildingRequest { public int PlanetId { get; set; } public int EntityId { get; set; } public int RecipeId { get; set; } public string Mode { get; set; } = "production"; public int TechId { get; set; } public int FilterItemId { get; set; } public int StationStorageIndex { get; set; } = -1; public int StationBeltSlotIndex { get; set; } = -1; public int StationBeltStorageIndex { get; set; } = -1; public int StationItemId { get; set; } public int StationMaximumCount { get; set; } public string StationLocalLogic { get; set; } = "none"; public string StationRemoteLogic { get; set; } = "none"; public long StationMaximumChargePowerWatts { get; set; } public string ExpectedStationConfigurationStateHash { get; set; } = string.Empty; public string ExpectedFactoryStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareTransferRequest { public int PlanetId { get; set; } public string Direction { get; set; } = string.Empty; public int StorageEntityId { get; set; } public int ItemId { get; set; } public int Count { get; set; } = 1; public string ExpectedPlayerStateHash { get; set; } = string.Empty; public string ExpectedStorageStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareRefuelRequest { public int PlanetId { get; set; } public int ItemId { get; set; } public int Count { get; set; } = 1; public string ExpectedPlayerStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareSaveRequest { public int PlanetId { get; set; } public long ExpectedRevision { get; set; } public int StateHashVersion { get; set; } = 1; } public sealed class PrepareDismantleRequest { public int PlanetId { get; set; } public int ObjectId { get; set; } public string ExpectedEndpointStateHash { get; set; } = string.Empty; public string ExpectedPlayerStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareLogisticsStationFleetTransferRequest { public int PlanetId { get; set; } public int StationEntityId { get; set; } public string Direction { get; set; } = string.Empty; public int ItemId { get; set; } public int Count { get; set; } = 1; public string ExpectedPlayerStateHash { get; set; } = string.Empty; public string ExpectedStationFleetStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareInterplanetaryFlightRequest { public int PlanetId { get; set; } public int DestinationPlanetId { get; set; } public string ExpectedPlayerStateHash { get; set; } = string.Empty; public string ExpectedStarSystemStateHash { get; set; } = string.Empty; public double MinimumCoreEnergyRatio { get; set; } = 0.95; public int StateHashVersion { get; set; } = 1; } public sealed class PrepareQuarantineReconciliationRequest { public int PlanetId { get; set; } public string ActionId { get; set; } = string.Empty; public long ExpectedRevision { get; set; } public int StateHashVersion { get; set; } = 1; } public sealed class CommitNormalActionRequest { public string SessionId { get; set; } = string.Empty; public int PlanetId { get; set; } public string PlanToken { get; set; } = string.Empty; public string IdempotencyKey { get; set; } = string.Empty; } public sealed class PreparedNormalAction { public bool Prepared { get; set; } public string ActionKind { get; set; } = string.Empty; public string PlanToken { get; set; } = string.Empty; public DateTimeOffset ExpiresAtUtc { get; set; } public string ExpectedStateHash { get; set; } = string.Empty; public int StateHashVersion { get; set; } = 1; public bool CommitAllowedNow { get; set; } public double EstimatedDistance { get; set; } public long EstimatedGameTicks { get; set; } public List ItemBudget { get; set; } = new List(); public List CommitBlockers { get; set; } = new List(); public string CompletionCondition { get; set; } = string.Empty; public Vector3Snapshot? PlannedPosition { get; set; } public float? PlannedYaw { get; set; } public string? BuildKind { get; set; } public int? TargetObjectId { get; set; } public int? SourceObjectId { get; set; } public int? DestinationObjectId { get; set; } public List PlannedPath { get; set; } = new List(); public List PlannedResourceNodeIds { get; set; } = new List(); public string? ReconcilesActionId { get; set; } public List ProvedObjectIds { get; set; } = new List(); } public sealed class ActionItemBudget { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int Count { get; set; } public string Direction { get; set; } = string.Empty; } public sealed class NormalActionCommitResult { public string ActionId { get; set; } = string.Empty; public string ActionKind { get; set; } = string.Empty; public string IdempotencyKey { get; set; } = string.Empty; public string State { get; set; } = string.Empty; public bool Accepted { get; set; } public bool IdempotentReplay { get; set; } } public sealed class ActionItemDelta { public int ItemId { get; set; } public string Name { get; set; } = string.Empty; public int BeforeCount { get; set; } public int AfterCount { get; set; } public int Delta { get; set; } } }