@roomle/embedding-lib 0.0.0-dev-20f436f → 0.0.0-dev-86c52f1

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.
Files changed (76) hide show
  1. package/THIRD-PARTY-NOTICES.txt +2 -2
  2. package/ai-model-host-CS8tMlto.mjs +144 -0
  3. package/ai-model-host-D_b_GVlC.mjs +145 -0
  4. package/ai.js +1 -128
  5. package/ai.min.js +1 -126
  6. package/{browser-D6M-d6y5.mjs → browser-Cys-y5Hy.mjs} +1 -2
  7. package/chat-model-DooKwd8I.mjs +117 -0
  8. package/chat-model-KHuz1Ej9.mjs +118 -0
  9. package/coerce-CuLRCRlo.mjs +6 -0
  10. package/coerce-Dup0o-HR.mjs +7 -0
  11. package/{comlink-CG3f9q6z.mjs → comlink-7u13Z2ZH.mjs} +2 -3
  12. package/{comlink-hSUzCx9j.mjs → comlink-DKhvPU0o.mjs} +1 -1
  13. package/configurator.js +3 -4
  14. package/configurator.min.js +2 -2
  15. package/construction.js +17865 -37
  16. package/construction.min.js +17536 -41
  17. package/{dist-Cm3aF4sf.mjs → dist-7-X7Xqsl.mjs} +851 -919
  18. package/{dist-BQaw78-_.mjs → dist-BMxyw-Zs.mjs} +411 -405
  19. package/{dist-0WZWTj8T.mjs → dist-BU022PnG.mjs} +4 -9
  20. package/{dist-DkR6G9Kj.mjs → dist-BY8OLJ2p.mjs} +1 -1
  21. package/{dist-70R0b5Mq.mjs → dist-Ba3J8AjB.mjs} +400 -390
  22. package/{dist-CTS0DDwt.mjs → dist-CbQKC1xX.mjs} +1590 -1616
  23. package/{dist-BmOBP9h9.mjs → dist-CiybWJvs.mjs} +44 -41
  24. package/{dist-CPG4atmb.mjs → dist-CkZuNdCU.mjs} +6 -4
  25. package/{dist-Bt1FopV4.mjs → dist-D2ZAAHGn.mjs} +1058 -1042
  26. package/{dist-BWNv7qW9.mjs → dist-DjsS42rR.mjs} +916 -962
  27. package/{dist-9UI7dzwc.mjs → dist-Jcq_kKKT.mjs} +403 -393
  28. package/{dist-BV-32IEX.mjs → dist-XECXrV5Q.mjs} +1497 -1558
  29. package/{dist-Bc2s-kJZ.mjs → dist-a5_BIeaS.mjs} +45 -51
  30. package/{dist-Crrp-Bno.mjs → dist-bQAJDeYc.mjs} +698 -748
  31. package/{drag-ghost-BpIDzSdK.mjs → drag-ghost-QZelgA-_.mjs} +2 -3
  32. package/{drag-ghost-Bhb0_67G.mjs → drag-ghost-VmgSWLva.mjs} +5 -7
  33. package/{drag-in-mE_ozj_Q.mjs → drag-in-Cd_67tzS.mjs} +4 -5
  34. package/{drag-in-CGBG4wEk.mjs → drag-in-DlDsgY4T.mjs} +3 -3
  35. package/embedding-plugins.js +1 -2
  36. package/embedding-plugins.min.js +1 -2
  37. package/{experimental-evaluation-FzKFGoye.mjs → experimental-evaluation-B4hKMgFH.mjs} +19 -38
  38. package/{experimental-evaluation-DczxmJme.mjs → experimental-evaluation-DmqghFSx.mjs} +1 -1
  39. package/{from-custom-view-B3fIWMox.mjs → from-custom-view-6HMD_sPe.mjs} +5 -4
  40. package/{from-custom-view-B3HCOhdT.mjs → from-custom-view-BRFynafo.mjs} +16 -16
  41. package/{from-website-DaTahmvJ.mjs → from-website-Dl1VN4h7.mjs} +5 -6
  42. package/{from-website-DUQ9USj1.mjs → from-website-iZzauH4C.mjs} +3 -3
  43. package/hi.js +80 -428
  44. package/hi.min.js +75 -376
  45. package/mcp-tools-C6O2gQZW.mjs +41 -0
  46. package/mcp-tools-m_3IX0vB.mjs +40 -0
  47. package/package.json +1 -1
  48. package/packages/embedding-lib/src/ai-model-host.d.ts +34 -0
  49. package/packages/embedding-lib/src/ai.d.ts +11 -27
  50. package/packages/embedding-lib/src/homag-intelligence/hi-planning-assistant.d.ts +11 -19
  51. package/packages/web-sdk/packages/assistant.d.ts +3 -1
  52. package/packages/web-sdk/packages/common-core/src/planning-assistant/chat-recovery.d.ts +5 -1
  53. package/packages/web-sdk/packages/common-core/src/planning-assistant/continuation.d.ts +5 -3
  54. package/packages/web-sdk/packages/common-core/src/planning-assistant/runtime.d.ts +4 -1
  55. package/packages/web-sdk/packages/common-core/src/planning-assistant/types.d.ts +2 -0
  56. package/packages/web-sdk/packages/common-core/src/planning-assistant/usage.d.ts +31 -0
  57. package/packages/web-sdk/packages/common-core/src/planning-assistant.d.ts +19 -1
  58. package/rolldown-runtime--db92txo.mjs +10 -0
  59. package/rolldown-runtime-CyjYJMBa.mjs +11 -0
  60. package/roomle-embedding-lib.js +25 -34
  61. package/roomle-embedding-lib.min.js +3 -3
  62. package/sbom.cdx.json +5 -5
  63. package/usage-C3HE9yXi.mjs +33 -0
  64. package/usage-CYqDPQOx.mjs +34 -0
  65. package/{utils-BwWn6Fw4.mjs → utils-CJnKZceY.mjs} +3 -4
  66. package/{utils-BoELtcEK.mjs → utils-DdNhTbJr.mjs} +6 -6
  67. package/chat-model-C1ov616e.mjs +0 -377
  68. package/chat-model-CifTV-8H.mjs +0 -373
  69. package/coerce-CqJod_GZ.mjs +0 -8
  70. package/coerce-CsI42_k0.mjs +0 -6
  71. package/dist-6TznX-Ae.mjs +0 -17514
  72. package/dist-D0XFfKEL.mjs +0 -17079
  73. package/mcp-tools-CC8DTfZA.mjs +0 -2
  74. package/mcp-tools-CfJ_ue_2.mjs +0 -2
  75. package/packages/embedding-lib/src/homag-intelligence/hi-planning-usage.d.ts +0 -54
  76. /package/{browser-BjtSrqbu.mjs → browser-CzLpXYFF.mjs} +0 -0
@@ -1,10 +1,14 @@
1
1
  import { PlanningAssistantOutput, PlanningAssistantPrompt } from '../../../web-sdk/packages';
2
- import { HiMcpPlannerApi } from './hi-mcp-tools';
3
2
  import { PlanningAssistantConfig } from '../planning-assistant/chat-model';
3
+ import { default as RoomleEmbeddingApi } from '../roomle-embedding-lib';
4
+ import { HiMcpPlannerApi } from './hi-mcp-tools';
4
5
  export { loadChatModel, type PlanningAssistantConfig, } from '../planning-assistant/chat-model';
5
6
  /** The planner the planning assistant runs in: the HI MCP tools' planner API, the agent prompts and the window. */
6
7
  export type PlanningAssistantPlannerApi = HiMcpPlannerApi & {
7
8
  extended: {
9
+ startExternalObjectPlanningAssistant?(config: PlanningAssistantConfig, owner: string): Promise<void>;
10
+ suspendPlanningAssistant?(): Promise<void>;
11
+ resumePlanningAssistant?(): Promise<void>;
8
12
  stopPlanningAssistant?(owner: string): Promise<void>;
9
13
  setPlanningAssistantModel?(model: {
10
14
  model: string;
@@ -14,6 +18,8 @@ export type PlanningAssistantPlannerApi = HiMcpPlannerApi & {
14
18
  getExternalObjectAgentPrompts(): Promise<{
15
19
  systemPrompt: string;
16
20
  imagePrompt: string;
21
+ /** The text of a message with a document and no text; a planner without it gets no document. */
22
+ documentPrompt?: string;
17
23
  referenceBlocks?: {
18
24
  id: string;
19
25
  text: string;
@@ -44,27 +50,13 @@ export type PlanningAssistantPlannerApi = HiMcpPlannerApi & {
44
50
  onPlanningAssistantPrompt?: (prompt: PlanningAssistantPrompt) => unknown;
45
51
  };
46
52
  };
47
- };
48
- /** Confident photo observations supplied with the image-planning skill on creation turns. */
49
- export interface PhotoFacts {
50
- present: string[];
51
- absent: string[];
52
- }
53
- /**
54
- * Appends high-confidence visual photo observations to the image-planning skill
55
- * text so the planning model sees them inside the synthetic get-skill result.
56
- */
57
- export declare const withPhotoFacts: (skillText: string, facts?: PhotoFacts) => string;
58
- /**
59
- * Runs the planning agent of the AI Planning Assistant window
60
- * (featureFlags.planningAssistant) in this page: the window hands every
61
- * message to "onPlanningAssistantPrompt", the agent calls the HI MCP tools,
62
- * the tools run in the planner of this page, and the agent's output goes to
63
- * "planningAssistantOutput". Aborting the signal ends a running turn.
64
- */
53
+ } & Partial<Pick<RoomleEmbeddingApi<unknown, unknown>, 'startRelay' | 'ui'>>;
65
54
  export interface PlanningAssistantControl {
66
55
  suspend(): Promise<void>;
67
56
  resume(): Promise<void>;
68
57
  dispose(): Promise<void>;
69
58
  }
59
+ /** The host's model as the planner takes it, without key, base URL or headers. */
60
+ export declare const plannerConfigOf: (config: PlanningAssistantConfig) => PlanningAssistantConfig;
61
+ /** Starts the HI Planning Assistant of the planner on the model of this page; aborting the signal stops it. */
70
62
  export declare const startPlanningAssistant: (roomDesignerApi: PlanningAssistantPlannerApi, config: PlanningAssistantConfig, signal: AbortSignal) => Promise<PlanningAssistantControl | undefined>;
@@ -2,5 +2,7 @@ export { loadChatModel } from './common-core/src/planning-assistant/chat-model';
2
2
  export type { PlanningAssistantConfig, ConfiguratorAgentApi, } from './common-core/src/planning-assistant/types';
3
3
  export { createAgentMcpTools, mcpToModelOutput, type AgentMcpModelOutput, type AgentMcpInputSchema, type AgentMcpTool, type AgentMcpTools, } from './common-core/src/planning-assistant/mcp-tools';
4
4
  export { createAssistant } from './common-core/src/planning-assistant/runtime';
5
+ export { MAX_TURN_STEPS, TURN_TIMEOUT_MS, lastTurnStep, } from './common-core/src/planning-assistant/turn-limits';
5
6
  export { createChatRecovery } from './common-core/src/planning-assistant/chat-recovery';
6
- export { responsesProviderOf } from './common-core/src/planning-assistant/continuation';
7
+ export { responsesProviderOf, isRejectedContinuation, withoutStoredItems, } from './common-core/src/planning-assistant/continuation';
8
+ export { tokenCount, tokenCounts, sumCounts, describeRequestBody, } from './common-core/src/planning-assistant/usage';
@@ -3,9 +3,13 @@ import { AgentMcpTools } from './mcp-tools';
3
3
  * Records tool execution independently of whether the model finishes its
4
4
  * step, so an interrupted reply can say what the tools changed.
5
5
  */
6
- export declare const createChatRecovery: (tools: AgentMcpTools, domain?: {
6
+ export declare const createChatRecovery: (tools: AgentMcpTools, domain: {
7
+ /** What the tools change, as the summary names it: "configuration", "plan". */
7
8
  subject: string;
9
+ /** The tools that never change the subject: a failed or pending call of one changed nothing. */
8
10
  readTools: ReadonlySet<string>;
11
+ /** The names the summary gives the tools; a tool without one goes by its tool name. */
12
+ labels?: Record<string, string>;
9
13
  }) => {
10
14
  tools: AgentMcpTools;
11
15
  summary: () => string;
@@ -1,5 +1,7 @@
1
- import { ModelMessage } from 'ai';
2
1
  import { PlanningAssistantConfig } from './types';
3
2
  export declare const responsesProviderOf: (config: PlanningAssistantConfig) => "openai" | "azure" | null;
4
- export declare const isRejectedContinuation: (error: unknown) => boolean;
5
- export declare const withoutStoredItems: (message: ModelMessage) => ModelMessage;
3
+ export declare const isRejectedContinuation: (error: unknown) => error is Error;
4
+ export declare const withoutStoredItems: <Message extends {
5
+ role: string;
6
+ content: unknown;
7
+ }>(message: Message) => Message;
@@ -2,6 +2,7 @@ import { LanguageModelV4 } from '@ai-sdk/provider';
2
2
  import { PlanningAssistantOutput, PlanningAssistantPrompt } from '../planning-assistant';
3
3
  import { PlanningAssistantConfig } from './chat-model';
4
4
  import { AgentMcpTools } from './mcp-tools';
5
+ import { ConfigurationAssistantLog } from './session-log';
5
6
  /** Runs a browser agent with the tools and prompts supplied by its SDK domain. */
6
7
  export declare const createAssistant: (config: PlanningAssistantConfig, signal: AbortSignal, output: (part: PlanningAssistantOutput) => unknown, setupDomain: () => Promise<{
7
8
  prompts: {
@@ -16,4 +17,6 @@ export declare const createAssistant: (config: PlanningAssistantConfig, signal:
16
17
  tools: AgentMcpTools;
17
18
  summary(): string;
18
19
  };
19
- }, hostModel?: LanguageModelV4) => Promise<(prompt: PlanningAssistantPrompt, turnSignal?: AbortSignal) => Promise<void>>;
20
+ }, hostModel?: LanguageModelV4) => Promise<((prompt: PlanningAssistantPrompt, turnSignal?: AbortSignal) => Promise<boolean>) & {
21
+ report: () => ConfigurationAssistantLog;
22
+ }>;
@@ -28,6 +28,8 @@ export interface PlanningAssistantConfig {
28
28
  referenceCacheBreakpoint?: boolean;
29
29
  /** Whether the model reads images: the window offers the image drop only then. */
30
30
  readsImages: boolean;
31
+ /** HI planning assistant only: whether the model reads PDF documents; the window offers the drop of a PDF only then. */
32
+ readsDocuments?: boolean;
31
33
  /** HI planning assistant only: a Gemini key of the user's own for the decisions before a turn, sent with each decision request through the Roomle AI Gateway; without it the window's Roomle session pays, if any. */
32
34
  decisionApiKey?: string;
33
35
  }
@@ -0,0 +1,31 @@
1
+ /** A token count as a provider reports it; null for a missing value and for anything that is no count. */
2
+ export declare const tokenCount: (value: unknown) => number | null;
3
+ /** The token counts of one model call: the reported total, else the sum of a known input and output. */
4
+ export declare const tokenCounts: (usage?: {
5
+ inputTokens?: number;
6
+ outputTokens?: number;
7
+ totalTokens?: number;
8
+ }) => {
9
+ inputTokens: number;
10
+ outputTokens: number;
11
+ totalTokens: number;
12
+ };
13
+ /** The sum of the known counts; null when no count is known. */
14
+ export declare const sumCounts: (counts: Array<number | null>) => number;
15
+ /** The size of a text in UTF-8 bytes, as a request carries it. */
16
+ export declare const bytesOf: (value: string) => number;
17
+ /** The UTF-8 size of a text and its SHA-256; null where the browser has no digest. */
18
+ export declare const describePayload: (text: string) => Promise<{
19
+ bytes: number;
20
+ sha256: string;
21
+ }>;
22
+ /** The size and digest of a request body, its tool definitions and each input item of a Responses request. */
23
+ export declare const describeRequestBody: (text: string) => Promise<{
24
+ bytes: number;
25
+ sha256: string;
26
+ } | {
27
+ toolsBytes: number;
28
+ input: any[];
29
+ bytes: number;
30
+ sha256: string;
31
+ }>;
@@ -1,9 +1,20 @@
1
+ /** A document the user sends with a message: a PDF as it was dropped, unchanged. */
2
+ export interface PlanningAssistantDocument {
3
+ /** The file name as the user's file had it. */
4
+ name: string;
5
+ /** The media type of the document: `application/pdf`. */
6
+ mediaType: string;
7
+ /** The document as a base64 data URL. */
8
+ data: string;
9
+ }
1
10
  /** The message the user sends in the AI Planning Assistant window. */
2
11
  export interface PlanningAssistantPrompt {
3
- /** What the user typed, trimmed; empty when the user sends only an image. */
12
+ /** What the user typed, trimmed; empty when the user sends only an image or a document. */
4
13
  text: string;
5
14
  /** The images of the message as JPEG data URLs: the long side at most 1568 px, EXIF rotation applied, transparent parts white. */
6
15
  images: string[];
16
+ /** The documents of the message; only a host that announced documents gets one. */
17
+ documents?: PlanningAssistantDocument[];
7
18
  }
8
19
  /**
9
20
  * One part of the output of the host's planning agent for the AI Planning Assistant window:
@@ -11,8 +22,10 @@ export interface PlanningAssistantPrompt {
11
22
  * - "activity": what the agent does now, e.g. the tool it runs, shown in the status line
12
23
  * - "error": the turn failed; the text replaces the answer of the turn and ends the turn
13
24
  * - "done": the turn is complete; the input is free again
25
+ * - "time-limit": the turn reached its time limit; the window asks whether to continue, in the language of the UI
14
26
  * - "availability": the input on or off, with the reason shown in the status line; off until the host enables it
15
27
  * - "images": the image drop on or off; off until the host enables it
28
+ * - "documents": the drop of a PDF on or off; off until the host enables it
16
29
  */
17
30
  export type PlanningAssistantOutput = {
18
31
  type: 'text';
@@ -26,6 +39,8 @@ export type PlanningAssistantOutput = {
26
39
  statusCode?: number;
27
40
  } | {
28
41
  type: 'done';
42
+ } | {
43
+ type: 'time-limit';
29
44
  } | {
30
45
  type: 'availability';
31
46
  available: boolean;
@@ -33,4 +48,7 @@ export type PlanningAssistantOutput = {
33
48
  } | {
34
49
  type: 'images';
35
50
  enabled: boolean;
51
+ } | {
52
+ type: 'documents';
53
+ enabled: boolean;
36
54
  };
@@ -0,0 +1,10 @@
1
+
2
+ var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), n = (t, n) => {
3
+ let r = {};
4
+ for (var i in t) e(r, i, {
5
+ get: t[i],
6
+ enumerable: !0
7
+ });
8
+ return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ };
10
+ export { n, t };
@@ -0,0 +1,11 @@
1
+
2
+ // \0rolldown/runtime.js
3
+ var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), n = (t, n) => {
4
+ let r = {};
5
+ for (var i in t) e(r, i, {
6
+ get: t[i],
7
+ enumerable: !0
8
+ });
9
+ return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
10
+ };
11
+ export { n, t };
@@ -1,6 +1,6 @@
1
1
  /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
- import { t as e } from "./browser-D6M-d6y5.mjs";
3
- //#region packages/common/src/utils/message-handler.ts
2
+ import { t as e } from "./browser-Cys-y5Hy.mjs";
3
+ // packages/common/src/utils/message-handler.ts
4
4
  var t = class {
5
5
  _side;
6
6
  _incomingMessageBus = null;
@@ -90,7 +90,7 @@ var t = class {
90
90
  return !!(r.includes(e) || t.test(e) || e.endsWith("roomle.com") || e.endsWith("gitlab.io") || e.endsWith("gitlab.com"));
91
91
  }, o = (e, t) => s(JSON.parse(JSON.stringify(e)), t), s = (e, t) => {
92
92
  for (let n in t) try {
93
- t[n].constructor === Object ? e[n] = s(e[n], t[n]) : e[n] = t[n];
93
+ e[n] = t[n].constructor === Object ? s(e[n], t[n]) : t[n];
94
94
  } catch {
95
95
  e[n] = t[n];
96
96
  }
@@ -182,11 +182,8 @@ var t = class {
182
182
  t.forEach((e) => {
183
183
  let t = e.split("."), n = t[0], r = t[1];
184
184
  this[n] || (this[n] = {}), this[n][r] = function() {
185
- if (!this._messageHandler) {
186
- console.error("MessageHandler not set");
187
- return;
188
- }
189
- return this._messageHandler.sendMessage(e, [...arguments]);
185
+ if (!this._messageHandler) console.error("MessageHandler not set");
186
+ else return this._messageHandler.sendMessage(e, [...arguments]);
190
187
  }.bind(this);
191
188
  }), n.forEach((e) => {
192
189
  let t = e.split("."), n = t[0], r = t[1], i = t[2];
@@ -204,7 +201,7 @@ var t = class {
204
201
  setupPlugins(e, t, n = "website") {
205
202
  for (let r of e) typeof r == "string" && r === "dragIn" ? this.pluginsLoaded.push(new Promise((e, r) => {
206
203
  try {
207
- import("./drag-in-mE_ozj_Q.mjs").then((e) => e.n).then(({ DragIn: i }) => {
204
+ import("./drag-in-Cd_67tzS.mjs").then((e) => e.n).then(({ DragIn: i }) => {
208
205
  let a = new i(this.ui, t, n, this.viewName);
209
206
  a.init().then(() => {
210
207
  this.plugins.dragIn = a, e();
@@ -236,8 +233,7 @@ var t = class {
236
233
  reject: t
237
234
  };
238
235
  };
239
- //#endregion
240
- //#region packages/common/src/utils/rapi-version.ts
236
+ // packages/common/src/utils/rapi-version.ts
241
237
  (/* @__PURE__ */ "/items./items/{id}./items/{id}/renderings./items/{id}/conversions./items/{id}/3d-exports./items/{id}/perspectiveImage./items/{id}/perspectiveImageHD./items/{id}/topImage./items/{id}/tags./items/{id}/tagConnections./items/{id}/additionalContents./items/{id}/assetProcessings./items/{id}/3dAssets/{format}./items/{id}/3dAssets/{format}/{dummyFileName}./configurations./configurations/{id}./configurations/{id}/shares./configurations/{id}/renderings./configurations/{id}/3d-exports./configurations/{id}/3dAssets/{format}./configurations/{id}/3dAssets/{format}/{dummyFileName}./auth/signin./auth/signout./auth/reset./auth/reset/confirm./auth/change/pwd./auth/context./assets/analyze./version".split(".")).map((e) => RegExp("^" + e.replace(/\{[^}]+\}/g, "[^/]+") + "/?$"));
242
238
  var w = /\/v[23]\/?$/, T = (e, t) => w.test(e) ? e.replace(w, "/v2") + t : e + t, E = {
243
239
  SDK: "extended",
@@ -288,15 +284,15 @@ var w = /\/v[23]\/?$/, T = (e, t) => w.test(e) ? e.replace(w, "/v2") + t : e + t
288
284
  }
289
285
  });
290
286
  }, L = () => window.innerHeight * .01 + "px", R = (e) => {
291
- e && setTimeout(() => e.style.setProperty(V, L()), 0);
292
- }, z = "rml-styles", B = 450, V = "--rml-full-height", H = {
287
+ e && setTimeout(() => e.style.setProperty(B, L()), 0);
288
+ }, z = "rml-styles", B = "--rml-full-height", V = {
293
289
  CONTAINER: "rml-container",
294
290
  FILL: "rml-fill",
295
291
  POSITION: "rml-pos",
296
292
  TRANSITION: "rml-transition",
297
293
  ANDROID_HEIGHT: "rml-android-height",
298
294
  OVERFLOW_HIDDEN: "rml-overflow-hidden"
299
- }, U = /* @__PURE__ */ new Map(), W = class extends S {
295
+ }, H = /* @__PURE__ */ new Map(), U = class extends S {
300
296
  static createPlanner(e, t, n, r = []) {
301
297
  return this._create(e, t, n, r);
302
298
  }
@@ -352,25 +348,25 @@ var w = /\/v[23]\/?$/, T = (e, t) => w.test(e) ? e.replace(w, "/v2") + t : e + t
352
348
  _relays = /* @__PURE__ */ new Map();
353
349
  constructor(e, n, r, i, a) {
354
350
  if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
355
- if (U.has(n)) throw Error("There is already an instance on this DOM element");
351
+ if (H.has(n)) throw Error("There is already an instance on this DOM element");
356
352
  if (!document.getElementById(z)) {
357
353
  let e = r.zIndex || 9999999, t = document.createElement("style");
358
354
  t.type = "text/css", t.id = z;
359
- let n = "transition:all ease-in-out " + B + "ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = L();
355
+ let n = "transition:all ease-in-out 450ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = L();
360
356
  t.innerHTML = `
361
- .${H.CONTAINER}{${V}:${a};}
362
- .${H.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
363
- .${H.TRANSITION}{${i}}
364
- .${H.FILL}{width:100%;height:100%;opacity:1}
365
- .${H.ANDROID_HEIGHT}{height:calc(var(${V},1vh)*100)}
366
- .${H.OVERFLOW_HIDDEN}{overflow:hidden}
357
+ .${V.CONTAINER}{${B}:${a};}
358
+ .${V.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
359
+ .${V.TRANSITION}{${i}}
360
+ .${V.FILL}{width:100%;height:100%;opacity:1}
361
+ .${V.ANDROID_HEIGHT}{height:calc(var(${B},1vh)*100)}
362
+ .${V.OVERFLOW_HIDDEN}{overflow:hidden}
367
363
  `, document.head.appendChild(t);
368
364
  }
369
365
  this._executeMessage = this._executeMessage.bind(this);
370
366
  let o = new t("website", window, null, this._executeMessage);
371
367
  this.setMessageHandler(o), this._onResize = this._onResize.bind(this), x() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
372
368
  let s = this._createIframe();
373
- this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe), U.set(n, !0);
369
+ this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe), H.set(n, !0);
374
370
  }
375
371
  startRelay(e, t) {
376
372
  this._relays.get(e)?.();
@@ -385,35 +381,30 @@ var w = /\/v[23]\/?$/, T = (e, t) => w.test(e) ? e.replace(w, "/v2") + t : e + t
385
381
  };
386
382
  }
387
383
  teardown() {
388
- this._relays.forEach((e) => e()), this._relays.clear(), this._container && U.delete(this._container);
384
+ this._relays.forEach((e) => e()), this._relays.clear(), this._container && H.delete(this._container);
389
385
  let e = this._container.querySelector("iframe");
390
386
  e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
391
387
  }
392
388
  _createIframe() {
393
389
  let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
394
- 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(H.CONTAINER), e.classList.add(H.FILL), e;
390
+ 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;
395
391
  }
396
392
  _onResize() {
397
393
  R(this._iframe);
398
394
  }
399
395
  _onUseFullPage() {
400
- this._iframe.classList.add(H.POSITION), document.documentElement.classList.add(H.OVERFLOW_HIDDEN), window.document.body.classList.add(H.OVERFLOW_HIDDEN), x() && (R(this._iframe), this._iframe.classList.add(H.ANDROID_HEIGHT));
396
+ this._iframe.classList.add(V.POSITION), document.documentElement.classList.add(V.OVERFLOW_HIDDEN), window.document.body.classList.add(V.OVERFLOW_HIDDEN), x() && (R(this._iframe), this._iframe.classList.add(V.ANDROID_HEIGHT));
401
397
  }
402
398
  _onBackToWebsite() {
403
- this._iframe.classList.remove(H.POSITION), this._iframe.classList.remove(H.ANDROID_HEIGHT), document.documentElement.classList.remove(H.OVERFLOW_HIDDEN), window.document.body.classList.remove(H.OVERFLOW_HIDDEN);
399
+ this._iframe.classList.remove(V.POSITION), this._iframe.classList.remove(V.ANDROID_HEIGHT), document.documentElement.classList.remove(V.OVERFLOW_HIDDEN), window.document.body.classList.remove(V.OVERFLOW_HIDDEN);
404
400
  }
405
401
  _executeMessage({ message: e, args: t }, n) {
406
402
  if (n.source && n.source === this._iframe?.contentWindow) return e === k.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(n.source), Promise.resolve({ result: this._initData })) : (console.error("MessageHandler not set"), Promise.resolve({ error: "MessageHandler not set" })) : e === k.SETUP ? (this.handleSetup(t[0]), I(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), I(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
407
- if (!this._messageHandler) {
408
- console.error("MessageHandler not set");
409
- return;
410
- }
411
- this._messageHandler.sendMessage(k.WEBSITE_READY);
403
+ this._messageHandler ? this._messageHandler.sendMessage(k.WEBSITE_READY) : console.error("MessageHandler not set");
412
404
  }, 0), Promise.resolve({ result: null })) : this.executeMessage({
413
405
  message: e,
414
406
  args: t
415
407
  });
416
408
  }
417
409
  };
418
- //#endregion
419
- export { k as HANDSHAKE_MESSAGES, F as INTERACTION_CONTAINER_SELECTOR, E as NAMESPACE, D as NAMESPACE_SEPARATOR, O as SDK_CALLBACK, A as WELL_KNOWN_MESSAGES, W as default, P as getConfiguratorSettings, N as getMethodNames, M as isExposable };
410
+ export { k as HANDSHAKE_MESSAGES, F as INTERACTION_CONTAINER_SELECTOR, E as NAMESPACE, D as NAMESPACE_SEPARATOR, O as SDK_CALLBACK, A as WELL_KNOWN_MESSAGES, U as default, P as getConfiguratorSettings, N as getMethodNames, M as isExposable };
@@ -1,5 +1,5 @@
1
1
  /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
- import { t as e } from "./browser-BjtSrqbu.mjs";
2
+ import { t as e } from "./browser-CzLpXYFF.mjs";
3
3
  var t = class {
4
4
  _side;
5
5
  _incomingMessageBus = null;
@@ -68,7 +68,7 @@ var t = class {
68
68
  "0.0.0.0"
69
69
  ], r = (e, t) => i(JSON.parse(JSON.stringify(e)), t), i = (e, t) => {
70
70
  for (let n in t) try {
71
- t[n].constructor === Object ? e[n] = i(e[n], t[n]) : e[n] = t[n];
71
+ e[n] = t[n].constructor === Object ? i(e[n], t[n]) : t[n];
72
72
  } catch {
73
73
  e[n] = t[n];
74
74
  }
@@ -185,7 +185,7 @@ var t = class {
185
185
  setupPlugins(e, t, n = "website") {
186
186
  for (let r of e) typeof r == "string" && r === "dragIn" ? this.pluginsLoaded.push(new Promise((e, r) => {
187
187
  try {
188
- import("./drag-in-CGBG4wEk.mjs").then((e) => e.n).then(({ DragIn: i }) => {
188
+ import("./drag-in-DlDsgY4T.mjs").then((e) => e.n).then(({ DragIn: i }) => {
189
189
  let a = new i(this.ui, t, n, this.viewName);
190
190
  a.init().then(() => {
191
191
  this.plugins.dragIn = a, e();
package/sbom.cdx.json CHANGED
@@ -3,14 +3,14 @@
3
3
  "bomFormat": "CycloneDX",
4
4
  "specVersion": "1.6",
5
5
  "version": 1,
6
- "serialNumber": "urn:uuid:575fa36d-a94b-5514-b478-5e0cea1776b7",
6
+ "serialNumber": "urn:uuid:84ce1211-ce90-5759-9933-e771731fdb05",
7
7
  "metadata": {
8
- "timestamp": "2026-11-16T13:07:28.000Z",
8
+ "timestamp": "2026-11-21T10:31:17.000Z",
9
9
  "component": {
10
10
  "type": "library",
11
11
  "name": "@roomle/embedding-lib",
12
- "version": "20f436f6f1b7177fa02b2f62e4b1385d0f03bf67",
13
- "bom-ref": "@roomle/embedding-lib@20f436f6f1b7177fa02b2f62e4b1385d0f03bf67"
12
+ "version": "86c52f1f43c1147a49cb31260028e311eb5f5051",
13
+ "bom-ref": "@roomle/embedding-lib@86c52f1f43c1147a49cb31260028e311eb5f5051"
14
14
  }
15
15
  },
16
16
  "components": [
@@ -351,7 +351,7 @@
351
351
  ],
352
352
  "dependencies": [
353
353
  {
354
- "ref": "@roomle/embedding-lib@20f436f6f1b7177fa02b2f62e4b1385d0f03bf67"
354
+ "ref": "@roomle/embedding-lib@86c52f1f43c1147a49cb31260028e311eb5f5051"
355
355
  },
356
356
  {
357
357
  "ref": "pkg:npm/%40ai-sdk/anthropic@4.0.68"
@@ -0,0 +1,33 @@
1
+
2
+ var e = (e) => e.provider === "host" ? e.responsesProvider ?? null : e.provider === "openai" || e.provider === "openai-compatible" && e.responses && e.storedResponses ? "openai" : e.provider !== "azure" || e.chatCompletions ? null : "azure", t = /^(Previous response with id '[^']*' not found|No tool output found for function call )/, n = (e) => e instanceof Error && t.test(e.message), r = (e) => {
3
+ if (e.role !== "assistant" || !Array.isArray(e.content)) return e;
4
+ let t = e.content;
5
+ return {
6
+ ...e,
7
+ content: t.map((e) => e.type !== "text" && e.type !== "reasoning" || !e.providerOptions ? e : {
8
+ ...e,
9
+ providerOptions: Object.fromEntries(Object.entries(e.providerOptions).map(([e, t]) => [e, Object.fromEntries(Object.entries(t).filter(([e]) => e !== "itemId"))]))
10
+ })
11
+ };
12
+ }, i = (e) => typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : null, a = (e = {}) => {
13
+ let t = i(e.inputTokens), n = i(e.outputTokens);
14
+ return {
15
+ inputTokens: t,
16
+ outputTokens: n,
17
+ totalTokens: i(e.totalTokens) ?? (t !== null && n !== null ? t + n : null)
18
+ };
19
+ }, o = (e) => e.some((e) => e !== null) ? e.reduce((e, t) => e + (t ?? 0), 0) : null, s = (e) => new TextEncoder().encode(e).length, c = async (e) => {
20
+ let t = new TextEncoder().encode(e), n = await globalThis.crypto?.subtle?.digest("SHA-256", t);
21
+ return {
22
+ bytes: t.byteLength,
23
+ sha256: n ? Array.from(new Uint8Array(n), (e) => e.toString(16).padStart(2, "0")).join("") : null
24
+ };
25
+ }, l = async (e) => {
26
+ let t = await c(e), n = JSON.parse(e);
27
+ return Array.isArray(n.input) ? {
28
+ ...t,
29
+ toolsBytes: n.tools ? s(JSON.stringify(n.tools)) : 0,
30
+ input: await Promise.all(n.input.map((e) => c(JSON.stringify(e))))
31
+ } : t;
32
+ };
33
+ export { n as a, a as i, l as n, e as o, o as r, r as s, s as t };
@@ -0,0 +1,34 @@
1
+
2
+ // packages/web-sdk/packages/common-core/src/planning-assistant/continuation.ts
3
+ var e = (e) => e.provider === "host" ? e.responsesProvider ?? null : e.provider === "openai" || e.provider === "openai-compatible" && e.responses && e.storedResponses ? "openai" : e.provider === "azure" && !e.chatCompletions ? "azure" : null, t = /^(Previous response with id '[^']*' not found|No tool output found for function call )/, n = (e) => e instanceof Error && t.test(e.message), r = (e) => {
4
+ if (e.role !== "assistant" || !Array.isArray(e.content)) return e;
5
+ let t = e.content;
6
+ return {
7
+ ...e,
8
+ content: t.map((e) => (e.type === "text" || e.type === "reasoning") && e.providerOptions ? {
9
+ ...e,
10
+ providerOptions: Object.fromEntries(Object.entries(e.providerOptions).map(([e, t]) => [e, Object.fromEntries(Object.entries(t).filter(([e]) => e !== "itemId"))]))
11
+ } : e)
12
+ };
13
+ }, i = (e) => typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : null, a = (e = {}) => {
14
+ let t = i(e.inputTokens), n = i(e.outputTokens);
15
+ return {
16
+ inputTokens: t,
17
+ outputTokens: n,
18
+ totalTokens: i(e.totalTokens) ?? (t !== null && n !== null ? t + n : null)
19
+ };
20
+ }, o = (e) => e.some((e) => e !== null) ? e.reduce((e, t) => e + (t ?? 0), 0) : null, s = (e) => new TextEncoder().encode(e).length, c = async (e) => {
21
+ let t = new TextEncoder().encode(e), n = await globalThis.crypto?.subtle?.digest("SHA-256", t);
22
+ return {
23
+ bytes: t.byteLength,
24
+ sha256: n ? Array.from(new Uint8Array(n), (e) => e.toString(16).padStart(2, "0")).join("") : null
25
+ };
26
+ }, l = async (e) => {
27
+ let t = await c(e), n = JSON.parse(e);
28
+ return Array.isArray(n.input) ? {
29
+ ...t,
30
+ toolsBytes: n.tools ? s(JSON.stringify(n.tools)) : 0,
31
+ input: await Promise.all(n.input.map((e) => c(JSON.stringify(e))))
32
+ } : t;
33
+ };
34
+ export { n as a, a as i, l as n, e as o, o as r, r as s, s as t };
@@ -1,5 +1,5 @@
1
1
 
2
- //#region packages/common/src/utils/get-computed-style-cached.ts
2
+ // packages/common/src/utils/get-computed-style-cached.ts
3
3
  var e = class {
4
4
  _computedStyleCache = /* @__PURE__ */ new Map();
5
5
  _maxLifetime = 16;
@@ -122,11 +122,10 @@ var e = class {
122
122
  top: i.y,
123
123
  bottom: i.y + i.height
124
124
  })), o && !s && !c;
125
- }, d = (e, t, n, r) => l(e, t, n) ? r ? !l(e, t, {
125
+ }, d = (e, t, n, r) => l(e, t, n) ? !r || !l(e, t, {
126
126
  left: r.left + n.left,
127
127
  right: r.right + n.left,
128
128
  top: r.top + n.top,
129
129
  bottom: r.bottom + n.top
130
- }) : !0 : !1;
131
- //#endregion
130
+ }) : !1;
132
131
  export { u as a, t as c, a as i, o as n, d as o, r, l as s, c as t };
@@ -80,36 +80,36 @@ var e, t = class {
80
80
  return r === void 0 ? (...e) => {} : r;
81
81
  } }), l = (e, t, n) => e >= n.left && e <= n.right && t >= n.top && t <= n.bottom, u = (e, t, n, r, i, a) => {
82
82
  let o = !1;
83
- n && (o = l(e, t, a ? {
83
+ n && (o = a ? l(e, t, {
84
84
  left: a.left + n.x,
85
85
  right: a.left + n.x + n.width,
86
86
  top: a.top + n.y,
87
87
  bottom: a.top + n.y + n.height
88
- } : {
88
+ }) : l(e, t, {
89
89
  left: n.x,
90
90
  right: n.x + n.width,
91
91
  top: n.y,
92
92
  bottom: n.y + n.height
93
93
  }));
94
94
  let s = !1;
95
- r && (s = l(e, t, a ? {
95
+ r && (s = a ? l(e, t, {
96
96
  left: a.left + r.x,
97
97
  right: a.left + r.x + r.width,
98
98
  top: a.top + r.y,
99
99
  bottom: a.top + r.y + r.height
100
- } : {
100
+ }) : l(e, t, {
101
101
  left: r.x,
102
102
  right: r.x + r.width,
103
103
  top: r.y,
104
104
  bottom: r.y + r.height
105
105
  }));
106
106
  let c = !1;
107
- return i && (c = l(e, t, a ? {
107
+ return i && (c = a ? l(e, t, {
108
108
  left: a.left + i.x,
109
109
  right: a.left + i.x + i.width,
110
110
  top: a.top + i.y,
111
111
  bottom: a.top + i.y + i.height
112
- } : {
112
+ }) : l(e, t, {
113
113
  left: i.x,
114
114
  right: i.x + i.width,
115
115
  top: i.y,