Define portable Eve asset catalogs
This commit is contained in:
parent
054d3d47b3
commit
c1f60677c5
4 changed files with 209 additions and 4 deletions
|
|
@ -285,13 +285,26 @@ Exit criteria:
|
|||
|
||||
## Active Work Queue
|
||||
|
||||
1. Run the same EveUnity-owned PlayMode client against Aetheria's separately
|
||||
running daemon and attach the Aetheria world PNG plus command/receipt proof.
|
||||
2. Graduate the generic Unity transport and capture contracts only after the
|
||||
product witness proves that no Aetheria authority leaked into EveUnity.
|
||||
1. Replace EveUnity's scoped per-chunk CDN requests with a persistent transfer
|
||||
session while retaining content-addressed disk caching and hash checks.
|
||||
2. Add generic action/combat command evidence and improve runtime-owned camera
|
||||
framing for provider-authored world assets.
|
||||
|
||||
Recently cut:
|
||||
|
||||
- The clean EveUnity PlayMode client now consumes Aetheria's independently
|
||||
running daemon without importing Aetheria code. Aetheria builds its authored
|
||||
prefabs into a provider-owned Unity AssetBundle, advertises an Eve core asset
|
||||
catalog, and serves the immutable bundle through standard CultMesh CDN
|
||||
manifest/chunk documents. EveUnity selects the platform variant, verifies
|
||||
size and SHA-256, caches it by content hash, loads the prefab hierarchy, owns
|
||||
entity pose on a wrapper root, submits movement, observes the authoritative
|
||||
receipt and later surface version, and captures
|
||||
`E:\Projects\EveUnity\artifacts\aetheria-daemon\aetheria-daemon-world.png`.
|
||||
The warm-cache witness passes; first-load transfer still needs a persistent
|
||||
CDN session, and the current capture framing is diagnostic rather than a
|
||||
presentation-quality gameplay camera.
|
||||
|
||||
- Eve core now publishes typed CultCache wire documents for provider
|
||||
advertisement, command invocation, and provider receipt. Command descriptors
|
||||
remain `gamecult.eve.command.v1`; executable intents are the distinct
|
||||
|
|
|
|||
|
|
@ -0,0 +1,144 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using GameCult.Caching;
|
||||
using MessagePack;
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace GameCult.Eve.Surface
|
||||
{
|
||||
[CultDocument("gamecult.eve.asset_catalog", SchemaId)]
|
||||
[MessagePackObject]
|
||||
public sealed class EveAssetCatalogDocument
|
||||
{
|
||||
public const string SchemaId = "gamecult.eve.asset_catalog.v1";
|
||||
|
||||
[SerializationConstructor]
|
||||
public EveAssetCatalogDocument(
|
||||
string schema,
|
||||
string providerId,
|
||||
string catalogId,
|
||||
long version,
|
||||
string updatedAtUtc,
|
||||
EveAssetCatalogEntry[] assets)
|
||||
{
|
||||
Schema = string.IsNullOrWhiteSpace(schema) ? SchemaId : schema;
|
||||
ProviderId = providerId ?? "";
|
||||
CatalogId = catalogId ?? "";
|
||||
Version = version;
|
||||
UpdatedAtUtc = updatedAtUtc ?? "";
|
||||
Assets = assets ?? Array.Empty<EveAssetCatalogEntry>();
|
||||
}
|
||||
|
||||
public EveAssetCatalogDocument(
|
||||
string providerId,
|
||||
string catalogId,
|
||||
long version,
|
||||
string updatedAtUtc,
|
||||
EveAssetCatalogEntry[] assets)
|
||||
: this(SchemaId, providerId, catalogId, version, updatedAtUtc, assets)
|
||||
{
|
||||
}
|
||||
|
||||
[Key(0)] public string Schema { get; }
|
||||
[Key(1)] public string ProviderId { get; }
|
||||
[Key(2)] public string CatalogId { get; }
|
||||
[Key(3)] public long Version { get; }
|
||||
[Key(4)] public string UpdatedAtUtc { get; }
|
||||
[Key(5)] public EveAssetCatalogEntry[] Assets { get; }
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
public sealed class EveAssetCatalogEntry
|
||||
{
|
||||
[SerializationConstructor]
|
||||
public EveAssetCatalogEntry(
|
||||
string assetRef,
|
||||
string assetKind,
|
||||
EveAssetVariant[] variants,
|
||||
Dictionary<string, string> metadata)
|
||||
{
|
||||
AssetRef = assetRef ?? "";
|
||||
AssetKind = assetKind ?? "";
|
||||
Variants = variants ?? Array.Empty<EveAssetVariant>();
|
||||
Metadata = metadata == null
|
||||
? new Dictionary<string, string>(StringComparer.Ordinal)
|
||||
: new Dictionary<string, string>(metadata, StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
public EveAssetCatalogEntry(
|
||||
string assetRef,
|
||||
string assetKind,
|
||||
EveAssetVariant[] variants,
|
||||
IReadOnlyDictionary<string, string>? metadata = null)
|
||||
: this(
|
||||
assetRef,
|
||||
assetKind,
|
||||
variants,
|
||||
metadata == null ? new Dictionary<string, string>() : new Dictionary<string, string>(metadata))
|
||||
{
|
||||
}
|
||||
|
||||
[Key(0)] public string AssetRef { get; }
|
||||
[Key(1)] public string AssetKind { get; }
|
||||
[Key(2)] public EveAssetVariant[] Variants { get; }
|
||||
[Key(3)] public Dictionary<string, string> Metadata { get; }
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
public sealed class EveAssetVariant
|
||||
{
|
||||
[SerializationConstructor]
|
||||
public EveAssetVariant(
|
||||
string runtimeId,
|
||||
string platform,
|
||||
string format,
|
||||
string uri,
|
||||
string contentHash,
|
||||
long sizeBytes,
|
||||
string assetKey,
|
||||
Dictionary<string, string> metadata)
|
||||
{
|
||||
RuntimeId = runtimeId ?? "";
|
||||
Platform = platform ?? "";
|
||||
Format = format ?? "";
|
||||
Uri = uri ?? "";
|
||||
ContentHash = contentHash ?? "";
|
||||
SizeBytes = sizeBytes;
|
||||
AssetKey = assetKey ?? "";
|
||||
Metadata = metadata == null
|
||||
? new Dictionary<string, string>(StringComparer.Ordinal)
|
||||
: new Dictionary<string, string>(metadata, StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
public EveAssetVariant(
|
||||
string runtimeId,
|
||||
string platform,
|
||||
string format,
|
||||
string uri,
|
||||
string contentHash,
|
||||
long sizeBytes,
|
||||
string assetKey,
|
||||
IReadOnlyDictionary<string, string>? metadata = null)
|
||||
: this(
|
||||
runtimeId,
|
||||
platform,
|
||||
format,
|
||||
uri,
|
||||
contentHash,
|
||||
sizeBytes,
|
||||
assetKey,
|
||||
metadata == null ? new Dictionary<string, string>() : new Dictionary<string, string>(metadata))
|
||||
{
|
||||
}
|
||||
|
||||
[Key(0)] public string RuntimeId { get; }
|
||||
[Key(1)] public string Platform { get; }
|
||||
[Key(2)] public string Format { get; }
|
||||
[Key(3)] public string Uri { get; }
|
||||
[Key(4)] public string ContentHash { get; }
|
||||
[Key(5)] public long SizeBytes { get; }
|
||||
[Key(6)] public string AssetKey { get; }
|
||||
[Key(7)] public Dictionary<string, string> Metadata { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8f53654f7c98d894588127ba001f11b4
|
||||
46
schemas/gamecult.eve.asset_catalog.v1.schema.json
Normal file
46
schemas/gamecult.eve.asset_catalog.v1.schema.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "gamecult.eve.asset_catalog.v1",
|
||||
"title": "Eve Asset Catalog",
|
||||
"type": "object",
|
||||
"required": ["schema", "providerId", "catalogId", "version", "assets"],
|
||||
"properties": {
|
||||
"schema": { "const": "gamecult.eve.asset_catalog.v1" },
|
||||
"providerId": { "type": "string", "minLength": 1 },
|
||||
"catalogId": { "type": "string", "minLength": 1 },
|
||||
"version": { "type": "integer", "minimum": 0 },
|
||||
"updatedAtUtc": { "type": "string" },
|
||||
"assets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["assetRef", "assetKind", "variants"],
|
||||
"properties": {
|
||||
"assetRef": { "type": "string", "minLength": 1 },
|
||||
"assetKind": { "type": "string", "minLength": 1 },
|
||||
"metadata": { "type": "object", "additionalProperties": { "type": "string" } },
|
||||
"variants": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["runtimeId", "platform", "format", "uri", "contentHash", "sizeBytes", "assetKey"],
|
||||
"properties": {
|
||||
"runtimeId": { "type": "string", "minLength": 1 },
|
||||
"platform": { "type": "string", "minLength": 1 },
|
||||
"format": { "type": "string", "minLength": 1 },
|
||||
"uri": { "type": "string", "minLength": 1 },
|
||||
"contentHash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
||||
"sizeBytes": { "type": "integer", "minimum": 0 },
|
||||
"assetKey": { "type": "string", "minLength": 1 },
|
||||
"metadata": { "type": "object", "additionalProperties": { "type": "string" } }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Loading…
Reference in a new issue