Export interactive world surfaces

This commit is contained in:
Meta Vens 2026-07-09 03:00:00 +01:00
commit 2d35c23208
6 changed files with 159 additions and 3 deletions

View file

@ -344,9 +344,11 @@ Recently cut:
kind, provider state schemas, daemon command boundary, receipt schema,
lowering targets, and ownership rules for `aetheria.daemon.game` and
`aetheria.daemon.editor`. The provider scenario requires the daemon game
world-surface contract, parity validates it against the advertisement, the
conformance export carries `surfaceContracts`, and the Aetheria consumer
smoke asserts those fields without importing Aetheria or Eve internals.
world-surface contract, parity validates it against the advertisement, and the
conformance export carries both provider `surfaceContracts` and root
`interactiveWorldSurfaces[]` records. The Aetheria consumer smoke asserts the
advertised web, Unity UI Toolkit, and Unity scene lowering targets without
importing Aetheria or Eve internals.
- EveUnity test lifecycle now carries a structured Unity EditMode runner
contract. `packages/org.gamecult.eve.unity-uitoolkit/eve-runtime-capability.json`
names the runner script, consumer Unity project, default Unity editor path,

View file

@ -113,6 +113,13 @@ The same facts are also exported as `worldSurfaceLoweringGaps[]` so runtime
owners can consume provider id, surface id, target id, owner repo, runtime id,
split target, and runtime status as typed fields instead of parsing the generic
gap text.
Provider-owned world/editor surfaces are exported as
`interactiveWorldSurfaces[]`. These records index the provider id, owner repo,
surface id, surface kind, projection kind, state schemas, command boundary,
receipt schema, lowering targets, and ownership rule so runtime lowerers can
discover provider-authored world surfaces without importing provider source
layout. Consumer smokes can assert advertised targets with
`--expect-interactive-world-surface <providerId:surfaceId:targetId:ownerRepo>`.
Declared runtime/plugin projection gaps are exported as
`runtimePluginProjectionGaps[]`. These records carry runtime id, runtime owner,
split target, plugin id, reason, severity, and fixture lists so EveUnity,

View file

@ -11,6 +11,7 @@
"plugins",
"providers",
"runtimes",
"interactiveWorldSurfaces",
"splitTargetBlockers",
"splitTargets"
],
@ -216,6 +217,70 @@
"additionalProperties": true
}
},
"interactiveWorldSurfaces": {
"type": "array",
"items": {
"type": "object",
"required": [
"providerId",
"ownerRepo",
"surfaceId",
"surfaceKind",
"interactionModel",
"projectionKind",
"stateSchemas",
"commandBoundary",
"receiptSchema",
"loweringTargets",
"ownership"
],
"properties": {
"providerId": {
"type": "string",
"minLength": 1
},
"ownerRepo": {
"type": "string",
"minLength": 1
},
"surfaceId": {
"type": "string",
"minLength": 1
},
"surfaceKind": {
"type": "string",
"minLength": 1
},
"interactionModel": {
"type": "string",
"minLength": 1
},
"projectionKind": {
"type": "string",
"minLength": 1
},
"stateSchemas": {
"type": "array"
},
"commandBoundary": {
"type": "string",
"minLength": 1
},
"receiptSchema": {
"type": "string",
"minLength": 1
},
"loweringTargets": {
"type": "array"
},
"ownership": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": true
}
},
"worldSurfaceLoweringGaps": {
"type": "array",
"items": {

View file

@ -52,6 +52,9 @@ try {
--expect-provider-surface-field aetheria:aetheria.daemon.editor:worldInteraction.projectionKind:provider-authored-world-editor-surface `
--expect-provider-surface-field aetheria:aetheria.daemon.editor:worldInteraction.commandBoundary:aetheria.daemon.commands `
--expect-provider-surface-field aetheria:aetheria.daemon.editor:worldInteraction.receiptSchema:aetheria.eve_command_acceptance_status.v1 `
--expect-interactive-world-surface aetheria:aetheria.daemon.game:web-reference:Aetheria `
--expect-interactive-world-surface aetheria:aetheria.daemon.game:unity-scene:Aetheria `
--expect-interactive-world-surface aetheria:aetheria.daemon.editor:unity-uitoolkit:Aetheria `
--expect-provider-command aetheria:aetheria.daemon.commands `
--expect-provider-receipt-state aetheria:accepted `
--expect-provider-receipt-state aetheria:reconciled `

View file

@ -32,6 +32,7 @@ if (!exportDirectory) {
" --expect-provider-surface <providerId:surfaceId>",
" --expect-provider-surface-kind <providerId:surfaceId:surfaceKind>",
" --expect-provider-surface-field <providerId:surfaceId:field.path:value>",
" --expect-interactive-world-surface <providerId:surfaceId:targetId:ownerRepo>",
" --expect-provider-command <providerId:command>",
" --expect-provider-receipt-state <providerId:state>",
" --expect-provider-handoff <providerId>",
@ -125,6 +126,7 @@ function validateIndex(index, directory, expectations, errors) {
const splitTargets = Array.isArray(index.splitTargets) ? index.splitTargets : [];
const capabilityGaps = Array.isArray(index.capabilityGaps) ? index.capabilityGaps : [];
const runtimePluginProjectionGaps = Array.isArray(index.runtimePluginProjectionGaps) ? index.runtimePluginProjectionGaps : [];
const interactiveWorldSurfaces = Array.isArray(index.interactiveWorldSurfaces) ? index.interactiveWorldSurfaces : [];
const splitTargetBlockers = Array.isArray(index.splitTargetBlockers) ? index.splitTargetBlockers : [];
const worldSurfaceLoweringGaps = Array.isArray(index.worldSurfaceLoweringGaps) ? index.worldSurfaceLoweringGaps : [];
@ -132,6 +134,7 @@ function validateIndex(index, directory, expectations, errors) {
validateProviderRecords(providers, errors);
validateRuntimeRecords(runtimes, errors);
validateSplitTargetRecords(splitTargets, errors);
validateInteractiveWorldSurfaces(index.interactiveWorldSurfaces, errors);
if (expectations.conformanceHandoff && !index.conformanceHandoffPath) {
errors.push("conformanceHandoffPath:missing");
@ -322,6 +325,24 @@ function validateIndex(index, directory, expectations, errors) {
errors.push(`providers:${expectation.providerId}:surfaceContract:${expectation.surfaceId}.${expectation.fieldPath}:expected ${expectation.value} got ${actual || ""}`);
}
}
for (const expectation of expectations.interactiveWorldSurfaces) {
const surface = interactiveWorldSurfaces.find(candidate =>
candidate.providerId === expectation.providerId &&
candidate.surfaceId === expectation.surfaceId);
if (!surface) {
errors.push(`interactiveWorldSurfaces:${expectation.providerId}:${expectation.surfaceId}:missing`);
continue;
}
if (surface.ownerRepo !== expectation.ownerRepo) {
errors.push(`interactiveWorldSurfaces:${expectation.providerId}:${expectation.surfaceId}:ownerRepo:expected ${expectation.ownerRepo} got ${surface.ownerRepo || ""}`);
}
if (!Array.isArray(surface.loweringTargets) || !surface.loweringTargets.includes(expectation.targetId)) {
errors.push(`interactiveWorldSurfaces:${expectation.providerId}:${expectation.surfaceId}:target:${expectation.targetId}:missing`);
}
for (const field of ["projectionKind", "commandBoundary", "receiptSchema", "ownership"]) {
if (!surface[field]) errors.push(`interactiveWorldSurfaces:${expectation.providerId}:${expectation.surfaceId}:${field}:missing`);
}
}
for (const expectation of expectations.providerCommands) {
const provider = providers.find(candidate => candidate.providerId === expectation.providerId);
if (!provider) {
@ -682,6 +703,21 @@ function validateProviderRecords(providers, errors) {
}
}
function validateInteractiveWorldSurfaces(surfaces, errors) {
if (!Array.isArray(surfaces)) {
errors.push("interactiveWorldSurfaces:missing");
return;
}
for (const [index, surface] of surfaces.entries()) {
for (const field of ["providerId", "ownerRepo", "surfaceId", "surfaceKind", "interactionModel", "projectionKind", "commandBoundary", "receiptSchema", "ownership"]) {
if (!surface?.[field]) errors.push(`interactiveWorldSurfaces:${index}:${field}:missing`);
}
for (const field of ["stateSchemas", "loweringTargets"]) {
if (!Array.isArray(surface?.[field])) errors.push(`interactiveWorldSurfaces:${index}:${field}:expected array`);
}
}
}
function validateRuntimeRecords(runtimes, errors) {
for (const runtime of runtimes) {
const label = `runtimes:${runtime.runtimeId || "unknown"}`;
@ -735,6 +771,7 @@ function parseArguments(args) {
providerSurfaces: [],
providerSurfaceKinds: [],
providerSurfaceFields: [],
interactiveWorldSurfaces: [],
providerCommands: [],
providerReceiptStates: [],
providerHandoffs: [],
@ -780,6 +817,7 @@ function parseArguments(args) {
["--expect-provider-surface", expectations.providerSurfaces],
["--expect-provider-surface-kind", expectations.providerSurfaceKinds],
["--expect-provider-surface-field", expectations.providerSurfaceFields],
["--expect-interactive-world-surface", expectations.interactiveWorldSurfaces],
["--expect-provider-command", expectations.providerCommands],
["--expect-provider-receipt-state", expectations.providerReceiptStates],
["--expect-provider-handoff", expectations.providerHandoffs],
@ -844,6 +882,8 @@ function parseArguments(args) {
target.push(parseProviderSurfaceKindExpectation(value));
} else if (option === "--expect-provider-surface-field") {
target.push(parseProviderSurfaceFieldExpectation(value));
} else if (option === "--expect-interactive-world-surface") {
target.push(parseInteractiveWorldSurfaceExpectation(value));
} else if (option === "--expect-provider-command") {
target.push(parseProviderExpectation(value, "command"));
} else if (option === "--expect-provider-receipt-state") {
@ -985,6 +1025,20 @@ function parseProviderSurfaceFieldExpectation(value) {
};
}
function parseInteractiveWorldSurfaceExpectation(value) {
const parts = value.split(":");
if (parts.length !== 4 || parts.some(part => !part)) {
console.error(`Expected interactive world surface in <providerId:surfaceId:targetId:ownerRepo> form, got: ${value}`);
process.exit(2);
}
return {
providerId: parts[0],
surfaceId: parts[1],
targetId: parts[2],
ownerRepo: parts[3],
};
}
function parseProviderExpectation(value, field) {
const separator = value.indexOf(":");
if (separator <= 0 || separator === value.length - 1) {

View file

@ -1670,6 +1670,7 @@ function buildConformanceExport(report) {
packs,
capabilityMatrix: buildCapabilityMatrix(report),
runtimePluginProjectionGaps: collectRuntimePluginProjectionGaps(report),
interactiveWorldSurfaces: collectInteractiveWorldSurfaces(report),
worldSurfaceLoweringGaps: collectWorldSurfaceLoweringGaps(report),
splitTargetBlockers: collectSplitTargetBlockers(report),
capabilityGaps: collectCapabilityGaps(report),
@ -1951,6 +1952,30 @@ function collectSplitTargetBlockers(report) {
return (report.splitTargets || []).flatMap(target => target.blockerRecords || []);
}
function collectInteractiveWorldSurfaces(report) {
const surfaces = [];
for (const provider of report.providers || []) {
for (const surface of provider.surfaceContracts || []) {
const worldInteraction = surface.worldInteraction || {};
surfaces.push({
providerId: provider.providerId,
ownerRepo: provider.ownerRepo || "",
surfaceId: surface.surfaceId,
surfaceKind: surface.surfaceKind || "",
interactionModel: surface.interactionModel || "",
projectionKind: worldInteraction.projectionKind || "",
stateSchemas: worldInteraction.stateSchemas || [],
commandBoundary: worldInteraction.commandBoundary || "",
receiptSchema: worldInteraction.receiptSchema || "",
loweringTargets: worldInteraction.loweringTargets || [],
ownership: worldInteraction.ownership || "",
});
}
}
return surfaces.sort((left, right) =>
`${left.providerId}:${left.surfaceId}`.localeCompare(`${right.providerId}:${right.surfaceId}`));
}
function resolveRuntimeProjectionOwnerRepo(runtime) {
return runtime.lifecycle?.release?.ownerRepo
|| runtime.lifecycle?.test?.ownerRepo