Clarify independent nested plugin projection
This commit is contained in:
parent
ab8560e1fb
commit
fbab91d069
7 changed files with 27 additions and 13 deletions
|
|
@ -188,8 +188,9 @@ advertisement surfaces:
|
|||
- `Fensalir Direct2D`, a fixture surface for the planned
|
||||
CultMesh-to-`AquariumUiDocument` lowering.
|
||||
- `Sai VN Surface`, a fixture for visual-novel scenes exported as
|
||||
`gamecult.eve.surface.v1`, including embedded Norn and TeX surfaces placed
|
||||
diegetically inside the scene.
|
||||
`gamecult.eve.surface.v1`, including optional nested Norn and TeX sidecar
|
||||
plugin surfaces placed diegetically inside the scene when those independent
|
||||
plugins are available.
|
||||
- `Huginn .cc`, a read-only `.eve` fixture emitted by CultCache/Huginn for
|
||||
`.cc` files: source witness, schema catalog, persisted records, payload byte
|
||||
counts, and decode status. Huginn emits Eve DSL; Eve compiles and renders it.
|
||||
|
|
|
|||
|
|
@ -87,11 +87,12 @@ Required top-level meanings:
|
|||
- `surfaces[].requiresPlugins`: sidecar plugin capabilities used by the
|
||||
surface. Entries may be `availability: required` or
|
||||
`availability: optional-nested`. Required entries gate full surface
|
||||
interaction. Optional nested entries, such as a Sai-authored scene slotting in
|
||||
Norn or TeX, degrade when unavailable; they do not make the parent plugin own
|
||||
the nested plugin's semantics. Runtimes compare these entries with local
|
||||
projection support and report visible capability gaps; they must not import
|
||||
provider or plugin internals to recover missing semantics.
|
||||
interaction. Optional nested entries, such as a VN scene reserving space for
|
||||
independently-owned Norn or TeX surfaces, degrade when unavailable; they do
|
||||
not make Sai or any other parent plugin own the nested plugin's semantics.
|
||||
Runtimes compare these entries with local projection support and report
|
||||
visible capability gaps; they must not import provider or plugin internals to
|
||||
recover missing semantics.
|
||||
- `commands`: command boundaries the provider accepts.
|
||||
- `routes`: transport, store, or compatibility routes used to reach the
|
||||
semantic address. WebSocket and HTTP routes live here when they still exist.
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "story.choose",
|
||||
documentId: firstString(props.storyId, component.id),
|
||||
semanticOwner: "Sai",
|
||||
availability: "required",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -189,6 +190,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "graph.node.activate",
|
||||
documentId: firstString(props.sourceUri, props.documentId, component.id),
|
||||
semanticOwner: "Norn",
|
||||
availability: "optional-nested",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -202,6 +204,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "",
|
||||
documentId: firstString(props.sourceUri, props.source, component.id),
|
||||
semanticOwner: "EvePlugins",
|
||||
availability: "optional-nested",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,14 +32,14 @@ test("builds Unity scene projection capture artifact from provider advertisement
|
|||
assert.equal(projection.root.children[1].children[0].sceneObjectKind, "world-projection-node");
|
||||
});
|
||||
|
||||
test("keeps Sai, Norn, and TeX semantics in sidecar plugin projections", () => {
|
||||
test("marks Sai required and Norn TeX optional sidecar plugin projections", () => {
|
||||
const advertisement = structuredClone(saiAdvertisement);
|
||||
advertisement.surfaces[0].worldInteraction = {
|
||||
projectionKind: "provider-authored-visual-novel-surface",
|
||||
commandBoundary: "sai.vn.plugin.commands",
|
||||
receiptSchema: "gamecult.eve.command_receipt.v1",
|
||||
loweringTargets: ["unity-scene"],
|
||||
ownership: "provider-owns-story-state-plugin-sidecars-own-nested-semantics",
|
||||
ownership: "provider-owns-story-state-independent-plugin-sidecars-own-semantics",
|
||||
};
|
||||
|
||||
const projection = buildUnitySceneProjection(saiSurfaceDocument, advertisement, "sai.visual_novel.surface");
|
||||
|
|
@ -49,8 +49,11 @@ test("keeps Sai, Norn, and TeX semantics in sidecar plugin projections", () => {
|
|||
|
||||
assert.equal(projection.root.pluginProjection.pluginId, "sai.vn");
|
||||
assert.equal(projection.root.pluginProjection.semanticOwner, "Sai");
|
||||
assert.equal(projection.root.pluginProjection.availability, "required");
|
||||
assert.equal(graphNode.pluginProjection.pluginId, "norn.graph");
|
||||
assert.equal(graphNode.pluginProjection.semanticOwner, "Norn");
|
||||
assert.equal(graphNode.pluginProjection.availability, "optional-nested");
|
||||
assert.equal(texNode.pluginProjection.pluginId, "tex.math");
|
||||
assert.equal(texNode.pluginProjection.semanticOwner, "EvePlugins");
|
||||
assert.equal(texNode.pluginProjection.availability, "optional-nested");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "story.choose",
|
||||
documentId: firstString(props.storyId, component.id),
|
||||
semanticOwner: "Sai",
|
||||
availability: "required",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -202,6 +203,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "graph.focus",
|
||||
documentId: firstString(props.sourceUri, props.documentId, component.id),
|
||||
semanticOwner: "Norn",
|
||||
availability: "optional-nested",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -215,6 +217,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "",
|
||||
documentId: firstString(props.sourceUri, props.source, component.id),
|
||||
semanticOwner: "EvePlugins",
|
||||
availability: "optional-nested",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ test("builds Unity UI Toolkit projection capture artifact from provider advertis
|
|||
assert.deepEqual(projection.root.classNames.slice(0, 2), ["eve-component", "eve-kind-surface"]);
|
||||
});
|
||||
|
||||
test("keeps Sai, Norn, and TeX semantics in sidecar plugin UI projections", () => {
|
||||
test("marks Sai required and Norn TeX optional sidecar plugin UI projections", () => {
|
||||
const advertisement = structuredClone(saiAdvertisement);
|
||||
advertisement.surfaces[0].worldInteraction = {
|
||||
projectionKind: "provider-authored-visual-novel-surface",
|
||||
commandBoundary: "sai.vn.plugin.commands",
|
||||
receiptSchema: "gamecult.eve.command_receipt.v1",
|
||||
loweringTargets: ["unity-uitoolkit"],
|
||||
ownership: "provider-owns-story-state-plugin-sidecars-own-nested-semantics",
|
||||
ownership: "provider-owns-story-state-independent-plugin-sidecars-own-semantics",
|
||||
};
|
||||
|
||||
const projection = buildUnityUiToolkitProjection(saiSurfaceDocument, advertisement, "sai.visual_novel.surface");
|
||||
|
|
@ -50,11 +50,14 @@ test("keeps Sai, Norn, and TeX semantics in sidecar plugin UI projections", () =
|
|||
|
||||
assert.equal(projection.root.pluginProjection.pluginId, "sai.vn");
|
||||
assert.equal(projection.root.pluginProjection.semanticOwner, "Sai");
|
||||
assert.equal(projection.root.pluginProjection.availability, "required");
|
||||
assert.equal(projection.root.visualElementKind, "SaiVisualNovelStageElement");
|
||||
assert.equal(graphNode.pluginProjection.pluginId, "norn.graph");
|
||||
assert.equal(graphNode.pluginProjection.semanticOwner, "Norn");
|
||||
assert.equal(graphNode.pluginProjection.availability, "optional-nested");
|
||||
assert.equal(graphNode.visualElementKind, "NornGraphElement");
|
||||
assert.equal(texNode.pluginProjection.pluginId, "tex.math");
|
||||
assert.equal(texNode.pluginProjection.semanticOwner, "EvePlugins");
|
||||
assert.equal(texNode.pluginProjection.availability, "optional-nested");
|
||||
assert.equal(texNode.visualElementKind, "TeXMathElement");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1065,7 +1065,7 @@
|
|||
},
|
||||
{
|
||||
"path": "tools/eveunity/eveunity-scene-capture-artifact.test.mjs",
|
||||
"contains": ["builds Unity scene projection capture artifact", "keeps Sai, Norn, and TeX semantics in sidecar plugin projections", "gamecult.eve.unity_scene_projection.v1", "unity-scene-projection-json"]
|
||||
"contains": ["builds Unity scene projection capture artifact", "marks Sai required and Norn TeX optional sidecar plugin projections", "gamecult.eve.unity_scene_projection.v1", "unity-scene-projection-json", "optional-nested"]
|
||||
},
|
||||
{
|
||||
"path": "tools/eveunity/eveunity-release-contract.test.mjs",
|
||||
|
|
@ -1536,7 +1536,7 @@
|
|||
},
|
||||
{
|
||||
"path": "tools/eveunity/eveunity-uitoolkit-capture-artifact.test.mjs",
|
||||
"contains": ["builds Unity UI Toolkit projection capture artifact", "keeps Sai, Norn, and TeX semantics in sidecar plugin UI projections", "gamecult.eve.unity_uitoolkit_projection.v1", "unity-uitoolkit-projection-json"]
|
||||
"contains": ["builds Unity UI Toolkit projection capture artifact", "marks Sai required and Norn TeX optional sidecar plugin UI projections", "gamecult.eve.unity_uitoolkit_projection.v1", "unity-uitoolkit-projection-json", "optional-nested"]
|
||||
}
|
||||
],
|
||||
"commandTransportSmoke": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue