@roomle/web-sdk 7.0.0-alpha.3 → 7.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.txt +1 -1
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{api-B_Mu7Mg1.mjs → api-0LgvKoxe.mjs} +2 -2
- package/lib/{api-B_Mu7Mg1.mjs.map → api-0LgvKoxe.mjs.map} +1 -1
- package/lib/asset-loader.worker-Bdvb-pt7.mjs.map +1 -1
- package/lib/budgeteer.sw-ByZxiRBr.mjs.map +1 -1
- package/lib/{configuration-operations-C5rnDS8e.mjs → configuration-operations-B7uJDX_4.mjs} +3 -3
- package/lib/{configuration-operations-C5rnDS8e.mjs.map → configuration-operations-B7uJDX_4.mjs.map} +1 -1
- package/lib/{configurator-BeDJ8jD1.mjs → configurator-CU7jNdgC.mjs} +3 -3
- package/lib/{configurator-BeDJ8jD1.mjs.map → configurator-CU7jNdgC.mjs.map} +1 -1
- package/lib/configurator-c5g9sbhL.mjs +3 -0
- package/lib/configurator-capabilities-Cr6BAnms.mjs +3 -0
- package/lib/{configurator-capabilities-C3TQUu_S.mjs → configurator-capabilities-o8fQ6Ang.mjs} +2 -2
- package/lib/{configurator-capabilities-C3TQUu_S.mjs.map → configurator-capabilities-o8fQ6Ang.mjs.map} +1 -1
- package/lib/{glb-viewer-BkU2Z-HJ.mjs → glb-viewer-BByRaJ8F.mjs} +3 -3
- package/lib/{glb-viewer-BkU2Z-HJ.mjs.map → glb-viewer-BByRaJ8F.mjs.map} +1 -1
- package/lib/glb-viewer-q6BU-GNu.mjs +3 -0
- package/lib/{homag-intelligence-DboRA-Yd.mjs → homag-intelligence-wHSuuAC4.mjs} +3 -3
- package/lib/{homag-intelligence-DboRA-Yd.mjs.map → homag-intelligence-wHSuuAC4.mjs.map} +1 -1
- package/lib/{material-viewer-BkaTt8Sn.mjs → material-viewer-beYa7Vpa.mjs} +3 -3
- package/lib/{material-viewer-BkaTt8Sn.mjs.map → material-viewer-beYa7Vpa.mjs.map} +1 -1
- package/lib/{packages-DZzpY6V8.mjs → packages-BrZdc9Gx.mjs} +5 -5
- package/lib/{packages-DZzpY6V8.mjs.map → packages-BrZdc9Gx.mjs.map} +1 -1
- package/lib/planner-C0ylcrU1.mjs +3 -0
- package/lib/{planner-CuZaTB-P.mjs → planner-CSOl3bpc.mjs} +3 -3
- package/lib/{planner-CuZaTB-P.mjs.map → planner-CSOl3bpc.mjs.map} +1 -1
- package/lib/roomle-headless.js +7 -7
- package/lib/{roomle-sdk-CSH3WHXV.mjs → roomle-sdk-ByoTm5M6.mjs} +21 -21
- package/lib/roomle-sdk-ByoTm5M6.mjs.map +1 -0
- package/lib/roomle-sdk.js +6 -6
- package/lib/{script-loader-O8x5UOnP.mjs → script-loader-DGVS2Wqe.mjs} +2 -2
- package/lib/{script-loader-O8x5UOnP.mjs.map → script-loader-DGVS2Wqe.mjs.map} +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{tools-core-DJvn2gR6.mjs → tools-core-eVa8OooA.mjs} +3 -3
- package/lib/{tools-core-DJvn2gR6.mjs.map → tools-core-eVa8OooA.mjs.map} +1 -1
- package/package.json +2 -2
- package/sbom.cdx.json +5 -5
- package/lib/configurator-capabilities-C42HYCCb.mjs +0 -3
- package/lib/configurator-yctV6IDY.mjs +0 -3
- package/lib/glb-viewer-jt9mrYrF.mjs +0 -3
- package/lib/planner-C7kZ9SKV.mjs +0 -3
- package/lib/roomle-sdk-CSH3WHXV.mjs.map +0 -1
package/THIRD-PARTY-NOTICES.txt
CHANGED
|
Binary file
|
package/lib/RoomleCore.wasm
CHANGED
|
Binary file
|
package/lib/RoomleToolsCore.wasm
CHANGED
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { h as e, m as t } from "./roomle-sdk-
|
|
2
|
+
import { h as e, m as t } from "./roomle-sdk-ByoTm5M6.mjs";
|
|
3
3
|
//#region packages/homag-intelligence/src/api.ts
|
|
4
4
|
var n = {
|
|
5
5
|
27: "ElectricPlug",
|
|
@@ -89,4 +89,4 @@ var n = {
|
|
|
89
89
|
//#endregion
|
|
90
90
|
export { i as t };
|
|
91
91
|
|
|
92
|
-
//# sourceMappingURL=api-
|
|
92
|
+
//# sourceMappingURL=api-0LgvKoxe.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-
|
|
1
|
+
{"version":3,"file":"api-0LgvKoxe.mjs","names":[],"sources":["../../packages/homag-intelligence/src/api.ts"],"sourcesContent":["import type { RoomDesignerRequests } from './glue-logic';\nimport type { MasterData, PosGroup } from './model/oc-scripts-domain.model';\nimport type {\n ExternalPlanInstallationElement,\n ExternalPlanInstallationElementType,\n ExternalPlanObstacles,\n PlanRoomGeometryMode,\n} from './external-object-api';\nimport { PLAN_ROOM_GEOMETRY_MODE } from './external-object-api';\nimport type { RoomlePlannerType } from '../../typings/external-objects';\nimport {\n HI_CONTEXT_ACTION,\n type LoadExternalObjectOptions,\n} from './external-object-api';\n\n// The kernel levels that classify a plan object as an installation element.\n// Exact levels only: 43, 47, 52 and 55 do not classify.\nconst PLAN_INSTALLATION_ELEMENT_LEVELS: Record<\n number,\n ExternalPlanInstallationElementType\n> = {\n 27: 'ElectricPlug',\n 28: 'WaterConnection',\n};\n\n// + 0 turns IEEE -0 into +0 so serialized values never show -0\nconst round2 = (value: number): number => Math.round(value * 100) / 100 + 0;\n\n// The parts of a kernel plan object the installation-element gathering\n// reads; getPlanObjects is typed any, so the shape is named here.\ninterface PlanObjectInfo {\n level: number;\n hidden: boolean;\n getId(): number;\n getCenter(): { x: number; y: number; z: number };\n}\n\nexport interface ExternalObjectModuleIdMap {\n originalModuleId: string;\n newModuleId: string;\n}\n\nexport class RoomDesignerApi implements RoomDesignerRequests {\n private _roomlePlanner: RoomlePlannerType;\n\n constructor(roomlePlanner: RoomlePlannerType) {\n this._roomlePlanner = roomlePlanner;\n }\n\n public loadMasterData(masterData: MasterData) {\n this._roomlePlanner.loadExternalObjectMasterData(masterData);\n }\n\n public async loadPosGroups(\n posDataJson: PosGroup | PosGroup[],\n options: LoadExternalObjectOptions,\n ): Promise<void> {\n const posDataArray = Array.isArray(posDataJson)\n ? posDataJson\n : [posDataJson];\n await this._roomlePlanner.loadExternalObjectGroups(posDataArray, options);\n }\n\n completelyLoaded(): void {\n this._roomlePlanner.externalObjectsCompletelyLoaded();\n }\n\n public async selectGroup(groupId: string): Promise<void> {\n await this._roomlePlanner.selectExternalObject(\n groupId,\n null,\n HI_CONTEXT_ACTION.ROOM,\n );\n }\n\n public async selectRoot(rootModuleId: string): Promise<void> {\n await this._roomlePlanner.selectExternalObject(\n rootModuleId,\n null,\n HI_CONTEXT_ACTION.ISOLATION,\n );\n }\n\n public async selectModule(\n rootModuleId: string,\n subModuleId: string,\n ): Promise<void> {\n await this._roomlePlanner.selectExternalObject(\n rootModuleId,\n subModuleId,\n HI_CONTEXT_ACTION.ISOLATION,\n );\n }\n\n public openCloseGroup(\n groupOrRootModuleId: string,\n subModuleId: string | null,\n open: boolean,\n animate: boolean,\n ) {\n return Promise.resolve(\n this._roomlePlanner.openOrCloseGeometryOfExternalObject(\n groupOrRootModuleId,\n subModuleId ?? null,\n open,\n animate,\n ),\n );\n }\n\n public deleteGroup(groupId: string): Promise<void> {\n return this._roomlePlanner.removeExternalObject(groupId);\n }\n\n public deleteRootModule(rootModuleId: string): Promise<void> {\n return this._roomlePlanner.removeExternalObject(rootModuleId);\n }\n\n public mergeGroups(groupIds: string[]): Promise<void> {\n return this._roomlePlanner._mergeExternalObjects(groupIds);\n }\n\n public async getPosDataOfAllGroups() {\n const groups =\n (await this._roomlePlanner.getExternalObjectGroups()) as PosGroup[];\n return groups;\n }\n\n public async getRoomInformation(mode?: PlanRoomGeometryMode) {\n const rooms = await this._roomlePlanner.getExternalRoomInformation(\n mode ?? PLAN_ROOM_GEOMETRY_MODE.FLOOR,\n );\n return rooms;\n }\n\n public async getPlanObstacles(): Promise<ExternalPlanObstacles> {\n const obstacles = await this._roomlePlanner._getExternalPlanObstacles();\n const installationElements = await this._gatherInstallationElements();\n return { ...obstacles, installationElements };\n }\n\n // Installation elements are gathered from the live plan objects,\n // independently of the obstacle segments: an element is not lost merely\n // because no usable outline was exported. One entry per placed supply\n // assembly (children included); hidden owners are omitted.\n private async _gatherInstallationElements(): Promise<\n ExternalPlanInstallationElement[]\n > {\n const planInteractionManager =\n await this._roomlePlanner.getPlanInteractionManager();\n const planModelViewHelper =\n await this._roomlePlanner.getPlanModelViewHelper();\n const plan = planInteractionManager.getPlan();\n const planObjects = plan.getPlanObjects() as PlanObjectInfo[];\n const planObjectsById = new Map(\n planObjects.map((planObject) => [planObject.getId(), planObject]),\n );\n const installationElements: ExternalPlanInstallationElement[] = [];\n const typesByOwner = new Map<number, ExternalPlanInstallationElementType>();\n for (const planObject of planObjects) {\n const type = PLAN_INSTALLATION_ELEMENT_LEVELS[planObject.level];\n if (!type) {\n continue;\n }\n const ownerId = planModelViewHelper.getRootPlanObjectId(\n plan,\n planObject.getId(),\n );\n if (typesByOwner.has(ownerId)) {\n // one entry per placed supply assembly, children included\n continue;\n }\n // the owner is the assembly root, itself a plan object; getPlanObject\n // would return its data DTO, which has no getCenter method\n const owner = planObjectsById.get(ownerId) ?? planObject;\n if (owner.hidden) {\n continue;\n }\n typesByOwner.set(ownerId, type);\n const center = owner.getCenter();\n installationElements.push({\n runtimeId: ownerId,\n type,\n position: [round2(center.x), round2(center.z), round2(-center.y)],\n });\n }\n return installationElements;\n }\n\n public async saveExternalObjectSnapshot() {\n return this._roomlePlanner.saveExternalObjectSnapshot();\n }\n\n public async saveCurrentPlanSnapshot() {\n return this._roomlePlanner.saveCurrentPlanSnapshot();\n }\n\n public async renderPosDataImage(posDataJson: object) {\n const posDataArray = Array.isArray(posDataJson)\n ? posDataJson\n : [posDataJson];\n await this._roomlePlanner.renderImagesOfExternalObjectGroup(posDataArray);\n }\n}\n"],"mappings":";;;AAiBA,IAAM,IAGF;CACF,IAAI;CACJ,IAAI;CACL,EAGK,KAAU,MAA0B,KAAK,MAAM,IAAQ,IAAI,GAAG,MAAM,GAgB7D,IAAb,MAA6D;CAG3D,YAAY,GAAkC;AAC5C,OAAK,iBAAiB;;CAGxB,eAAsB,GAAwB;AAC5C,OAAK,eAAe,6BAA6B,EAAW;;CAG9D,MAAa,cACX,GACA,GACe;EACf,IAAM,IAAe,MAAM,QAAQ,EAAY,GAC3C,IACA,CAAC,EAAY;AACjB,QAAM,KAAK,eAAe,yBAAyB,GAAc,EAAQ;;CAG3E,mBAAyB;AACvB,OAAK,eAAe,iCAAiC;;CAGvD,MAAa,YAAY,GAAgC;AACvD,QAAM,KAAK,eAAe,qBACxB,GACA,MACA,EAAkB,KACnB;;CAGH,MAAa,WAAW,GAAqC;AAC3D,QAAM,KAAK,eAAe,qBACxB,GACA,MACA,EAAkB,UACnB;;CAGH,MAAa,aACX,GACA,GACe;AACf,QAAM,KAAK,eAAe,qBACxB,GACA,GACA,EAAkB,UACnB;;CAGH,eACE,GACA,GACA,GACA,GACA;AACA,SAAO,QAAQ,QACb,KAAK,eAAe,oCAClB,GACA,KAAe,MACf,GACA,EACD,CACF;;CAGH,YAAmB,GAAgC;AACjD,SAAO,KAAK,eAAe,qBAAqB,EAAQ;;CAG1D,iBAAwB,GAAqC;AAC3D,SAAO,KAAK,eAAe,qBAAqB,EAAa;;CAG/D,YAAmB,GAAmC;AACpD,SAAO,KAAK,eAAe,sBAAsB,E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C,IACA,CAAC,EAAY;AACjB,QAAM,KAAK,eAAe,kCAAkC,EAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-loader.worker-Bdvb-pt7.mjs","names":[],"sources":["../../packages/workers/generated/asset-loader.worker.js?no-inline?url"],"sourcesContent":["export default \"
|
|
1
|
+
{"version":3,"file":"asset-loader.worker-Bdvb-pt7.mjs","names":[],"sources":["../../packages/workers/generated/asset-loader.worker.js?no-inline?url"],"sourcesContent":["export default \"__VITE_ASSET__aLISaAY6NSiJFT$6GdtrfA__\""],"mappings":";;AAAA,IAAA,IAAe,KAAA,IAAA,IAAA,0BAAA,OAAA,KAAA,IAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"budgeteer.sw-ByZxiRBr.mjs","names":[],"sources":["../../packages/workers/generated/budgeteer.sw.js?no-inline?url"],"sourcesContent":["export default \"
|
|
1
|
+
{"version":3,"file":"budgeteer.sw-ByZxiRBr.mjs","names":[],"sources":["../../packages/workers/generated/budgeteer.sw.js?no-inline?url"],"sourcesContent":["export default \"__VITE_ASSET__Msg57USEadASvSStYSdmzA__\""],"mappings":";;AAAA,IAAA,IAAe,KAAA,IAAA,IAAA,mBAAA,OAAA,KAAA,IAAA,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { B as e, j as t } from "./roomle-sdk-
|
|
2
|
+
import { B as e, j as t } from "./roomle-sdk-ByoTm5M6.mjs";
|
|
3
3
|
import { i as n, r } from "./configuration-operation-schemas-Q4gAd-KO.mjs";
|
|
4
|
-
import { a as i, c as a, i as o, n as s, o as c, r as l, s as u, t as d } from "./configurator-capabilities-
|
|
4
|
+
import { a as i, c as a, i as o, n as s, o as c, r as l, s as u, t as d } from "./configurator-capabilities-o8fQ6Ang.mjs";
|
|
5
5
|
//#region packages/common-core/src/mcp-api/configuration-operations.ts
|
|
6
6
|
var f = Object.keys(n), p = Object.keys(r), m = (e) => JSON.parse(JSON.stringify(e)), h = (e) => e.map((e) => m({
|
|
7
7
|
...e,
|
|
@@ -382,4 +382,4 @@ var f = Object.keys(n), p = Object.keys(r), m = (e) => JSON.parse(JSON.stringify
|
|
|
382
382
|
//#endregion
|
|
383
383
|
export { P as executeConfigurationOperation, N as queryConfigurationOperation };
|
|
384
384
|
|
|
385
|
-
//# sourceMappingURL=configuration-operations-
|
|
385
|
+
//# sourceMappingURL=configuration-operations-B7uJDX_4.mjs.map
|
package/lib/{configuration-operations-C5rnDS8e.mjs.map → configuration-operations-B7uJDX_4.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-operations-C5rnDS8e.mjs","names":[],"sources":["../../packages/common-core/src/mcp-api/configuration-operations.ts"],"sourcesContent":["import type { z } from 'zod';\nimport {\n configurationOperationSchemas,\n configurationQuerySchemas,\n type ValidatedOperation,\n type ValidatedQuery,\n} from './configuration-operation-schemas';\nimport type ConfiguratorKernelAccess from '../configurator-kernel-access';\nimport type ConfiguratorContext from '../webgl/configurator-context';\nimport type { RapiAccess } from '../rapi-access';\nimport { BASE_CONTEXT } from '../main';\nimport type {\n ConfiguratorKernelClass,\n KernelComponent,\n KernelDockPairQuerySource,\n KernelParameter,\n KernelParameterGroup,\n PossibleChildPreviewElement,\n} from '../../../typings/kernel';\nimport { ANIMATION_PARAMETER_PREFIX } from '../../../configurator-core/src/utils/animation/animation-value-map';\nimport { collectConfiguratorCapabilities } from './configurator-capabilities';\nimport {\n configurationComponentIds,\n fetchComponentLlmData,\n readComponentLlmData,\n withParameterLlmData,\n} from './component-llm-data';\nimport {\n collectProductFamily,\n productContextOf,\n readComponentDefinition,\n} from './component-models';\nimport type {\n CapabilityJsonObject,\n ConfiguratorCapabilityContext,\n} from './configurator-capabilities-types';\nimport type {\n ConfigurationOperationHistoryState,\n ConfigurationOperationDockingChild,\n ConfigurationOperationExecutePayload,\n ConfigurationOperationHost,\n ConfigurationOperationName,\n ConfigurationOperationQueryPayload,\n ConfigurationOperationQueryResult,\n ConfigurationOperationQueryType,\n ConfigurationOperationResult,\n} from './configuration-operations-types';\n\nconst QUERY_TYPES = Object.keys(configurationQuerySchemas);\nconst EXECUTE_TYPES = Object.keys(configurationOperationSchemas);\n\ntype OperationKind = 'query' | 'operation';\ntype OperationKindLabel = 'Query' | 'Operation';\n\nconst detach = <T>(value: T): T => JSON.parse(JSON.stringify(value));\nconst detachParameters = (parameters: KernelParameter[]): KernelParameter[] =>\n parameters.map((parameter) =>\n detach({\n ...parameter,\n ...(parameter.viewType\n ? { viewType: { value: parameter.viewType.value } }\n : {}),\n }),\n );\n\nconst invalidPayload = (\n kind: OperationKind,\n name: string,\n reason: string,\n): Error => new Error(`Invalid payload for ${kind} '${name}': ${reason}`);\n\nconst parsePayload = <Schema extends z.ZodType>(\n schema: Schema,\n kind: OperationKind,\n name: string,\n payload: unknown,\n): z.output<Schema> => {\n const parsed = schema.safeParse(payload ?? {});\n if (!parsed.success) {\n throw invalidPayload(kind, name, parsed.error.issues[0].message);\n }\n return parsed.data;\n};\n\ninterface OperationSession {\n context: ConfiguratorContext;\n access: ConfiguratorKernelAccess;\n rapi: RapiAccess;\n host: ConfigurationOperationHost;\n kernel: ConfiguratorKernelClass;\n captured: ConfiguratorCapabilityContext;\n assertFresh: () => void;\n}\n\nconst parseConfigurationJson = (value: string): CapabilityJsonObject => {\n try {\n const parsed: unknown = JSON.parse(value);\n if (\n parsed !== null &&\n typeof parsed === 'object' &&\n !Array.isArray(parsed)\n ) {\n return parsed as CapabilityJsonObject;\n }\n } catch {\n /* falls through to the actionable error below */\n }\n throw new Error('Missing or invalid configuration JSON');\n};\n\nconst rootComponentIdOf = (configuration: string): string | undefined => {\n const parsed = parseConfigurationJson(configuration);\n return typeof parsed['componentId'] === 'string' && parsed['componentId']\n ? (parsed['componentId'] as string)\n : undefined;\n};\n\nconst preloadAssemblyRootDefinition = async (\n session: OperationSession,\n kind: OperationKind,\n name: string,\n configuration: string,\n): Promise<void> => {\n const rootComponentId = rootComponentIdOf(configuration);\n if (!rootComponentId) {\n return;\n }\n const record = await session.rapi.getComponent(rootComponentId);\n if (!record.configuration) {\n throw invalidPayload(\n kind,\n name,\n `the definition of root component '${rootComponentId}' has no configuration`,\n );\n }\n session.access.loadComponentIntoKernel(record.configuration, rootComponentId);\n};\n\nconst requireActiveComponent = (\n session: OperationSession,\n kind: OperationKindLabel,\n name: string,\n runtimeId: number,\n): KernelComponent => {\n let component: KernelComponent | undefined;\n try {\n component = session.kernel.getComponent(runtimeId);\n } catch {\n component = undefined;\n }\n if (!component) {\n throw new Error(\n `${kind} '${name}': no component with runtime id ${runtimeId} in the active configuration`,\n );\n }\n if (component.objectId !== session.captured.configurationRuntimeId) {\n throw new Error(\n `${kind} '${name}': component with runtime id ${runtimeId} is not part of the active configuration`,\n );\n }\n return component;\n};\n\nconst resolveDockingChildSource = async (\n session: OperationSession,\n kind: OperationKind,\n name: string,\n child: ConfigurationOperationDockingChild,\n): Promise<Exclude<KernelDockPairQuerySource, { runtimeId: number }>> => {\n if ('componentId' in child) {\n const record = await session.rapi.getComponent(child.componentId);\n if (!record.configuration) {\n throw invalidPayload(\n kind,\n name,\n `component '${child.componentId}' has no configuration`,\n );\n }\n return {\n componentId: child.componentId,\n configuration: record.configuration,\n };\n }\n if ('itemId' in child) {\n const item = await session.rapi.getItem(child.itemId);\n if (!item.configuration) {\n throw invalidPayload(\n kind,\n name,\n `item '${child.itemId}' has no configuration`,\n );\n }\n await preloadAssemblyRootDefinition(\n session,\n kind,\n name,\n item.configuration,\n );\n return { configuration: item.configuration };\n }\n await preloadAssemblyRootDefinition(session, kind, name, child.configuration);\n return { configuration: child.configuration };\n};\n\nconst previewElementOf = (\n child: ConfigurationOperationDockingChild,\n configuration: string,\n): PossibleChildPreviewElement => {\n if ('componentId' in child) {\n return {\n id: child.componentId,\n configuration,\n isComponent: true,\n isItem: false,\n };\n }\n return {\n id:\n 'itemId' in child ? child.itemId : rootComponentIdOf(configuration) ?? '',\n configuration,\n isComponent: false,\n isItem: true,\n };\n};\n\nconst runQuery = async (\n session: OperationSession,\n query: ValidatedQuery,\n): Promise<ConfigurationOperationQueryResult> => {\n const { captured, assertFresh } = session;\n switch (query.type) {\n case 'capabilities': {\n const capabilities = await collectConfiguratorCapabilities(\n session.context,\n session.access,\n session.rapi,\n query.include,\n );\n return {\n type: query.type,\n context: capabilities.context,\n capabilities,\n };\n }\n case 'configuration': {\n const configuration = parseConfigurationJson(\n session.access.getSerializedConfiguration(\n captured.configurationRuntimeId,\n ),\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n configuration: detach(configuration),\n configurationHash: captured.configurationHash,\n };\n }\n case 'componentParameters': {\n const component = requireActiveComponent(\n session,\n 'Query',\n query.type,\n query.runtimeId,\n );\n const componentId = session.kernel.getComponentId(query.runtimeId);\n const groups = detach(component.parameterGroups);\n const [kernelParameters, llmData] = await Promise.all([\n session.access.getComponentParameters(query.runtimeId),\n readComponentLlmData(session.rapi, componentId),\n ]);\n const parameters = withParameterLlmData(\n detachParameters(kernelParameters),\n [llmData],\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId: query.runtimeId,\n componentId,\n groups,\n parameters,\n };\n }\n case 'globalParameters': {\n const rootAsGlobal = session.context.rootComponentParametersAsGlobal;\n const globalDefinition = rootAsGlobal\n ? session.kernel.getComponent(captured.rootRuntimeId)\n : session.kernel.getPlanObject(captured.configurationRuntimeId);\n const groups = detach(\n (globalDefinition.parameterGroups ?? []) as KernelParameterGroup[],\n );\n const componentIds = configurationComponentIds(\n parseConfigurationJson(\n session.access.getSerializedConfiguration(\n captured.configurationRuntimeId,\n ),\n ),\n );\n const [kernelParameters, llmData] = await Promise.all([\n session.access.getGlobalParameters(\n captured.configurationRuntimeId,\n rootAsGlobal,\n ),\n Promise.all(\n componentIds.map((id) => readComponentLlmData(session.rapi, id)),\n ),\n ]);\n const parameters = withParameterLlmData(\n detachParameters(kernelParameters),\n llmData,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n scope: rootAsGlobal ? 'rootComponent' : 'planObject',\n groups,\n parameters,\n };\n }\n case 'possibleChildren': {\n const runtimeId = query.runtimeId ?? captured.configurationRuntimeId;\n if (query.runtimeId !== undefined) {\n requireActiveComponent(session, 'Query', query.type, query.runtimeId);\n }\n const children =\n query.runtimeId !== undefined\n ? await session.host.getChildrenOfPlanComponent(\n query.runtimeId,\n true,\n true,\n )\n : await session.host.getChildrenOfPlanObject(true, true);\n if (!children) {\n throw new Error(\n 'Configuration or selection changed while reading capabilities; read again',\n );\n }\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId,\n tags: detach(children.tags),\n defaultChild: children.defaultChild\n ? detach(children.defaultChild)\n : undefined,\n };\n }\n case 'dockingPositions': {\n const source = await resolveDockingChildSource(\n session,\n 'query',\n query.type,\n query.child,\n );\n const dockPairs = session.access.getDockPairs(\n captured.configurationRuntimeId,\n source,\n query.allowInsertInBetween,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n allowInsertInBetween: query.allowInsertInBetween,\n dockPairs: detach(dockPairs),\n };\n }\n case 'componentDockingPositions': {\n requireActiveComponent(session, 'Query', query.type, query.runtimeId);\n const dockPairs = session.access.getDockPairs(\n captured.configurationRuntimeId,\n { runtimeId: query.runtimeId },\n query.allowInsertInBetween,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId: query.runtimeId,\n allowInsertInBetween: query.allowInsertInBetween,\n dockPairs: detach(dockPairs),\n };\n }\n case 'deleteImpact': {\n const deletable = session.access.isComponentDeletable(\n query.runtimeId,\n query.redockChildrenToParent,\n );\n const componentsDeleted =\n session.access.determineComponentsThatWillBeDeleted(\n query.runtimeId,\n query.redockChildrenToParent,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId: query.runtimeId,\n redockChildrenToParent: query.redockChildrenToParent,\n deletable,\n componentsDeleted: detach(componentsDeleted),\n };\n }\n case 'componentSkill': {\n const { skills } = await fetchComponentLlmData(\n session.rapi,\n query.componentId,\n );\n const skill = skills.find(({ name }) => name === query.name);\n if (!skill) {\n const available = skills.length\n ? `its skills are ${skills.map(({ name }) => name).join(', ')}`\n : 'it has no skills';\n throw new Error(\n `Query 'componentSkill': component '${query.componentId}' has no skill '${query.name}'; ${available}`,\n );\n }\n assertFresh();\n return {\n type: query.type,\n context: captured,\n componentId: query.componentId,\n ...skill,\n };\n }\n case 'productContext': {\n const configuration = parseConfigurationJson(\n session.access.getSerializedConfiguration(\n captured.configurationRuntimeId,\n ),\n );\n const unresolved: Array<{\n resourceType: 'component' | 'item';\n id: string;\n reason: string;\n }> = [];\n const family = await collectProductFamily(\n session.rapi,\n configuration,\n (resourceType, id, error) =>\n unresolved.push({\n resourceType,\n id,\n reason: error instanceof Error ? error.message : String(error),\n }),\n [],\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n product: productContextOf(family, captured.rootComponentId),\n unresolved,\n };\n }\n case 'componentDefinition': {\n let component;\n try {\n component = await readComponentDefinition(\n session.rapi,\n query.componentId,\n );\n } catch (error) {\n throw new Error(\n `Query 'componentDefinition': component '${query.componentId}' could not be read: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n assertFresh();\n return { type: query.type, context: captured, component };\n }\n }\n};\n\nconst runOperation = async (\n session: OperationSession,\n operation: ValidatedOperation,\n) => {\n const { captured, assertFresh } = session;\n const resultHash = (): string =>\n session.access.getCurrentConfigurationHash(\n session.context.configurationRuntimeId,\n );\n switch (operation.type) {\n case 'changeComponentParameter': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n if (operation.key.startsWith(ANIMATION_PARAMETER_PREFIX)) {\n throw new Error(\n `Operation 'changeComponentParameter': parameter keys starting with '${ANIMATION_PARAMETER_PREFIX}' are reserved for the animation system`,\n );\n }\n const parameters = await session.access.getComponentParameters(\n operation.runtimeId,\n );\n const parameter = parameters.find((entry) => entry.key === operation.key);\n if (!parameter) {\n throw new Error(\n `Operation 'changeComponentParameter': the component with runtime id ${operation.runtimeId} has no parameter '${operation.key}'`,\n );\n }\n if (!parameter.enabled) {\n throw new Error(\n `Operation 'changeComponentParameter': the parameter '${operation.key}' of the component with runtime id ${operation.runtimeId} is disabled`,\n );\n }\n assertFresh();\n session.access.setComponentParameter(\n operation.runtimeId,\n operation.key,\n operation.value,\n );\n session.access.updateSelectedComponentDependencies(\n captured.configurationRuntimeId,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: operation.runtimeId,\n key: operation.key,\n value: operation.value,\n };\n }\n case 'changeGlobalParameter': {\n const rootAsGlobal = session.context.rootComponentParametersAsGlobal;\n const parameters = await session.access.getGlobalParameters(\n captured.configurationRuntimeId,\n rootAsGlobal,\n );\n const parameter = parameters.find((entry) => entry.key === operation.key);\n if (!parameter) {\n throw new Error(\n `Operation 'changeGlobalParameter': the active configuration has no global parameter '${operation.key}'`,\n );\n }\n if (!parameter.enabled) {\n throw new Error(\n `Operation 'changeGlobalParameter': the global parameter '${operation.key}' is disabled`,\n );\n }\n assertFresh();\n if (rootAsGlobal) {\n session.access.setComponentParameter(\n captured.rootRuntimeId,\n operation.key,\n operation.value,\n );\n } else {\n session.access.setPlanObjectParameter(\n captured.configurationRuntimeId,\n operation.key,\n operation.value,\n );\n }\n session.access.updateSelectedComponentDependencies(\n captured.configurationRuntimeId,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n scope: rootAsGlobal ? 'rootComponent' : 'planObject',\n key: operation.key,\n value: operation.value,\n };\n }\n case 'previewDockings': {\n const source = await resolveDockingChildSource(\n session,\n 'operation',\n operation.type,\n operation.child,\n );\n assertFresh();\n const dockPairs = session.access.getDockPairs(\n captured.configurationRuntimeId,\n source,\n session.access.allowInsertingBetweenWhenDocking,\n );\n session.host\n .getSceneManager()\n .requestDockingsPreview(\n true,\n previewElementOf(operation.child, source.configuration),\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n dockPairCount: dockPairs.length,\n };\n }\n case 'dockComponent': {\n const source = await resolveDockingChildSource(\n session,\n 'operation',\n operation.type,\n operation.child,\n );\n assertFresh();\n const runtimeId = session.access.dockNewComponent(\n captured.configurationRuntimeId,\n source,\n {\n parentId: operation.parentId,\n parentDockId: operation.parentDockId,\n position: operation.position,\n insertInBetween: operation.insertInBetween,\n },\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId,\n };\n }\n case 'dragComponent': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.parentId,\n );\n assertFresh();\n session.access.moveComponent(\n captured.configurationRuntimeId,\n operation.runtimeId,\n {\n parentId: operation.parentId,\n parentDockId: operation.parentDockId,\n childDockId: operation.childDockId,\n position: operation.position,\n insertInBetween: operation.insertInBetween,\n },\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: operation.runtimeId,\n };\n }\n case 'deleteComponent': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n if (\n !session.access.isComponentDeletable(\n operation.runtimeId,\n operation.redockChildrenToParent,\n )\n ) {\n throw new Error(\n `Operation 'deleteComponent': the component with runtime id ${operation.runtimeId} is not deletable with redockChildrenToParent ${operation.redockChildrenToParent}`,\n );\n }\n const componentsDeleted =\n session.access.determineComponentsThatWillBeDeleted(\n operation.runtimeId,\n operation.redockChildrenToParent,\n );\n assertFresh();\n session.access.deleteComponent(\n operation.runtimeId,\n operation.redockChildrenToParent,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: operation.runtimeId,\n redockChildrenToParent: operation.redockChildrenToParent,\n componentsDeleted: detach(componentsDeleted),\n };\n }\n case 'replaceComponent': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n const source = await resolveDockingChildSource(\n session,\n 'operation',\n operation.type,\n operation.child,\n );\n assertFresh();\n const replaced = session.access.replaceComponent(\n captured.configurationRuntimeId,\n operation.runtimeId,\n source,\n );\n if (!replaced) {\n throw new Error(\n `Operation 'replaceComponent': the configurator did not put the child in the place of the component with runtime id ${operation.runtimeId}; the configuration is unchanged. Read the configuration again before the next operation: its runtime ids can have changed`,\n );\n }\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: replaced.runtimeId,\n componentsDeleted: detach(replaced.componentsDeleted),\n };\n }\n case 'swapComponents': {\n const [firstRuntimeId, secondRuntimeId] = operation.runtimeIds;\n for (const runtimeId of [firstRuntimeId, secondRuntimeId]) {\n requireActiveComponent(session, 'Operation', operation.type, runtimeId);\n }\n assertFresh();\n session.access.swapComponents(\n captured.configurationRuntimeId,\n firstRuntimeId,\n secondRuntimeId,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeIds: [firstRuntimeId, secondRuntimeId],\n };\n }\n case 'loadConfiguration': {\n await session.host\n .getSceneManager()\n .reloadConfiguration(operation.configuration);\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n };\n }\n case 'undo': {\n await session.host.undo();\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n };\n }\n case 'redo': {\n await session.host.redo();\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n };\n }\n }\n};\n\nconst STALE_QUERY_MESSAGE =\n 'Configuration or selection changed while reading capabilities; read again';\nconst STALE_OPERATION_MESSAGE =\n 'Configuration or selection changed while executing the operation; the operation was not applied';\n\ninterface QueuedConfiguration {\n pending: number;\n configurationRuntimeId: number;\n}\n\nlet operationChain: Promise<unknown> = Promise.resolve();\nconst queuedConfigurations = new WeakMap<\n ConfiguratorContext,\n QueuedConfiguration\n>();\n\nconst enqueue = <T>(\n context: ConfiguratorContext,\n staleMessage: string,\n work: (queued: QueuedConfiguration) => Promise<T>,\n): Promise<T> => {\n const current = queuedConfigurations.get(context);\n const queued = current?.pending\n ? current\n : { pending: 0, configurationRuntimeId: context.configurationRuntimeId };\n queuedConfigurations.set(context, queued);\n queued.pending += 1;\n const run = operationChain.then(() => {\n if (context.configurationRuntimeId !== queued.configurationRuntimeId) {\n throw new Error(staleMessage);\n }\n return work(queued);\n });\n operationChain = run\n .finally(() => {\n queued.pending -= 1;\n })\n .catch(() => undefined);\n return run;\n};\n\nconst captureContext = (\n context: ConfiguratorContext,\n kernel: ConfiguratorKernelClass,\n access: ConfiguratorKernelAccess,\n): ConfiguratorCapabilityContext => {\n if (\n context.baseContext !== BASE_CONTEXT.CONFIGURATOR ||\n !context.configurationRuntimeId\n ) {\n throw new Error(\n 'Load a configuration or enter planner isolation before reading configurator capabilities',\n );\n }\n if (kernel.isExternalPlanObject(context.configurationRuntimeId)) {\n throw new Error(\n 'Use the HI external-object API to read capabilities of an external configuration',\n );\n }\n const rootRuntimeId = kernel.getRootPlanComponentIdFromObjectId(\n context.configurationRuntimeId,\n );\n if (!rootRuntimeId) {\n throw new Error(\n 'No active root component; load a configuration before reading capabilities',\n );\n }\n return {\n configurationRuntimeId: context.configurationRuntimeId,\n rootRuntimeId,\n rootComponentId: kernel.getComponentId(rootRuntimeId),\n selectedRuntimeIds: [...context.selectedRuntimeComponentIds],\n configurationHash: access.getCurrentConfigurationHash(\n context.configurationRuntimeId,\n ),\n };\n};\n\nconst createAssertFresh = (\n context: ConfiguratorContext,\n kernel: ConfiguratorKernelClass,\n access: ConfiguratorKernelAccess,\n captured: ConfiguratorCapabilityContext,\n staleMessage: string,\n): (() => void) => {\n const rootAsGlobal = context.rootComponentParametersAsGlobal;\n const contextRootId = context.rootComponentId;\n return () => {\n try {\n if (\n JSON.stringify(captureContext(context, kernel, access)) ===\n JSON.stringify(captured) &&\n rootAsGlobal === context.rootComponentParametersAsGlobal &&\n contextRootId === context.rootComponentId\n ) {\n return;\n }\n } catch {\n /* A target that disappeared also invalidates the captured read. */\n }\n throw new Error(staleMessage);\n };\n};\n\nexport const queryConfigurationOperation = (\n context: ConfiguratorContext,\n access: ConfiguratorKernelAccess,\n rapi: RapiAccess,\n host: ConfigurationOperationHost,\n type: ConfigurationOperationQueryType,\n payload?: ConfigurationOperationQueryPayload,\n): Promise<ConfigurationOperationQueryResult> =>\n enqueue(context, STALE_QUERY_MESSAGE, async () => {\n if (!QUERY_TYPES.includes(type)) {\n throw new Error(\n `Unknown configuration operation query type '${String(type)}'; expected one of: ${QUERY_TYPES.join(', ')}`,\n );\n }\n const query = {\n ...parsePayload(configurationQuerySchemas[type], 'query', type, payload),\n type,\n } as ValidatedQuery;\n const kernel = access.kernelInstance;\n const captured = captureContext(context, kernel, access);\n const assertFresh = createAssertFresh(\n context,\n kernel,\n access,\n captured,\n STALE_QUERY_MESSAGE,\n );\n return runQuery(\n {\n context,\n access,\n rapi,\n host,\n kernel,\n captured,\n assertFresh,\n },\n query,\n );\n });\n\nexport const executeConfigurationOperation = (\n context: ConfiguratorContext,\n access: ConfiguratorKernelAccess,\n rapi: RapiAccess,\n host: ConfigurationOperationHost,\n readHistory: () => ConfigurationOperationHistoryState,\n name: ConfigurationOperationName,\n payload?: ConfigurationOperationExecutePayload,\n): Promise<ConfigurationOperationResult> =>\n enqueue(context, STALE_OPERATION_MESSAGE, async (queued) => {\n if (!EXECUTE_TYPES.includes(name)) {\n throw new Error(\n `Unknown configuration operation '${String(name)}'; expected one of: ${EXECUTE_TYPES.join(', ')}`,\n );\n }\n const operation = {\n ...parsePayload(\n configurationOperationSchemas[name],\n 'operation',\n name,\n payload,\n ),\n type: name,\n } as ValidatedOperation;\n const kernel = access.kernelInstance;\n const captured = captureContext(context, kernel, access);\n const assertFresh = createAssertFresh(\n context,\n kernel,\n access,\n captured,\n STALE_OPERATION_MESSAGE,\n );\n const before = readHistory();\n const result = await runOperation(\n {\n context,\n access,\n rapi,\n host,\n kernel,\n captured,\n assertFresh,\n },\n operation,\n );\n queued.configurationRuntimeId = context.configurationRuntimeId;\n const after = readHistory();\n return {\n ...result,\n history: {\n changed:\n before.configurationHash !== after.configurationHash &&\n after.configurationHash === result.configurationHash,\n canUndo: after.canUndo,\n canRedo: after.canRedo,\n },\n } as ConfigurationOperationResult;\n });\n"],"mappings":";;;;;AAgDA,IAAM,IAAc,OAAO,KAAK,EAA0B,EACpD,IAAgB,OAAO,KAAK,EAA8B,EAK1D,KAAa,MAAgB,KAAK,MAAM,KAAK,UAAU,EAAM,CAAC,EAC9D,KAAoB,MACxB,EAAW,KAAK,MACd,EAAO;CACL,GAAG;CACH,GAAI,EAAU,WACV,EAAE,UAAU,EAAE,OAAO,EAAU,SAAS,OAAO,EAAE,GACjD,EAAE;CACP,CAAC,CACH,EAEG,KACJ,GACA,GACA,MACU,gBAAI,MAAM,uBAAuB,EAAK,IAAI,EAAK,KAAK,IAAS,EAEnE,KACJ,GACA,GACA,GACA,MACqB;CACrB,IAAM,IAAS,EAAO,UAAU,KAAW,EAAE,CAAC;AAC9C,KAAI,CAAC,EAAO,QACV,OAAM,EAAe,GAAM,GAAM,EAAO,MAAM,OAAO,GAAG,QAAQ;AAElE,QAAO,EAAO;GAaV,KAA0B,MAAwC;AACtE,KAAI;EACF,IAAM,IAAkB,KAAK,MAAM,EAAM;AACzC,MAEE,OAAO,KAAW,YADlB,KAEA,CAAC,MAAM,QAAQ,EAAO,CAEtB,QAAO;SAEH;AAGR,OAAU,MAAM,wCAAwC;GAGpD,KAAqB,MAA8C;CACvE,IAAM,IAAS,EAAuB,EAAc;AACpD,QAAO,OAAO,EAAO,eAAmB,YAAY,EAAO,cACtD,EAAO,cACR,KAAA;GAGA,IAAgC,OACpC,GACA,GACA,GACA,MACkB;CAClB,IAAM,IAAkB,EAAkB,EAAc;AACxD,KAAI,CAAC,EACH;CAEF,IAAM,IAAS,MAAM,EAAQ,KAAK,aAAa,EAAgB;AAC/D,KAAI,CAAC,EAAO,cACV,OAAM,EACJ,GACA,GACA,qCAAqC,EAAgB,wBACtD;AAEH,GAAQ,OAAO,wBAAwB,EAAO,eAAe,EAAgB;GAGzE,KACJ,GACA,GACA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AAK,GACzG;CAEH,IAAM,IAAQ;EACZ,GAAG,EAAa,EAA0B,IAAO,SAAS,GAAM,EAAQ;EACxE;EACD,EACK,IAAS,EAAO,gBAChB,IAAW,EAAe,GAAS,GAAQ,EAAO;AAQxD,QAAO,EACL;EACE;EACA;EACA;EACA;EACA;EACA;EACA,aAfgB,EAClB,GACA,GACA,GACA,GACA,EACD;EAUE,EACD,EACD;EACD,EAES,KACX,GACA,GACA,GACA,GACA,GACA,GACA,MAEA,EAAQ,GAAS,GAAyB,OAAO,MAAW;AAC1D,KAAI,CAAC,EAAc,SAAS,EAAK,CAC/B,OAAU,MACR,oCAAoC,OAAO,EAAK,CAAC,sBAAsB,EAAc,KAAK,KAAK,GAChG;CAEH,IAAM,IAAY;EAChB,GAAG,EACD,EAA8B,IAC9B,aACA,GACA,EACD;EACD,MAAM;EACP,EACK,IAAS,EAAO,gBAChB,IAAW,EAAe,GAAS,GAAQ,EAAO,EAClD,IAAc,EAClB,GACA,GACA,GACA,GACA,EACD,EACK,IAAS,GAAa,EACtB,IAAS,MAAM,EACnB;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACD,EACD,EACD;AACD,GAAO,yBAAyB,EAAQ;CACxC,IAAM,IAAQ,GAAa;AAC3B,QAAO;EACL,GAAG;EACH,SAAS;GACP,SACE,EAAO,sBAAsB,EAAM,qBACnC,EAAM,sBAAsB,EAAO;GACrC,SAAS,EAAM;GACf,SAAS,EAAM;GAChB;EACF;EACD"}
|
|
1
|
+
{"version":3,"file":"configuration-operations-B7uJDX_4.mjs","names":[],"sources":["../../packages/common-core/src/mcp-api/configuration-operations.ts"],"sourcesContent":["import type { z } from 'zod';\nimport {\n configurationOperationSchemas,\n configurationQuerySchemas,\n type ValidatedOperation,\n type ValidatedQuery,\n} from './configuration-operation-schemas';\nimport type ConfiguratorKernelAccess from '../configurator-kernel-access';\nimport type ConfiguratorContext from '../webgl/configurator-context';\nimport type { RapiAccess } from '../rapi-access';\nimport { BASE_CONTEXT } from '../main';\nimport type {\n ConfiguratorKernelClass,\n KernelComponent,\n KernelDockPairQuerySource,\n KernelParameter,\n KernelParameterGroup,\n PossibleChildPreviewElement,\n} from '../../../typings/kernel';\nimport { ANIMATION_PARAMETER_PREFIX } from '../../../configurator-core/src/utils/animation/animation-value-map';\nimport { collectConfiguratorCapabilities } from './configurator-capabilities';\nimport {\n configurationComponentIds,\n fetchComponentLlmData,\n readComponentLlmData,\n withParameterLlmData,\n} from './component-llm-data';\nimport {\n collectProductFamily,\n productContextOf,\n readComponentDefinition,\n} from './component-models';\nimport type {\n CapabilityJsonObject,\n ConfiguratorCapabilityContext,\n} from './configurator-capabilities-types';\nimport type {\n ConfigurationOperationHistoryState,\n ConfigurationOperationDockingChild,\n ConfigurationOperationExecutePayload,\n ConfigurationOperationHost,\n ConfigurationOperationName,\n ConfigurationOperationQueryPayload,\n ConfigurationOperationQueryResult,\n ConfigurationOperationQueryType,\n ConfigurationOperationResult,\n} from './configuration-operations-types';\n\nconst QUERY_TYPES = Object.keys(configurationQuerySchemas);\nconst EXECUTE_TYPES = Object.keys(configurationOperationSchemas);\n\ntype OperationKind = 'query' | 'operation';\ntype OperationKindLabel = 'Query' | 'Operation';\n\nconst detach = <T>(value: T): T => JSON.parse(JSON.stringify(value));\nconst detachParameters = (parameters: KernelParameter[]): KernelParameter[] =>\n parameters.map((parameter) =>\n detach({\n ...parameter,\n ...(parameter.viewType\n ? { viewType: { value: parameter.viewType.value } }\n : {}),\n }),\n );\n\nconst invalidPayload = (\n kind: OperationKind,\n name: string,\n reason: string,\n): Error => new Error(`Invalid payload for ${kind} '${name}': ${reason}`);\n\nconst parsePayload = <Schema extends z.ZodType>(\n schema: Schema,\n kind: OperationKind,\n name: string,\n payload: unknown,\n): z.output<Schema> => {\n const parsed = schema.safeParse(payload ?? {});\n if (!parsed.success) {\n throw invalidPayload(kind, name, parsed.error.issues[0].message);\n }\n return parsed.data;\n};\n\ninterface OperationSession {\n context: ConfiguratorContext;\n access: ConfiguratorKernelAccess;\n rapi: RapiAccess;\n host: ConfigurationOperationHost;\n kernel: ConfiguratorKernelClass;\n captured: ConfiguratorCapabilityContext;\n assertFresh: () => void;\n}\n\nconst parseConfigurationJson = (value: string): CapabilityJsonObject => {\n try {\n const parsed: unknown = JSON.parse(value);\n if (\n parsed !== null &&\n typeof parsed === 'object' &&\n !Array.isArray(parsed)\n ) {\n return parsed as CapabilityJsonObject;\n }\n } catch {\n /* falls through to the actionable error below */\n }\n throw new Error('Missing or invalid configuration JSON');\n};\n\nconst rootComponentIdOf = (configuration: string): string | undefined => {\n const parsed = parseConfigurationJson(configuration);\n return typeof parsed['componentId'] === 'string' && parsed['componentId']\n ? (parsed['componentId'] as string)\n : undefined;\n};\n\nconst preloadAssemblyRootDefinition = async (\n session: OperationSession,\n kind: OperationKind,\n name: string,\n configuration: string,\n): Promise<void> => {\n const rootComponentId = rootComponentIdOf(configuration);\n if (!rootComponentId) {\n return;\n }\n const record = await session.rapi.getComponent(rootComponentId);\n if (!record.configuration) {\n throw invalidPayload(\n kind,\n name,\n `the definition of root component '${rootComponentId}' has no configuration`,\n );\n }\n session.access.loadComponentIntoKernel(record.configuration, rootComponentId);\n};\n\nconst requireActiveComponent = (\n session: OperationSession,\n kind: OperationKindLabel,\n name: string,\n runtimeId: number,\n): KernelComponent => {\n let component: KernelComponent | undefined;\n try {\n component = session.kernel.getComponent(runtimeId);\n } catch {\n component = undefined;\n }\n if (!component) {\n throw new Error(\n `${kind} '${name}': no component with runtime id ${runtimeId} in the active configuration`,\n );\n }\n if (component.objectId !== session.captured.configurationRuntimeId) {\n throw new Error(\n `${kind} '${name}': component with runtime id ${runtimeId} is not part of the active configuration`,\n );\n }\n return component;\n};\n\nconst resolveDockingChildSource = async (\n session: OperationSession,\n kind: OperationKind,\n name: string,\n child: ConfigurationOperationDockingChild,\n): Promise<Exclude<KernelDockPairQuerySource, { runtimeId: number }>> => {\n if ('componentId' in child) {\n const record = await session.rapi.getComponent(child.componentId);\n if (!record.configuration) {\n throw invalidPayload(\n kind,\n name,\n `component '${child.componentId}' has no configuration`,\n );\n }\n return {\n componentId: child.componentId,\n configuration: record.configuration,\n };\n }\n if ('itemId' in child) {\n const item = await session.rapi.getItem(child.itemId);\n if (!item.configuration) {\n throw invalidPayload(\n kind,\n name,\n `item '${child.itemId}' has no configuration`,\n );\n }\n await preloadAssemblyRootDefinition(\n session,\n kind,\n name,\n item.configuration,\n );\n return { configuration: item.configuration };\n }\n await preloadAssemblyRootDefinition(session, kind, name, child.configuration);\n return { configuration: child.configuration };\n};\n\nconst previewElementOf = (\n child: ConfigurationOperationDockingChild,\n configuration: string,\n): PossibleChildPreviewElement => {\n if ('componentId' in child) {\n return {\n id: child.componentId,\n configuration,\n isComponent: true,\n isItem: false,\n };\n }\n return {\n id:\n 'itemId' in child ? child.itemId : rootComponentIdOf(configuration) ?? '',\n configuration,\n isComponent: false,\n isItem: true,\n };\n};\n\nconst runQuery = async (\n session: OperationSession,\n query: ValidatedQuery,\n): Promise<ConfigurationOperationQueryResult> => {\n const { captured, assertFresh } = session;\n switch (query.type) {\n case 'capabilities': {\n const capabilities = await collectConfiguratorCapabilities(\n session.context,\n session.access,\n session.rapi,\n query.include,\n );\n return {\n type: query.type,\n context: capabilities.context,\n capabilities,\n };\n }\n case 'configuration': {\n const configuration = parseConfigurationJson(\n session.access.getSerializedConfiguration(\n captured.configurationRuntimeId,\n ),\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n configuration: detach(configuration),\n configurationHash: captured.configurationHash,\n };\n }\n case 'componentParameters': {\n const component = requireActiveComponent(\n session,\n 'Query',\n query.type,\n query.runtimeId,\n );\n const componentId = session.kernel.getComponentId(query.runtimeId);\n const groups = detach(component.parameterGroups);\n const [kernelParameters, llmData] = await Promise.all([\n session.access.getComponentParameters(query.runtimeId),\n readComponentLlmData(session.rapi, componentId),\n ]);\n const parameters = withParameterLlmData(\n detachParameters(kernelParameters),\n [llmData],\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId: query.runtimeId,\n componentId,\n groups,\n parameters,\n };\n }\n case 'globalParameters': {\n const rootAsGlobal = session.context.rootComponentParametersAsGlobal;\n const globalDefinition = rootAsGlobal\n ? session.kernel.getComponent(captured.rootRuntimeId)\n : session.kernel.getPlanObject(captured.configurationRuntimeId);\n const groups = detach(\n (globalDefinition.parameterGroups ?? []) as KernelParameterGroup[],\n );\n const componentIds = configurationComponentIds(\n parseConfigurationJson(\n session.access.getSerializedConfiguration(\n captured.configurationRuntimeId,\n ),\n ),\n );\n const [kernelParameters, llmData] = await Promise.all([\n session.access.getGlobalParameters(\n captured.configurationRuntimeId,\n rootAsGlobal,\n ),\n Promise.all(\n componentIds.map((id) => readComponentLlmData(session.rapi, id)),\n ),\n ]);\n const parameters = withParameterLlmData(\n detachParameters(kernelParameters),\n llmData,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n scope: rootAsGlobal ? 'rootComponent' : 'planObject',\n groups,\n parameters,\n };\n }\n case 'possibleChildren': {\n const runtimeId = query.runtimeId ?? captured.configurationRuntimeId;\n if (query.runtimeId !== undefined) {\n requireActiveComponent(session, 'Query', query.type, query.runtimeId);\n }\n const children =\n query.runtimeId !== undefined\n ? await session.host.getChildrenOfPlanComponent(\n query.runtimeId,\n true,\n true,\n )\n : await session.host.getChildrenOfPlanObject(true, true);\n if (!children) {\n throw new Error(\n 'Configuration or selection changed while reading capabilities; read again',\n );\n }\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId,\n tags: detach(children.tags),\n defaultChild: children.defaultChild\n ? detach(children.defaultChild)\n : undefined,\n };\n }\n case 'dockingPositions': {\n const source = await resolveDockingChildSource(\n session,\n 'query',\n query.type,\n query.child,\n );\n const dockPairs = session.access.getDockPairs(\n captured.configurationRuntimeId,\n source,\n query.allowInsertInBetween,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n allowInsertInBetween: query.allowInsertInBetween,\n dockPairs: detach(dockPairs),\n };\n }\n case 'componentDockingPositions': {\n requireActiveComponent(session, 'Query', query.type, query.runtimeId);\n const dockPairs = session.access.getDockPairs(\n captured.configurationRuntimeId,\n { runtimeId: query.runtimeId },\n query.allowInsertInBetween,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId: query.runtimeId,\n allowInsertInBetween: query.allowInsertInBetween,\n dockPairs: detach(dockPairs),\n };\n }\n case 'deleteImpact': {\n const deletable = session.access.isComponentDeletable(\n query.runtimeId,\n query.redockChildrenToParent,\n );\n const componentsDeleted =\n session.access.determineComponentsThatWillBeDeleted(\n query.runtimeId,\n query.redockChildrenToParent,\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n runtimeId: query.runtimeId,\n redockChildrenToParent: query.redockChildrenToParent,\n deletable,\n componentsDeleted: detach(componentsDeleted),\n };\n }\n case 'componentSkill': {\n const { skills } = await fetchComponentLlmData(\n session.rapi,\n query.componentId,\n );\n const skill = skills.find(({ name }) => name === query.name);\n if (!skill) {\n const available = skills.length\n ? `its skills are ${skills.map(({ name }) => name).join(', ')}`\n : 'it has no skills';\n throw new Error(\n `Query 'componentSkill': component '${query.componentId}' has no skill '${query.name}'; ${available}`,\n );\n }\n assertFresh();\n return {\n type: query.type,\n context: captured,\n componentId: query.componentId,\n ...skill,\n };\n }\n case 'productContext': {\n const configuration = parseConfigurationJson(\n session.access.getSerializedConfiguration(\n captured.configurationRuntimeId,\n ),\n );\n const unresolved: Array<{\n resourceType: 'component' | 'item';\n id: string;\n reason: string;\n }> = [];\n const family = await collectProductFamily(\n session.rapi,\n configuration,\n (resourceType, id, error) =>\n unresolved.push({\n resourceType,\n id,\n reason: error instanceof Error ? error.message : String(error),\n }),\n [],\n );\n assertFresh();\n return {\n type: query.type,\n context: captured,\n product: productContextOf(family, captured.rootComponentId),\n unresolved,\n };\n }\n case 'componentDefinition': {\n let component;\n try {\n component = await readComponentDefinition(\n session.rapi,\n query.componentId,\n );\n } catch (error) {\n throw new Error(\n `Query 'componentDefinition': component '${query.componentId}' could not be read: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n assertFresh();\n return { type: query.type, context: captured, component };\n }\n }\n};\n\nconst runOperation = async (\n session: OperationSession,\n operation: ValidatedOperation,\n) => {\n const { captured, assertFresh } = session;\n const resultHash = (): string =>\n session.access.getCurrentConfigurationHash(\n session.context.configurationRuntimeId,\n );\n switch (operation.type) {\n case 'changeComponentParameter': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n if (operation.key.startsWith(ANIMATION_PARAMETER_PREFIX)) {\n throw new Error(\n `Operation 'changeComponentParameter': parameter keys starting with '${ANIMATION_PARAMETER_PREFIX}' are reserved for the animation system`,\n );\n }\n const parameters = await session.access.getComponentParameters(\n operation.runtimeId,\n );\n const parameter = parameters.find((entry) => entry.key === operation.key);\n if (!parameter) {\n throw new Error(\n `Operation 'changeComponentParameter': the component with runtime id ${operation.runtimeId} has no parameter '${operation.key}'`,\n );\n }\n if (!parameter.enabled) {\n throw new Error(\n `Operation 'changeComponentParameter': the parameter '${operation.key}' of the component with runtime id ${operation.runtimeId} is disabled`,\n );\n }\n assertFresh();\n session.access.setComponentParameter(\n operation.runtimeId,\n operation.key,\n operation.value,\n );\n session.access.updateSelectedComponentDependencies(\n captured.configurationRuntimeId,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: operation.runtimeId,\n key: operation.key,\n value: operation.value,\n };\n }\n case 'changeGlobalParameter': {\n const rootAsGlobal = session.context.rootComponentParametersAsGlobal;\n const parameters = await session.access.getGlobalParameters(\n captured.configurationRuntimeId,\n rootAsGlobal,\n );\n const parameter = parameters.find((entry) => entry.key === operation.key);\n if (!parameter) {\n throw new Error(\n `Operation 'changeGlobalParameter': the active configuration has no global parameter '${operation.key}'`,\n );\n }\n if (!parameter.enabled) {\n throw new Error(\n `Operation 'changeGlobalParameter': the global parameter '${operation.key}' is disabled`,\n );\n }\n assertFresh();\n if (rootAsGlobal) {\n session.access.setComponentParameter(\n captured.rootRuntimeId,\n operation.key,\n operation.value,\n );\n } else {\n session.access.setPlanObjectParameter(\n captured.configurationRuntimeId,\n operation.key,\n operation.value,\n );\n }\n session.access.updateSelectedComponentDependencies(\n captured.configurationRuntimeId,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n scope: rootAsGlobal ? 'rootComponent' : 'planObject',\n key: operation.key,\n value: operation.value,\n };\n }\n case 'previewDockings': {\n const source = await resolveDockingChildSource(\n session,\n 'operation',\n operation.type,\n operation.child,\n );\n assertFresh();\n const dockPairs = session.access.getDockPairs(\n captured.configurationRuntimeId,\n source,\n session.access.allowInsertingBetweenWhenDocking,\n );\n session.host\n .getSceneManager()\n .requestDockingsPreview(\n true,\n previewElementOf(operation.child, source.configuration),\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n dockPairCount: dockPairs.length,\n };\n }\n case 'dockComponent': {\n const source = await resolveDockingChildSource(\n session,\n 'operation',\n operation.type,\n operation.child,\n );\n assertFresh();\n const runtimeId = session.access.dockNewComponent(\n captured.configurationRuntimeId,\n source,\n {\n parentId: operation.parentId,\n parentDockId: operation.parentDockId,\n position: operation.position,\n insertInBetween: operation.insertInBetween,\n },\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId,\n };\n }\n case 'dragComponent': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.parentId,\n );\n assertFresh();\n session.access.moveComponent(\n captured.configurationRuntimeId,\n operation.runtimeId,\n {\n parentId: operation.parentId,\n parentDockId: operation.parentDockId,\n childDockId: operation.childDockId,\n position: operation.position,\n insertInBetween: operation.insertInBetween,\n },\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: operation.runtimeId,\n };\n }\n case 'deleteComponent': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n if (\n !session.access.isComponentDeletable(\n operation.runtimeId,\n operation.redockChildrenToParent,\n )\n ) {\n throw new Error(\n `Operation 'deleteComponent': the component with runtime id ${operation.runtimeId} is not deletable with redockChildrenToParent ${operation.redockChildrenToParent}`,\n );\n }\n const componentsDeleted =\n session.access.determineComponentsThatWillBeDeleted(\n operation.runtimeId,\n operation.redockChildrenToParent,\n );\n assertFresh();\n session.access.deleteComponent(\n operation.runtimeId,\n operation.redockChildrenToParent,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: operation.runtimeId,\n redockChildrenToParent: operation.redockChildrenToParent,\n componentsDeleted: detach(componentsDeleted),\n };\n }\n case 'replaceComponent': {\n requireActiveComponent(\n session,\n 'Operation',\n operation.type,\n operation.runtimeId,\n );\n const source = await resolveDockingChildSource(\n session,\n 'operation',\n operation.type,\n operation.child,\n );\n assertFresh();\n const replaced = session.access.replaceComponent(\n captured.configurationRuntimeId,\n operation.runtimeId,\n source,\n );\n if (!replaced) {\n throw new Error(\n `Operation 'replaceComponent': the configurator did not put the child in the place of the component with runtime id ${operation.runtimeId}; the configuration is unchanged. Read the configuration again before the next operation: its runtime ids can have changed`,\n );\n }\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeId: replaced.runtimeId,\n componentsDeleted: detach(replaced.componentsDeleted),\n };\n }\n case 'swapComponents': {\n const [firstRuntimeId, secondRuntimeId] = operation.runtimeIds;\n for (const runtimeId of [firstRuntimeId, secondRuntimeId]) {\n requireActiveComponent(session, 'Operation', operation.type, runtimeId);\n }\n assertFresh();\n session.access.swapComponents(\n captured.configurationRuntimeId,\n firstRuntimeId,\n secondRuntimeId,\n );\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n runtimeIds: [firstRuntimeId, secondRuntimeId],\n };\n }\n case 'loadConfiguration': {\n await session.host\n .getSceneManager()\n .reloadConfiguration(operation.configuration);\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n };\n }\n case 'undo': {\n await session.host.undo();\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n };\n }\n case 'redo': {\n await session.host.redo();\n return {\n type: operation.type,\n context: captured,\n configurationHash: resultHash(),\n };\n }\n }\n};\n\nconst STALE_QUERY_MESSAGE =\n 'Configuration or selection changed while reading capabilities; read again';\nconst STALE_OPERATION_MESSAGE =\n 'Configuration or selection changed while executing the operation; the operation was not applied';\n\ninterface QueuedConfiguration {\n pending: number;\n configurationRuntimeId: number;\n}\n\nlet operationChain: Promise<unknown> = Promise.resolve();\nconst queuedConfigurations = new WeakMap<\n ConfiguratorContext,\n QueuedConfiguration\n>();\n\nconst enqueue = <T>(\n context: ConfiguratorContext,\n staleMessage: string,\n work: (queued: QueuedConfiguration) => Promise<T>,\n): Promise<T> => {\n const current = queuedConfigurations.get(context);\n const queued = current?.pending\n ? current\n : { pending: 0, configurationRuntimeId: context.configurationRuntimeId };\n queuedConfigurations.set(context, queued);\n queued.pending += 1;\n const run = operationChain.then(() => {\n if (context.configurationRuntimeId !== queued.configurationRuntimeId) {\n throw new Error(staleMessage);\n }\n return work(queued);\n });\n operationChain = run\n .finally(() => {\n queued.pending -= 1;\n })\n .catch(() => undefined);\n return run;\n};\n\nconst captureContext = (\n context: ConfiguratorContext,\n kernel: ConfiguratorKernelClass,\n access: ConfiguratorKernelAccess,\n): ConfiguratorCapabilityContext => {\n if (\n context.baseContext !== BASE_CONTEXT.CONFIGURATOR ||\n !context.configurationRuntimeId\n ) {\n throw new Error(\n 'Load a configuration or enter planner isolation before reading configurator capabilities',\n );\n }\n if (kernel.isExternalPlanObject(context.configurationRuntimeId)) {\n throw new Error(\n 'Use the HI external-object API to read capabilities of an external configuration',\n );\n }\n const rootRuntimeId = kernel.getRootPlanComponentIdFromObjectId(\n context.configurationRuntimeId,\n );\n if (!rootRuntimeId) {\n throw new Error(\n 'No active root component; load a configuration before reading capabilities',\n );\n }\n return {\n configurationRuntimeId: context.configurationRuntimeId,\n rootRuntimeId,\n rootComponentId: kernel.getComponentId(rootRuntimeId),\n selectedRuntimeIds: [...context.selectedRuntimeComponentIds],\n configurationHash: access.getCurrentConfigurationHash(\n context.configurationRuntimeId,\n ),\n };\n};\n\nconst createAssertFresh = (\n context: ConfiguratorContext,\n kernel: ConfiguratorKernelClass,\n access: ConfiguratorKernelAccess,\n captured: ConfiguratorCapabilityContext,\n staleMessage: string,\n): (() => void) => {\n const rootAsGlobal = context.rootComponentParametersAsGlobal;\n const contextRootId = context.rootComponentId;\n return () => {\n try {\n if (\n JSON.stringify(captureContext(context, kernel, access)) ===\n JSON.stringify(captured) &&\n rootAsGlobal === context.rootComponentParametersAsGlobal &&\n contextRootId === context.rootComponentId\n ) {\n return;\n }\n } catch {\n /* A target that disappeared also invalidates the captured read. */\n }\n throw new Error(staleMessage);\n };\n};\n\nexport const queryConfigurationOperation = (\n context: ConfiguratorContext,\n access: ConfiguratorKernelAccess,\n rapi: RapiAccess,\n host: ConfigurationOperationHost,\n type: ConfigurationOperationQueryType,\n payload?: ConfigurationOperationQueryPayload,\n): Promise<ConfigurationOperationQueryResult> =>\n enqueue(context, STALE_QUERY_MESSAGE, async () => {\n if (!QUERY_TYPES.includes(type)) {\n throw new Error(\n `Unknown configuration operation query type '${String(type)}'; expected one of: ${QUERY_TYPES.join(', ')}`,\n );\n }\n const query = {\n ...parsePayload(configurationQuerySchemas[type], 'query', type, payload),\n type,\n } as ValidatedQuery;\n const kernel = access.kernelInstance;\n const captured = captureContext(context, kernel, access);\n const assertFresh = createAssertFresh(\n context,\n kernel,\n access,\n captured,\n STALE_QUERY_MESSAGE,\n );\n return runQuery(\n {\n context,\n access,\n rapi,\n host,\n kernel,\n captured,\n assertFresh,\n },\n query,\n );\n });\n\nexport const executeConfigurationOperation = (\n context: ConfiguratorContext,\n access: ConfiguratorKernelAccess,\n rapi: RapiAccess,\n host: ConfigurationOperationHost,\n readHistory: () => ConfigurationOperationHistoryState,\n name: ConfigurationOperationName,\n payload?: ConfigurationOperationExecutePayload,\n): Promise<ConfigurationOperationResult> =>\n enqueue(context, STALE_OPERATION_MESSAGE, async (queued) => {\n if (!EXECUTE_TYPES.includes(name)) {\n throw new Error(\n `Unknown configuration operation '${String(name)}'; expected one of: ${EXECUTE_TYPES.join(', ')}`,\n );\n }\n const operation = {\n ...parsePayload(\n configurationOperationSchemas[name],\n 'operation',\n name,\n payload,\n ),\n type: name,\n } as ValidatedOperation;\n const kernel = access.kernelInstance;\n const captured = captureContext(context, kernel, access);\n const assertFresh = createAssertFresh(\n context,\n kernel,\n access,\n captured,\n STALE_OPERATION_MESSAGE,\n );\n const before = readHistory();\n const result = await runOperation(\n {\n context,\n access,\n rapi,\n host,\n kernel,\n captured,\n assertFresh,\n },\n operation,\n );\n queued.configurationRuntimeId = context.configurationRuntimeId;\n const after = readHistory();\n return {\n ...result,\n history: {\n changed:\n before.configurationHash !== after.configurationHash &&\n after.configurationHash === result.configurationHash,\n canUndo: after.canUndo,\n canRedo: after.canRedo,\n },\n } as ConfigurationOperationResult;\n });\n"],"mappings":";;;;;AAgDA,IAAM,IAAc,OAAO,KAAK,EAA0B,EACpD,IAAgB,OAAO,KAAK,EAA8B,EAK1D,KAAa,MAAgB,KAAK,MAAM,KAAK,UAAU,EAAM,CAAC,EAC9D,KAAoB,MACxB,EAAW,KAAK,MACd,EAAO;CACL,GAAG;CACH,GAAI,EAAU,WACV,EAAE,UAAU,EAAE,OAAO,EAAU,SAAS,OAAO,EAAE,GACjD,EAAE;CACP,CAAC,CACH,EAEG,KACJ,GACA,GACA,MACU,gBAAI,MAAM,uBAAuB,EAAK,IAAI,EAAK,KAAK,IAAS,EAEnE,KACJ,GACA,GACA,GACA,MACqB;CACrB,IAAM,IAAS,EAAO,UAAU,KAAW,EAAE,CAAC;AAC9C,KAAI,CAAC,EAAO,QACV,OAAM,EAAe,GAAM,GAAM,EAAO,MAAM,OAAO,GAAG,QAAQ;AAElE,QAAO,EAAO;GAaV,KAA0B,MAAwC;AACtE,KAAI;EACF,IAAM,IAAkB,KAAK,MA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,EACD;AACD,GAAO,yBAAyB,EAAQ;CACxC,IAAM,IAAQ,GAAa;AAC3B,QAAO;EACL,GAAG;EACH,SAAS;GACP,SACE,EAAO,sBAAsB,EAAM,qBACnC,EAAM,sBAAsB,EAAO;GACrC,SAAS,EAAM;GACf,SAAS,EAAM;GAChB;EACF;EACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { F as e, H as t, L as n, M as r, N as i, at as a, dt as o, ft as s, j as c, mt as l, n as u, nt as d, ot as f, x as p, yt as m, z as h } from "./roomle-sdk-
|
|
3
|
-
import { t as g } from "./script-loader-
|
|
2
|
+
import { F as e, H as t, L as n, M as r, N as i, at as a, dt as o, ft as s, j as c, mt as l, n as u, nt as d, ot as f, x as p, yt as m, z as h } from "./roomle-sdk-ByoTm5M6.mjs";
|
|
3
|
+
import { t as g } from "./script-loader-DGVS2Wqe.mjs";
|
|
4
4
|
import { t as _ } from "./component-raycast-helper-CMFpSJXC.mjs";
|
|
5
5
|
//#region packages/configurator-core/src/utils/injectables.ts
|
|
6
6
|
var v = [
|
|
@@ -43,4 +43,4 @@ var v = [
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { y as t };
|
|
45
45
|
|
|
46
|
-
//# sourceMappingURL=configurator-
|
|
46
|
+
//# sourceMappingURL=configurator-CU7jNdgC.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurator-
|
|
1
|
+
{"version":3,"file":"configurator-CU7jNdgC.mjs","names":[],"sources":["../../packages/configurator-core/src/utils/injectables.ts","../../packages/configurator-core/src/configurator.ts"],"sourcesContent":["import CameraControl from '../../../common-core/src/cameracontrol/camera-control';\nimport CameraControl3D from '../../../common-core/src/cameracontrol/camera-control-3d';\nimport ScriptLoader from '../../../common-core/src/script-loader';\nimport { RapiAccess } from '../../../common-core/src/rapi-access';\nimport Logger from '../../../common-core/src/logger';\nimport DataSyncer from '../../../common-core/src/services/data-syncer';\nimport {\n DependencyInjectionAssignment,\n DI_TYPE,\n} from '../../../common-core/src/di/container';\nimport ComponentRaycastHelper from './component-raycast-helper';\nimport ConfiguratorSceneManager from '../webgl/configurator-scene-manager';\nimport ConfiguratorViewModel from '../../../common-core/src/view-model/configurator-view-model';\nimport GlobalInitData from '../../../common-core/src/utils/global-init-data';\n\nexport const INJECTABLES: DependencyInjectionAssignment[] = [\n new DependencyInjectionAssignment('logger', Logger),\n new DependencyInjectionAssignment('rapi-access', RapiAccess),\n new DependencyInjectionAssignment('script-loader', ScriptLoader),\n new DependencyInjectionAssignment('camera-control-3d', CameraControl3D),\n new DependencyInjectionAssignment('camera-control', CameraControl),\n new DependencyInjectionAssignment('global-init-data', GlobalInitData),\n new DependencyInjectionAssignment('data-syncer', DataSyncer),\n new DependencyInjectionAssignment(\n 'configurator-scene-manager',\n ConfiguratorSceneManager,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment(\n 'configurator-view-model',\n ConfiguratorViewModel,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment(\n 'component-raycast-helper',\n ComponentRaycastHelper,\n DI_TYPE.GLOBAL,\n ),\n];\n","import './utils/global-definitions';\nimport { Main, BASE_CONTEXT } from '../../common-core/src/main';\nimport type { AppState } from '../../common-core/src/utils/app-context';\nimport ConfiguratorAppContext from '../../common-core/src/utils/app-context';\nimport { INJECTABLES } from './utils/injectables';\nimport RoomleDependencyInjection from '../../common-core/src/di/roomle-dependency-injection';\nimport type ScriptLoader from '../../common-core/src/script-loader';\nimport { type RapiAccess } from '../../common-core/src/rapi-access';\nimport type Logger from '../../common-core/src/logger';\nimport type DomHelper from '../../common-core/src/utils/dom-helper';\nimport type ConfiguratorSceneManager from './webgl/configurator-scene-manager';\nimport { RoomleConfigurator } from './roomle-configurator';\nimport type PlannerKernelAccess from '../../planner-core/src/services/planner-kernel-access';\nimport { KERNEL_TYPE } from '../../common-core/src/services/common-kernel-access';\n\nexport class Configurator extends Main {\n private _configurator: RoomleConfigurator;\n\n protected setupDependencies(): void {\n RoomleDependencyInjection.setup(INJECTABLES);\n // This needs to be done so that subscribe to events is done\n const plannerKernelAccess = this.lookup<PlannerKernelAccess>(\n 'planner-kernel-access',\n this._context,\n );\n plannerKernelAccess.init(KERNEL_TYPE.CONFIGURATOR);\n this.lookup<RapiAccess>('rapi-access', this._context);\n this.lookup<ScriptLoader>('script-loader', this._context);\n this.lookup<Logger>('logger', this._context);\n }\n\n protected cleanUpGlobals(): void {\n delete window.RoomleConfigurator;\n }\n\n protected cleanUpDependencies(): void {\n const scriptLoader = this.lookup<ScriptLoader>('script-loader');\n const rapiAccess = this.lookup<RapiAccess>('rapi-access');\n const domHelper = this.lookup<DomHelper>('dom-helper');\n const sceneManager = this.lookup<ConfiguratorSceneManager>(\n 'configurator-scene-manager',\n );\n\n if (scriptLoader) {\n scriptLoader.cleanUp();\n }\n\n if (rapiAccess) {\n rapiAccess.cleanUp();\n }\n\n if (domHelper) {\n //domHelper.cleanUp();\n }\n\n if (sceneManager) {\n sceneManager.cleanUp();\n }\n }\n\n /** Currently the only module that uses AppState — all others ignore the parameter. */\n protected setupGlobals(appState?: AppState): void {\n ConfiguratorAppContext.init(appState ?? {});\n }\n\n public getApi(): RoomleConfigurator {\n return this._configurator;\n }\n\n protected async bootFinished(): Promise<void> {\n this._configurator = new RoomleConfigurator(this._context);\n this._configurator.getMain = () => {\n return this;\n };\n\n if (!window.RoomleConfigurator) {\n window.RoomleConfigurator = this._configurator;\n }\n }\n\n protected getContextName(): string {\n return BASE_CONTEXT.CONFIGURATOR;\n }\n}\n"],"mappings":";;;;;AAeA,IAAa,IAA+C;CAC1D,IAAI,EAA8B,UAAU,EAAO;CACnD,IAAI,EAA8B,eAAe,EAAW;CAC5D,IAAI,EAA8B,iBAAiB,EAAa;CAChE,IAAI,EAA8B,qBAAqB,EAAgB;CACvE,IAAI,EAA8B,kBAAkB,EAAc;CAClE,IAAI,EAA8B,oBAAoB,EAAe;CACrE,IAAI,EAA8B,eAAe,EAAW;CAC5D,IAAI,EACF,8BACA,GACA,EAAQ,QACT;CACD,IAAI,EACF,2BACA,GACA,EAAQ,QACT;CACD,IAAI,EACF,4BACA,GACA,EAAQ,OACT;CACF,ECvBY,IAAb,cAAkC,EAAK;CAGrC,oBAAoC;AAUlC,EATA,EAA0B,MAAM,EAAY,EAEhB,KAAK,OAC/B,yBACA,KAAK,SACN,CACmB,KAAK,EAAY,aAAa,EAClD,KAAK,OAAmB,eAAe,KAAK,SAAS,EACrD,KAAK,OAAqB,iBAAiB,KAAK,SAAS,EACzD,KAAK,OAAe,UAAU,KAAK,SAAS;;CAG9C,iBAAiC;AAC/B,SAAO,OAAO;;CAGhB,sBAAsC;EACpC,IAAM,IAAe,KAAK,OAAqB,gBAAgB,EACzD,IAAa,KAAK,OAAmB,cAAc;AACvC,OAAK,OAAkB,aAAa;EAFtD,IAGM,IAAe,KAAK,OACxB,6BACD;AAcD,EAZI,KACF,EAAa,SAAS,EAGpB,KACF,EAAW,SAAS,EAOlB,KACF,EAAa,SAAS;;CAK1B,aAAuB,GAA2B;AAChD,IAAuB,KAAK,KAAY,EAAE,CAAC;;CAG7C,SAAoC;AAClC,SAAO,KAAK;;CAGd,MAAgB,eAA8B;AAM5C,EALA,KAAK,gBAAgB,IAAI,EAAmB,KAAK,SAAS,EAC1D,KAAK,cAAc,gBACV,MAGJ,OAAO,uBACV,OAAO,qBAAqB,KAAK;;CAIrC,iBAAmC;AACjC,SAAO,EAAa"}
|
package/lib/{configurator-capabilities-C3TQUu_S.mjs → configurator-capabilities-o8fQ6Ang.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { U as e, j as t } from "./roomle-sdk-
|
|
2
|
+
import { U as e, j as t } from "./roomle-sdk-ByoTm5M6.mjs";
|
|
3
3
|
import { n, t as r } from "./configuration-operation-schemas-Q4gAd-KO.mjs";
|
|
4
4
|
//#region packages/common-core/src/mcp-api/component-llm-data.ts
|
|
5
5
|
var i = new Set([e.DECIMAL, e.INTEGER]), a = (e) => typeof e == "string" && e.trim() ? e : void 0, o = (e) => typeof e == "object" && e && !Array.isArray(e) ? e : void 0, s = (e) => Array.isArray(e) ? e.map(o).filter((e) => !!e) : [], c = (e) => {
|
|
@@ -437,4 +437,4 @@ var i = new Set([e.DECIMAL, e.INTEGER]), a = (e) => typeof e == "string" && e.tr
|
|
|
437
437
|
//#endregion
|
|
438
438
|
export { h as a, m as c, A as i, O as n, u as o, k as r, d as s, V as t };
|
|
439
439
|
|
|
440
|
-
//# sourceMappingURL=configurator-capabilities-
|
|
440
|
+
//# sourceMappingURL=configurator-capabilities-o8fQ6Ang.mjs.map
|