Graduate Norn graph semantics from Eve
This commit is contained in:
parent
be6aeb8bf8
commit
f9a2b6a6d6
6 changed files with 58 additions and 61 deletions
|
|
@ -9,10 +9,11 @@
|
|||
"path": "web/fixtures/sai-vn-surface.json"
|
||||
},
|
||||
"purpose": "Proves a Sai-owned visual-novel plugin surface can compose independently-owned Norn and TeX nested surfaces.",
|
||||
"exitCriteria": "Provider scenarios remain in Eve only as contract fixtures; Sai owns VN/Ink story state, commands, projection, and plugin ABI cases.",
|
||||
"exitCriteria": "Provider scenarios remain in Eve only as contract fixtures; Sai owns VN/Ink state and commands, while Norn and TeX own their nested documents, semantics, runtime advertisements, and plugin ABI cases.",
|
||||
"asserts": [
|
||||
"vn.stage component",
|
||||
"embed.norn component",
|
||||
"Norn-owned embedded graph document reference",
|
||||
"embed.tex component",
|
||||
"story command descriptors",
|
||||
"required Sai plugin capability",
|
||||
|
|
|
|||
|
|
@ -57,43 +57,21 @@
|
|||
{
|
||||
"id": "sai.graph",
|
||||
"kind": "embed.norn",
|
||||
"embeddedDocuments": [
|
||||
{
|
||||
"slotId": "graph",
|
||||
"documentId": "cultmesh://norn/graphs/sai-nested-norn",
|
||||
"schemaId": "norn.graph.document.v1",
|
||||
"presentationKind": "embed.norn"
|
||||
}
|
||||
],
|
||||
"props": {
|
||||
"label": "GameCult Ink Knot Graph",
|
||||
"engine": {
|
||||
"id": "norn",
|
||||
"contract": "gamecult.norn.surface.v1",
|
||||
"web": {
|
||||
"wasm": "/static/interactive/norn/norn-rs.wasm",
|
||||
"package": "@gamecult/norn-viewer"
|
||||
},
|
||||
"native": {
|
||||
"rustCrate": "norn-rs",
|
||||
"direct2dAdapter": "fensalir.norn.direct2d"
|
||||
}
|
||||
},
|
||||
"layout": {
|
||||
"mode": "norn.2d",
|
||||
"iterations": 220,
|
||||
"rankGap": 150,
|
||||
"nodeGap": 88,
|
||||
"edgeLength": 132
|
||||
},
|
||||
"graph": {
|
||||
"nodes": [
|
||||
{ "id": "hub", "label": "Hub", "target": "hub", "x": 0.2, "y": 0.2, "current": true },
|
||||
{ "id": "eve", "label": "Eve", "target": "eve", "x": 0.72, "y": 0.24 },
|
||||
{ "id": "sai", "label": "Sai", "target": "sai", "x": 0.48, "y": 0.55 }
|
||||
],
|
||||
"edges": [
|
||||
{ "source": "hub", "target": "eve" },
|
||||
{ "source": "hub", "target": "sai" },
|
||||
{ "source": "sai", "target": "eve" }
|
||||
]
|
||||
},
|
||||
"pluginId": "norn.graph",
|
||||
"capability": "embed.norn",
|
||||
"interaction": {
|
||||
"nodeAction": "story.jump",
|
||||
"focusFollowsStory": true,
|
||||
"rendererMustUseNorn": true
|
||||
"focusFollowsStory": true
|
||||
},
|
||||
"placement": {
|
||||
"space": "scene",
|
||||
|
|
|
|||
|
|
@ -34,6 +34,11 @@
|
|||
"kind": "owner-repo",
|
||||
"ref": "Sai",
|
||||
"summary": "Sai owns VN/Ink semantics once the plugin ABI graduates; Eve only hosts this fixture while the contract is forming."
|
||||
},
|
||||
{
|
||||
"kind": "plugin-advertisement",
|
||||
"ref": "Norn/plugins/norn-graph.plugin-advertisement.json",
|
||||
"summary": "Norn owns graph documents, layout semantics, runtime hints, and graph conformance fixtures."
|
||||
}
|
||||
],
|
||||
"surfaces": [
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { findProviderCatalogEntry, mergeProviderAdvertisement } from "./provider
|
|||
const catalog = JSON.parse(readFileSync(new URL("./local-provider-catalog.json", import.meta.url), "utf8"));
|
||||
const worldSmokeAdvertisement = JSON.parse(readFileSync(new URL("./fixtures/eve-world-smoke.provider-advertisement.json", import.meta.url), "utf8"));
|
||||
const saiAdvertisement = JSON.parse(readFileSync(new URL("./fixtures/sai-vn.provider-advertisement.json", import.meta.url), "utf8"));
|
||||
const saiSurface = JSON.parse(readFileSync(new URL("./fixtures/sai-vn-surface.json", import.meta.url), "utf8"));
|
||||
|
||||
test("merges generic world fixture transport with advertised world interaction", () => {
|
||||
const catalogProvider = findProviderCatalogEntry(catalog, "eve.world-smoke");
|
||||
|
|
@ -43,3 +44,16 @@ test("preserves Sai required and optional nested plugin requirements from advert
|
|||
assert.deepEqual(byPlugin.get("tex.math").requiredCapabilities, []);
|
||||
assert.deepEqual(byPlugin.get("tex.math").optionalCapabilities, ["embed.tex"]);
|
||||
});
|
||||
|
||||
test("composes Norn by advertised capability and owner document", () => {
|
||||
const norn = saiSurface.surface.root.children.find(component => component.kind === "embed.norn");
|
||||
const [graphDocument] = norn.embeddedDocuments;
|
||||
|
||||
assert.equal(norn.props.pluginId, "norn.graph");
|
||||
assert.equal(norn.props.capability, "embed.norn");
|
||||
assert.equal(graphDocument.schemaId, "norn.graph.document.v1");
|
||||
assert.equal(graphDocument.documentId, "cultmesh://norn/graphs/sai-nested-norn");
|
||||
assert.equal("engine" in norn.props, false);
|
||||
assert.equal("layout" in norn.props, false);
|
||||
assert.equal("graph" in norn.props, false);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue