@roomle/embedding-lib 0.0.0-dev-a4754cb → 0.0.0-dev-60bc7cd

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.
@@ -4903,12 +4903,12 @@ var sc = (e) => e.reduce((e, t, n) => n === 0 ? String(t) : typeof t == "number"
4903
4903
  "get-order-data": async (e) => (await e.extended.getExternalObjectSnapshot({ orderData: !0 }))?.orderData ?? null,
4904
4904
  "get-plan-images": n(async (e) => {
4905
4905
  let t = await e.extended.getExternalObjectSnapshot({
4906
- perspectiveImage: !0,
4906
+ perspectiveObjectImage: !0,
4907
4907
  topImage: !0,
4908
4908
  keepOpenGeometry: !0
4909
4909
  });
4910
4910
  return {
4911
- perspectiveImage: t?.perspectiveImage,
4911
+ perspectiveObjectImage: t?.perspectiveObjectImage,
4912
4912
  topImage: t?.topImage
4913
4913
  };
4914
4914
  })
@@ -5029,13 +5029,13 @@ Example 6 - "insert a low cabinet between the high cabinets" is insert-article-i
5029
5029
  Y().finite(),
5030
5030
  Y().finite(),
5031
5031
  Y().finite()
5032
- ]).optional().describe("Millimetres x right, y up, z front, relative to parentModuleId. Omit for the library default on add, or retain actual placement on move/replace. Read calculated result for adjustments."), d = Os({
5032
+ ]).optional().describe("Millimetres x right, y up, z front, relative to parentModuleId - the frame of a fitting position from get-interior-design-options; to move a fitting by an offset, add it to that position. Omit for the library default on add, or retain actual placement on move/replace. Read calculated result for adjustments."), d = Os({
5033
5033
  rootId: l,
5034
5034
  containerModuleId: l,
5035
5035
  parentModuleId: l
5036
5036
  });
5037
5037
  s("get-interior-design-options", {
5038
- description: "Inspect Interior Design / interior fittings / sub-articles of one loaded HI group without selecting it. Returns unique installed instance IDs, parent-local calculated positions, compatible additions with destination tuples and fittings[].replacementArticles for each occupied parent. Choose replacements from that installed fitting, even when no additions fit. articleId filters addition/replacement candidates. Discover before editing; clarify ambiguous instances or unspecified interior changes. Empty options differ from unsupported or failed discovery. To see the fittings in get-plan-images, open the cabinet with open-or-close-article first.",
5038
+ description: "Inspect Interior Design / interior fittings / sub-articles of one loaded HI group without selecting it. Returns unique installed instance IDs, parent-local positions where each fitting starts, compatible additions with destination tuples and fittings[].replacementArticles for each occupied parent. Choose replacements from that installed fitting, even when no additions fit. articleId filters addition/replacement candidates. Discover before editing; clarify ambiguous instances or unspecified interior changes. Empty options differ from unsupported or failed discovery. To see the fittings in get-plan-images, open the cabinet with open-or-close-article first.",
5039
5039
  inputSchema: {
5040
5040
  groupId: l,
5041
5041
  rootId: l.optional(),
@@ -5262,16 +5262,26 @@ Example 6 - "insert a low cabinet between the high cabinets" is insert-article-i
5262
5262
  description: "Returns the order data of the current planning situation without placing an order.",
5263
5263
  inputSchema: {}
5264
5264
  }, async () => $(await c("get-order-data", {}))), s("get-plan-images", {
5265
- description: "Renders the current plan and returns a perspective image and a top-view image, so the plan can be inspected visually. The top-view orientation matches the wall side labels of get-plan-context: a wall with side 'right' is at the right edge of the top image, 'top' at the upper edge. Doors and drawers are shown as they are: to look inside a cabinet, open it with open-or-close-article (a whole group with open-or-close-group) right before this tool.",
5265
+ description: "Renders two images of the current plan, so the plan can be inspected visually. First the groups alone, seen from their front without the room or other objects - one camera for all groups, so where fronts face opposite directions one side is seen from behind, and root modules can hide one another: a root module not seen is not missing, get-plan-context lists the root modules. Second a top view of the whole plan that shows where the groups stand; its orientation matches the wall side labels of get-plan-context: a wall with side 'right' is at the right edge of the top image, 'top' at the upper edge. A text before the images names them; without groups in the plan only the top view is returned. Doors and drawers are shown as they are: to look inside a cabinet, open it with open-or-close-article (a whole group with open-or-close-group) right before this tool.",
5266
5266
  inputSchema: {}
5267
5267
  }, async () => {
5268
- let e = await c("get-plan-images", {}), t = [];
5269
- for (let n of [e.perspectiveImage, e.topImage]) n && t.push({
5268
+ let e = await c("get-plan-images", {}), t = [{
5269
+ image: e.perspectiveObjectImage,
5270
+ name: "the HI groups alone, seen from their front, without the room"
5271
+ }, {
5272
+ image: e.topImage,
5273
+ name: "the top view of the whole plan"
5274
+ }].filter((e) => e.image);
5275
+ if (t.length === 0) return $({ error: "No images available" });
5276
+ let n = t.map((e, t) => `Image ${t + 1}: ${e.name}.`).join(" ");
5277
+ return { content: [{
5278
+ type: "text",
5279
+ text: e.perspectiveObjectImage ? n : `The plan has no groups, so there is no group view. ${n}`
5280
+ }, ...t.map((e) => ({
5270
5281
  type: "image",
5271
- data: Fl(n),
5282
+ data: Fl(e.image),
5272
5283
  mimeType: "image/png"
5273
- });
5274
- return t.length === 0 ? $({ error: "No images available" }) : { content: t };
5284
+ }))] };
5275
5285
  }), o;
5276
5286
  };
5277
5287
  //#endregion
@@ -4285,7 +4285,7 @@ var za = D("ZodReadonly", (e, t) => {
4285
4285
  J(),
4286
4286
  Y()
4287
4287
  ])
4288
- })), jo = (e) => e.replace(/^data:image\/\w+;base64,/, ""), Mo = (e) => {
4288
+ })), jo = (e) => {
4289
4289
  let t = new Ua(), { callbacks: n } = e.extended, r = n.onHistoryChange;
4290
4290
  n.onHistoryChange = (e, i) => {
4291
4291
  t.historyChanged(), r?.call(n, e, i);
@@ -4525,12 +4525,12 @@ var za = D("ZodReadonly", (e, t) => {
4525
4525
  "get-order-data": async (e) => (await e.extended.getExternalObjectSnapshot({ orderData: !0 }))?.orderData ?? null,
4526
4526
  "get-plan-images": n(async (e) => {
4527
4527
  let t = await e.extended.getExternalObjectSnapshot({
4528
- perspectiveImage: !0,
4528
+ perspectiveObjectImage: !0,
4529
4529
  topImage: !0,
4530
4530
  keepOpenGeometry: !0
4531
4531
  });
4532
4532
  return {
4533
- perspectiveImage: t?.perspectiveImage,
4533
+ perspectiveObjectImage: t?.perspectiveObjectImage,
4534
4534
  topImage: t?.topImage
4535
4535
  };
4536
4536
  })
@@ -4607,13 +4607,13 @@ var za = D("ZodReadonly", (e, t) => {
4607
4607
  J().finite(),
4608
4608
  J().finite(),
4609
4609
  J().finite()
4610
- ]).optional().describe("Millimetres x right, y up, z front, relative to parentModuleId. Omit for the library default on add, or retain actual placement on move/replace. Read calculated result for adjustments."), f = ya({
4610
+ ]).optional().describe("Millimetres x right, y up, z front, relative to parentModuleId - the frame of a fitting position from get-interior-design-options; to move a fitting by an offset, add it to that position. Omit for the library default on add, or retain actual placement on move/replace. Read calculated result for adjustments."), f = ya({
4611
4611
  rootId: u,
4612
4612
  containerModuleId: u,
4613
4613
  parentModuleId: u
4614
4614
  });
4615
4615
  c("get-interior-design-options", {
4616
- description: "Inspect Interior Design / interior fittings / sub-articles of one loaded HI group without selecting it. Returns unique installed instance IDs, parent-local calculated positions, compatible additions with destination tuples and fittings[].replacementArticles for each occupied parent. Choose replacements from that installed fitting, even when no additions fit. articleId filters addition/replacement candidates. Discover before editing; clarify ambiguous instances or unspecified interior changes. Empty options differ from unsupported or failed discovery. To see the fittings in get-plan-images, open the cabinet with open-or-close-article first.",
4616
+ description: "Inspect Interior Design / interior fittings / sub-articles of one loaded HI group without selecting it. Returns unique installed instance IDs, parent-local positions where each fitting starts, compatible additions with destination tuples and fittings[].replacementArticles for each occupied parent. Choose replacements from that installed fitting, even when no additions fit. articleId filters addition/replacement candidates. Discover before editing; clarify ambiguous instances or unspecified interior changes. Empty options differ from unsupported or failed discovery. To see the fittings in get-plan-images, open the cabinet with open-or-close-article first.",
4617
4617
  inputSchema: {
4618
4618
  groupId: u,
4619
4619
  rootId: u.optional(),
@@ -4851,16 +4851,29 @@ var za = D("ZodReadonly", (e, t) => {
4851
4851
  description: "Returns the order data of the current planning situation without placing an order.",
4852
4852
  inputSchema: {}
4853
4853
  }, async () => $(await l("get-order-data", {}))), c("get-plan-images", {
4854
- description: "Renders the current plan and returns a perspective image and a top-view image, so the plan can be inspected visually. The top-view orientation matches the wall side labels of get-plan-context: a wall with side 'right' is at the right edge of the top image, 'top' at the upper edge. Doors and drawers are shown as they are: to look inside a cabinet, open it with open-or-close-article (a whole group with open-or-close-group) right before this tool.",
4854
+ description: "Renders two images of the current plan, so the plan can be inspected visually. First the groups alone, seen from their front without the room or other objects - one camera for all groups, so where fronts face opposite directions one side is seen from behind, and root modules can hide one another: a root module not seen is not missing, get-plan-context lists the root modules. Second a top view of the whole plan that shows where the groups stand; its orientation matches the wall side labels of get-plan-context: a wall with side 'right' is at the right edge of the top image, 'top' at the upper edge. A text before the images names them; without groups in the plan only the top view is returned. Doors and drawers are shown as they are: to look inside a cabinet, open it with open-or-close-article (a whole group with open-or-close-group) right before this tool.",
4855
4855
  inputSchema: {}
4856
4856
  }, async () => {
4857
- let e = await l("get-plan-images", {}), t = [];
4858
- for (let n of [e.perspectiveImage, e.topImage]) n && t.push({
4859
- type: "image",
4860
- data: jo(n),
4861
- mimeType: "image/png"
4862
- });
4863
- return t.length === 0 ? $({ error: "No images available" }) : { content: t };
4857
+ let e = await l("get-plan-images", {}), t = [{
4858
+ image: e.perspectiveObjectImage,
4859
+ name: "the HI groups alone, seen from their front, without the room"
4860
+ }, {
4861
+ image: e.topImage,
4862
+ name: "the top view of the whole plan"
4863
+ }].filter((e) => e.image);
4864
+ if (t.length === 0) return $({ error: "No images available" });
4865
+ let n = t.map((e, t) => `Image ${t + 1}: ${e.name}.`).join(" ");
4866
+ return { content: [{
4867
+ type: "text",
4868
+ text: e.perspectiveObjectImage ? n : `The plan has no groups, so there is no group view. ${n}`
4869
+ }, ...t.map((e) => {
4870
+ return {
4871
+ type: "image",
4872
+ data: (t = e.image, t.replace(/^data:image\/\w+;base64,/, "")),
4873
+ mimeType: "image/png"
4874
+ };
4875
+ var t;
4876
+ })] };
4864
4877
  }), s;
4865
4878
  };
4866
- export { Mo as createHiMcpTools };
4879
+ export { jo as createHiMcpTools };
package/hi.js CHANGED
@@ -65,7 +65,7 @@ var n = (e, t) => t === e.libraryId ? e : {
65
65
  }, window.addEventListener("message", h);
66
66
  }, _ = () => {
67
67
  h &&= (window.removeEventListener("message", h), null);
68
- }, v = async (e) => (await import("./hi-mcp-server-BtrPxgNY.mjs")).createHiMcpTools(e), y = (e) => `https://esm.sh/${e}?deps=zod@4.6.5`, b = 16, x = async ({ provider: e, model: t, apiKey: n, baseUrl: r, chatCompletions: i, reasoningEffort: a }) => {
68
+ }, v = async (e) => (await import("./hi-mcp-server-B4BAKDmw.mjs")).createHiMcpTools(e), y = (e) => `https://esm.sh/${e}?deps=zod@4.6.5`, b = 16, x = async ({ provider: e, model: t, apiKey: n, baseUrl: r, chatCompletions: i, reasoningEffort: a }) => {
69
69
  switch (e) {
70
70
  case "azure": {
71
71
  let { createAzure: e } = await import(
package/hi.min.js CHANGED
@@ -66,7 +66,7 @@ var n = (e, t) => t === e.libraryId ? e : {
66
66
  }, window.addEventListener("message", m);
67
67
  }, g = () => {
68
68
  m &&= (window.removeEventListener("message", m), null);
69
- }, _ = async (e) => (await import("./hi-mcp-server-ukmMIPNu.mjs")).createHiMcpTools(e), v = (e) => `https://esm.sh/${e}?deps=zod@4.6.5`, y = async ({ provider: e, model: t, apiKey: n, baseUrl: r, chatCompletions: i, reasoningEffort: a }) => {
69
+ }, _ = async (e) => (await import("./hi-mcp-server-DxIvpJmq.mjs")).createHiMcpTools(e), v = (e) => `https://esm.sh/${e}?deps=zod@4.6.5`, y = async ({ provider: e, model: t, apiKey: n, baseUrl: r, chatCompletions: i, reasoningEffort: a }) => {
70
70
  switch (e) {
71
71
  case "azure": {
72
72
  let { createAzure: e } = await import(v("@ai-sdk/azure@4.0.85")), o = e({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "0.0.0-dev-a4754cb",
3
+ "version": "0.0.0-dev-60bc7cd",
4
4
  "description": "This is a small library which can be used to communicate with the Roomle Configurator. ES modules only (browser-compatible).",
5
5
  "type": "module",
6
6
  "main": "./roomle-embedding-lib.js",
@@ -368,7 +368,7 @@ var C = /\/v[23]\/?$/, w = (e, t) => C.test(e) ? e.replace(C, "/v2") + t : e + t
368
368
  }
369
369
  _createIframe() {
370
370
  let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
371
- return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.classList.add(V.CONTAINER), e.classList.add(V.FILL), e;
371
+ return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.allow = "microphone", e.classList.add(V.CONTAINER), e.classList.add(V.FILL), e;
372
372
  }
373
373
  _onResize() {
374
374
  L(this._iframe);
@@ -343,7 +343,7 @@ var h = /\/v[23]\/?$/, g = {
343
343
  }
344
344
  _createIframe() {
345
345
  let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
346
- return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.classList.add(j), e.classList.add(M), e;
346
+ return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.allow = "microphone", e.classList.add(j), e.classList.add(M), e;
347
347
  }
348
348
  _onResize() {
349
349
  O(this._iframe);