feat(foundry): complete HGeoZone live layer

This commit is contained in:
Codex
2026-07-22 09:25:32 +03:00
parent de060c105b
commit 309cddef73
9 changed files with 391 additions and 83 deletions
+3 -2
View File
@@ -17,6 +17,7 @@ import { createFoundryAgentStore } from "./foundry-agent-store.mjs";
import { createFoundryDataProductConsumerManager } from "./foundry-data-product-consumer.mjs";
import { createFoundryReaderGrantProvisioner } from "./foundry-reader-grant-provisioner.mjs";
import { handleFoundryEntitlementRequest, handleFoundryMcpRequest } from "./foundry-mcp.mjs";
import { isMapLiveDataSlot } from "./map-live-data-slot.mjs";
import { normalizeMapPresentationProfile, normalizeMapPresentationProfiles } from "./map-presentation-profile.mjs";
import { createFoundryAuth } from "./nodedc-auth.mjs";
@@ -1049,7 +1050,7 @@ async function resolveRuntimeMapDataProductBinding(applicationId, pageId, bindin
const binding = layout.dataProductBindings.find((candidate) => candidate.id === bindingId);
if (!binding) throw applicationError("data_product_binding_not_found", 404);
const slot = template?.slots?.find((candidate) => candidate.id === binding.slotId);
if (!slot || slot.kind !== "entity-stream") throw applicationError("map_entity_stream_slot_required", 409);
if (!isMapLiveDataSlot(slot)) throw applicationError("map_live_data_slot_required", 409);
return { application, page, binding };
}
@@ -2076,7 +2077,7 @@ const foundryMcpOperations = {
if (page.template?.id !== "map") throw applicationError("map_page_required");
const template = findPageTemplate(page.template.id, page.template.version);
const slot = template?.slots?.find((candidate) => candidate.id === binding.slotId);
if (!slot || slot.kind !== "entity-stream") throw applicationError("map_entity_stream_slot_required");
if (!isMapLiveDataSlot(slot)) throw applicationError("map_live_data_slot_required");
const layout = validateMapPageLayout(page.layout?.map || defaultMapPageLayout());
const existingBinding = layout.dataProductBindings.find((item) => item.id === binding.id);
const resolvedBinding = {