Preserve semantic CultMesh provider addresses

This commit is contained in:
Meta Vens 2026-06-04 23:23:01 +01:00
commit 7d2e212b04
5 changed files with 62 additions and 2 deletions

View file

@ -103,6 +103,7 @@ The first executable is deliberately narrow:
- includes local Spotiverse on `ws://127.0.0.1:8796/eve/deck` in the known provider seed list;
- ingests provider-owned Eve/CultUI dashboards, including `mimir.live.stats` and `voidbot.swarm`, and embeds them as Odin `interface` nodes;
- accepts `gamecult.eve.provider_advertisement.v1` documents in CultMesh interface binding stores so daemons can announce schemas, `.cc` witnesses, surfaces, commands, nested Verses, and style capabilities without Odin scraping private dashboards;
- preserves provider semantic addresses such as `asgard.starfire.bifrost/eve/tui` and `asgard.starfire.bifrost/eve/gui`, with CultNet routes and WebSocket bridges carried as transport metadata rather than identity;
- persists operator tiling intent as `odin.interface_layout.v1` under ignored `scratch/odin/interface-layout.json`.
The next real cut is to make provider advertisements the primary discovery

View file

@ -208,6 +208,30 @@ style capabilities, freshness, and redaction policy. Once an advertisement is
available, Odin should prefer it over LAN scans, hardcoded deck URLs, private
layout files, or web-dashboard scraping.
Provider advertisements should also publish semantic CultMesh addresses in this
shape:
```text
asgard.<machine>.<service>/<resource>
```
Examples:
```text
asgard.starfire.odin/eve/allseer
asgard.starfire.bifrost/eve/tui
asgard.starfire.bifrost/eve/gui
asgard.yggdrasil.streampixels/eve/tui
asgard.yggdrasil.streampixels/eve/gui
```
The canonical service may omit the current machine when identity should survive
relocation, such as `asgard.bifrost`. Located service addresses name the current
host, such as `asgard.starfire.bifrost` now and
`asgard.yggdrasil.bifrost` after migration. CultNet routes are transport
metadata for resolving those names. WebSocket URLs remain compatibility deck
bridges, not native service identity.
The canonical contract lives in
`E:\Projects\Eve\docs\provider-advertisement-contract.md`.

View file

@ -87,7 +87,16 @@ function createInterfaceDiscovery({
title: advertisement.title || advertisement.providerId,
description: advertisement.description || "Provider-owned CultMesh advertisement.",
version: String(advertisement.version || 0),
endpoint: advertisement.endpoints?.[0] || advertisement.provider?.endpoint || `cultmesh:${storePath}`,
endpoint: advertisement.cultMeshAddress || advertisement.endpoints?.[0]?.address || advertisement.provider?.endpoint || `cultmesh:${storePath}`,
canonicalService: advertisement.canonicalService || null,
locatedService: advertisement.locatedService || null,
cultMeshAddress: advertisement.cultMeshAddress || null,
endpoints: advertisement.endpoints || [],
routes: advertisement.routes || [],
transportEndpoint: advertisement.routes?.find((route) => route.transport === "cultnet")?.address
|| advertisement.routes?.find((route) => route.transport === "compatibility-eve-deck")?.address
|| advertisement.provider?.endpoint
|| `cultmesh:${storePath}`,
capabilities: advertisement.provider?.capabilities || advertisement.capabilities || [],
usesCultMesh: true,
transport: advertisement.provider?.transport || "CultMesh provider advertisement",
@ -149,6 +158,11 @@ function createInterfaceDiscovery({
updatedAt: state?.updatedAt || binding.updatedAt || new Date().toISOString(),
source: `cultmesh:${storePath}`,
manifest: binding.provider || null,
canonicalService: binding.provider?.canonicalService || null,
locatedService: binding.provider?.locatedService || null,
cultMeshAddress: binding.provider?.cultMeshAddress || binding.provider?.endpoint || null,
endpoints: binding.provider?.endpoints || [],
routes: binding.provider?.routes || [],
surface,
});
}

View file

@ -36,6 +36,11 @@ function buildSurface({ observedAt, docker, adb, hosts, yggdrasilServices, verse
props: {
title: entry.title || entry.providerId,
verseUri: verseUri(entry),
canonicalService: entry.canonicalService || "",
locatedService: entry.locatedService || "",
cultMeshAddress: entry.cultMeshAddress || "",
endpoints: entry.endpoints || [],
routes: entry.routes || [],
providerId: entry.providerId,
source: entry.source,
status: entry.state,
@ -191,6 +196,8 @@ function metric(id, label, value, tone) {
}
function verseUri(entry) {
if (entry.cultMeshAddress) return String(entry.cultMeshAddress);
if (entry.locatedService) return String(entry.locatedService);
const providerId = String(entry.providerId || "").trim();
if (hasBodyPrefix(providerId)) return providerId;
const body = sourceBody(entry.source);

View file

@ -62,7 +62,13 @@ function providerCatalogFromState(state) {
title: String(props.title || props.providerId),
description: String(props.detail || "Provider-owned Eve/CultUI interface discovered by Odin."),
version: String(props.version || 0),
endpoint: props.source || "/eve/deck",
endpoint: props.cultMeshAddress || props.locatedService || props.source || "/eve/deck",
canonicalService: props.canonicalService || null,
locatedService: props.locatedService || null,
cultMeshAddress: props.cultMeshAddress || null,
endpoints: Array.isArray(props.endpoints) ? props.endpoints : [],
routes: Array.isArray(props.routes) ? props.routes : [],
transportEndpoint: transportEndpoint(props),
capabilities: providerCapabilities(embeddedRoot),
usesCultMesh: String(props.source || "").startsWith("cultmesh:"),
transport: String(props.source || "").startsWith("cultmesh:")
@ -76,6 +82,14 @@ function providerCatalogFromState(state) {
return [...providers.values()].sort((left, right) => String(left.id).localeCompare(String(right.id)));
}
function transportEndpoint(props) {
const routes = Array.isArray(props.routes) ? props.routes : [];
return routes.find((route) => route?.transport === "cultnet")?.address
|| routes.find((route) => route?.transport === "compatibility-eve-deck")?.address
|| props.source
|| "";
}
function providerCapabilities(root) {
const capabilities = new Set(["cultui-surface"]);
if (hasCommand(root)) {