@roomle/embedding-lib 10.0.0-alpha.1 → 10.0.0-alpha.2

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.
@@ -1,5 +1,5 @@
1
- Third-party software notices for @roomle/embedding-lib 74570fef0c256d9c51b34ef2a4376ec43e3f7ca5
2
- Generated 2026-11-09
1
+ Third-party software notices for @roomle/embedding-lib b02859bd7c70b9817b5b7948e626131a4605f87d
2
+ Generated 2026-11-10
3
3
 
4
4
  This product includes the following third-party components.
5
5
 
@@ -1,47 +1,35 @@
1
- ## 10.0.0-alpha.1 (2026-11-09)
1
+ ## 10.0.0-alpha.2 (2026-11-10)
2
2
 
3
- * Merge branch 'chore/lint-no-template-comments' of github.com:roomle-dev/roomle-ui into chore/lint-no ([06b6f85](https://github.com/roomle-dev/roomle-ui/commit/06b6f85))
4
- * Merge branch 'master' into chore/handoff-to-pr-workflow-RML-18532 ([c153f31](https://github.com/roomle-dev/roomle-ui/commit/c153f31))
5
- * Merge branch 'master' into chore/handoff-to-pr-workflow-RML-18532 ([23fe80c](https://github.com/roomle-dev/roomle-ui/commit/23fe80c))
6
- * Merge branch 'master' into chore/lint-no-template-comments ([05f8a63](https://github.com/roomle-dev/roomle-ui/commit/05f8a63))
7
- * Merge branch 'master' into feat/configuration-assistant-gateway-login-RML-18481 ([3282654](https://github.com/roomle-dev/roomle-ui/commit/3282654))
8
- * Merge branch 'master' into feat/configuration-assistant-gateway-login-RML-18481 ([1b69142](https://github.com/roomle-dev/roomle-ui/commit/1b69142))
9
- * Merge branch 'master' into feat/configuration-assistant-gateway-login-RML-18481 ([e32c56c](https://github.com/roomle-dev/roomle-ui/commit/e32c56c))
10
- * Merge branch 'master' into feat/configuration-assistant-gateway-login-RML-18481 ([dfc1ace](https://github.com/roomle-dev/roomle-ui/commit/dfc1ace))
11
- * Merge branch 'master' into feat/configuration-assistant-gateway-login-RML-18481 ([26c0dd9](https://github.com/roomle-dev/roomle-ui/commit/26c0dd9))
12
- * Merge branch 'master' into feat/configuration-assistant-gateway-login-RML-18481 ([cf57628](https://github.com/roomle-dev/roomle-ui/commit/cf57628))
13
- * Merge branch 'master' into feat/fence-assistant ([c7467d6](https://github.com/roomle-dev/roomle-ui/commit/c7467d6))
14
- * Merge branch 'master' into release/test ([74570fe](https://github.com/roomle-dev/roomle-ui/commit/74570fe))
15
- * Merge pull request #3285 from roomle-dev/feat/configuration-assistant-gateway-login-RML-18481 ([af26ef6](https://github.com/roomle-dev/roomle-ui/commit/af26ef6)), closes [#3285](https://github.com/roomle-dev/roomle-ui/issues/3285)
16
- * Merge pull request #3305 from roomle-dev/chore/handoff-to-pr-workflow-RML-18532 ([4e507fe](https://github.com/roomle-dev/roomle-ui/commit/4e507fe)), closes [#3305](https://github.com/roomle-dev/roomle-ui/issues/3305)
17
- * Merge pull request #3306 from roomle-dev/chore/lint-no-template-comments ([c30ea05](https://github.com/roomle-dev/roomle-ui/commit/c30ea05)), closes [#3306](https://github.com/roomle-dev/roomle-ui/issues/3306)
18
- * Merge pull request #3308 from roomle-dev/feat/fence-assistant ([ba20abd](https://github.com/roomle-dev/roomle-ui/commit/ba20abd)), closes [#3308](https://github.com/roomle-dev/roomle-ui/issues/3308)
19
- * Merge pull request #3311 from roomle-dev/upgraded-by-ci/core-3.3.0-alpha.12 ([5e0d53b](https://github.com/roomle-dev/roomle-ui/commit/5e0d53b)), closes [#3311](https://github.com/roomle-dev/roomle-ui/issues/3311)
20
- * refactor!: rename embedding fence entry to construction ([035a65b](https://github.com/roomle-dev/roomle-ui/commit/035a65b))
21
- * feat: construction (fence) planning assistant ([2e65be5](https://github.com/roomle-dev/roomle-ui/commit/2e65be5))
22
- * feat: integrate configuration assistant gateway login ([e6cdca2](https://github.com/roomle-dev/roomle-ui/commit/e6cdca2))
23
- * feat: support isolated rapi authentication requests ([ea82378](https://github.com/roomle-dev/roomle-ui/commit/ea82378))
24
- * feat(core): upgrade to version 3.3.0-alpha.12 ([bda355d](https://github.com/roomle-dev/roomle-ui/commit/bda355d))
25
- * fix: distinguish assistant shutdown and signout failures ([dac4047](https://github.com/roomle-dev/roomle-ui/commit/dac4047))
26
- * fix: make handoff branch setup work in a separate worktree ([a987151](https://github.com/roomle-dev/roomle-ui/commit/a987151))
27
- * fix: persist native assistant login across reloads ([104b84b](https://github.com/roomle-dev/roomle-ui/commit/104b84b))
28
- * fix: read enableAIRendering in the hi presets and sign-in examples ([fd6e97c](https://github.com/roomle-dev/roomle-ui/commit/fd6e97c))
29
- * fix: revoke tokens of cancelled assistant logins without stalling ([372f156](https://github.com/roomle-dev/roomle-ui/commit/372f156))
30
- * fix: skip deleted files in vue template comment check ([0a0ec9c](https://github.com/roomle-dev/roomle-ui/commit/0a0ec9c))
31
- * chore: add /handoff-to-pr agent workflow ([8eb3028](https://github.com/roomle-dev/roomle-ui/commit/8eb3028))
32
- * chore: forbid html comments in vue templates ([25fd67e](https://github.com/roomle-dev/roomle-ui/commit/25fd67e))
33
- * chore: merge gateway coverage into configuration assistant login ([df4d547](https://github.com/roomle-dev/roomle-ui/commit/df4d547))
34
- * chore: merge master into configuration assistant gateway login ([c483b50](https://github.com/roomle-dev/roomle-ui/commit/c483b50))
35
- * chore: remove html comments from vue templates ([8ac140b](https://github.com/roomle-dev/roomle-ui/commit/8ac140b))
36
- * refactor: make configuration assistant initialization awaitable ([e5c9e94](https://github.com/roomle-dev/roomle-ui/commit/e5c9e94))
37
- * refactor: name configuration assistant login helper ([4e2e78d](https://github.com/roomle-dev/roomle-ui/commit/4e2e78d))
38
- * refactor: reset login state in async helper finally ([6283a39](https://github.com/roomle-dev/roomle-ui/commit/6283a39))
39
- * refactor: reuse sdk authentication in the gateway client ([dbac85c](https://github.com/roomle-dev/roomle-ui/commit/dbac85c))
40
- * refactor: use structured exception handling for assistant logout ([934865a](https://github.com/roomle-dev/roomle-ui/commit/934865a))
41
- * test: avoid namespace import in configuration assistant mock ([40e8eb5](https://github.com/roomle-dev/roomle-ui/commit/40e8eb5))
42
- * test: cover authenticated native assistant gateway ([52a400a](https://github.com/roomle-dev/roomle-ui/commit/52a400a))
43
- * docs: explain configuration assistant authentication and connection ([42d3c86](https://github.com/roomle-dev/roomle-ui/commit/42d3c86))
44
-
45
- ### BREAKING CHANGE
46
-
47
- * Replace imports from @roomle/embedding-lib/fence and @roomle/embedding-lib/fence/min with @roomle/embedding-lib/construction and @roomle/embedding-lib/construction/min.
3
+ * Change requestCachedAsset to return null ([cde3aa9](https://github.com/roomle-dev/roomle-ui/commit/cde3aa9))
4
+ * Merge branch 'master' into feat/embedding-lib-image-edits-RML-18361 ([6f151dd](https://github.com/roomle-dev/roomle-ui/commit/6f151dd))
5
+ * Merge branch 'master' into feat/refactor-texture-loading ([c5ffee5](https://github.com/roomle-dev/roomle-ui/commit/c5ffee5))
6
+ * Merge branch 'master' into feat/refactor-texture-loading ([06f2640](https://github.com/roomle-dev/roomle-ui/commit/06f2640))
7
+ * Merge branch 'master' into feat/refactor-texture-loading ([e284269](https://github.com/roomle-dev/roomle-ui/commit/e284269))
8
+ * Merge branch 'master' into feat/refactor-texture-loading ([414ae20](https://github.com/roomle-dev/roomle-ui/commit/414ae20))
9
+ * Merge branch 'master' into feat/refactor-texture-loading ([c2316bf](https://github.com/roomle-dev/roomle-ui/commit/c2316bf))
10
+ * Merge branch 'master' into fix/fence-parameter-selection ([dca939e](https://github.com/roomle-dev/roomle-ui/commit/dca939e))
11
+ * Merge branch 'master' into fix/fence-parameter-selection ([fec2a68](https://github.com/roomle-dev/roomle-ui/commit/fec2a68))
12
+ * Merge branch 'master' into fix/fence-parameter-selection ([ca5b019](https://github.com/roomle-dev/roomle-ui/commit/ca5b019))
13
+ * Merge branch 'master' into fix/fence-parameter-selection ([b8a0056](https://github.com/roomle-dev/roomle-ui/commit/b8a0056))
14
+ * Merge branch 'master' into release/test ([b02859b](https://github.com/roomle-dev/roomle-ui/commit/b02859b))
15
+ * Merge pull request #3212 from roomle-dev/feat/refactor-texture-loading ([8270480](https://github.com/roomle-dev/roomle-ui/commit/8270480)), closes [#3212](https://github.com/roomle-dev/roomle-ui/issues/3212)
16
+ * Merge pull request #3301 from roomle-dev/fix/fence-parameter-selection ([28e1545](https://github.com/roomle-dev/roomle-ui/commit/28e1545)), closes [#3301](https://github.com/roomle-dev/roomle-ui/issues/3301)
17
+ * Merge pull request #3312 from roomle-dev/upgraded-by-ci/core-3.3.0-alpha.13 ([b3ba110](https://github.com/roomle-dev/roomle-ui/commit/b3ba110)), closes [#3312](https://github.com/roomle-dev/roomle-ui/issues/3312)
18
+ * Merge pull request #3313 from roomle-dev/feat/embedding-lib-image-edits-RML-18361 ([574e5e1](https://github.com/roomle-dev/roomle-ui/commit/574e5e1)), closes [#3313](https://github.com/roomle-dev/roomle-ui/issues/3313)
19
+ * Merge pull request #3314 from roomle-dev/upgraded-by-ci/core-3.3.0-alpha.14 ([89f5cda](https://github.com/roomle-dev/roomle-ui/commit/89f5cda)), closes [#3314](https://github.com/roomle-dev/roomle-ui/issues/3314)
20
+ * refactor: move requestImageEdits to the hi entry point and drop serveImageEdits ([b3e22ed](https://github.com/roomle-dev/roomle-ui/commit/b3e22ed))
21
+ * feat: load textures separately, use asset map instead of deprecated image property ([c931c69](https://github.com/roomle-dev/roomle-ui/commit/c931c69))
22
+ * feat: serve the hi model proxy and images/edits from the embedding-lib ([67ce6ef](https://github.com/roomle-dev/roomle-ui/commit/67ce6ef))
23
+ * feat(core): upgrade to version 3.3.0-alpha.13 ([2017064](https://github.com/roomle-dev/roomle-ui/commit/2017064))
24
+ * feat(core): upgrade to version 3.3.0-alpha.14 ([0629335](https://github.com/roomle-dev/roomle-ui/commit/0629335))
25
+ * fix: address review comments on PR #3212 ([54c4083](https://github.com/roomle-dev/roomle-ui/commit/54c4083)), closes [#3212](https://github.com/roomle-dev/roomle-ui/issues/3212)
26
+ * fix: fix incorrect url requests + tests ([b61960b](https://github.com/roomle-dev/roomle-ui/commit/b61960b))
27
+ * fix: headless test ([b3146da](https://github.com/roomle-dev/roomle-ui/commit/b3146da))
28
+ * fix: make asset map optional for textures, handle pre-cached textures properly ([f06203a](https://github.com/roomle-dev/roomle-ui/commit/f06203a))
29
+ * fix: preserve selected object parameter context ([34ca361](https://github.com/roomle-dev/roomle-ui/commit/34ca361))
30
+ * chore: code quality improvements for e2e fixes ([d4591e0](https://github.com/roomle-dev/roomle-ui/commit/d4591e0))
31
+ * chore: dont use an enum for rapi texture asset type ([27dd980](https://github.com/roomle-dev/roomle-ui/commit/27dd980))
32
+ * chore: fix e2e tests after texture loading changes ([8cc14d4](https://github.com/roomle-dev/roomle-ui/commit/8cc14d4))
33
+ * chore: formatting change ([14ec63b](https://github.com/roomle-dev/roomle-ui/commit/14ec63b))
34
+ * chore: merge master into fence parameter fix ([8b111e1](https://github.com/roomle-dev/roomle-ui/commit/8b111e1))
35
+ * chore: remove unrelated hi parameter refresh changes ([1212e8f](https://github.com/roomle-dev/roomle-ui/commit/1212e8f))
package/hi.js CHANGED
@@ -330,10 +330,53 @@ var i = (e, t) => t === e.libraryId ? e : {
330
330
  type: "availability",
331
331
  available: !0
332
332
  });
333
- }, L = {
333
+ }, L = 5e3, R = async ({ serverUrl: e, authorization: t }) => {
334
+ let n = t ? { Authorization: t } : {}, r;
335
+ try {
336
+ let t = await fetch(`${e}/backends/list`, {
337
+ headers: n,
338
+ signal: AbortSignal.timeout(L)
339
+ });
340
+ r = t.ok ? await t.json() : [];
341
+ } catch (e) {
342
+ return console.warn("No HI model proxy: the backend list failed", e), {};
343
+ }
344
+ if (!Array.isArray(r) || r.length !== 1) return {};
345
+ let [{ enableAIPlanning: i, enableAIRendering: a }] = r, o = `${e}/api/ai/v1`;
346
+ return {
347
+ ...i === !0 && { chat: {
348
+ provider: "openai-compatible",
349
+ baseUrl: o,
350
+ model: "planning",
351
+ headers: n,
352
+ responses: !0,
353
+ readsImages: !0
354
+ } },
355
+ ...a === !0 && { rendering: {
356
+ baseUrl: o,
357
+ model: "rendering",
358
+ headers: n
359
+ } }
360
+ };
361
+ }, z = (e = "1:1") => {
362
+ let [t, n] = e.split(":").map(Number);
363
+ return t === n ? "1024x1024" : t > n ? "1536x1024" : "1024x1536";
364
+ }, B = async (e) => (await fetch(e)).blob(), V = async (e, t, { baseUrl: n, model: r, headers: i }) => {
365
+ let { prompt: a, image: o, aspect: s } = JSON.parse(e.body), c = await B(o), l = new FormData();
366
+ l.append("model", r), l.append("prompt", a), l.append("size", z(s)), l.append("quality", "medium"), l.append("output_format", "png"), l.append("image", c, `scene.${c.type.split("/")[1]}`);
367
+ let u = await fetch(`${n}/images/edits`, {
368
+ method: "POST",
369
+ headers: i,
370
+ body: l,
371
+ signal: t
372
+ });
373
+ if (!u.ok) return u;
374
+ let { data: d } = await u.json(), f = d?.[0]?.b64_json, p = new FormData();
375
+ return f ? p.append("image", await B(`data:image/png;base64,${f}`)) : p.append("text", "The endpoint returned no image"), new Response(p);
376
+ }, H = {
334
377
  HIDE: "hide",
335
378
  SHOW_ATTRIBUTES: "attributes",
336
379
  SHOW_ARTICLES: "articles"
337
380
  };
338
381
  //#endregion
339
- export { L as HI_PANEL_ACTION, y as cleanupHi, p as createHiLibraryCallbacks, b as createHiMcpTools, u as libLoadArticleCatalog, f as libLoadCalcScript, d as libLoadMasterData, n as loadChatModel, h as omGetRequest, m as omPostRequest, s as registerLegacyUrlFormat, v as setupHi, I as startPlanningAssistant, c as unregisterLegacyUrlFormat };
382
+ export { H as HI_PANEL_ACTION, y as cleanupHi, p as createHiLibraryCallbacks, b as createHiMcpTools, u as libLoadArticleCatalog, f as libLoadCalcScript, d as libLoadMasterData, n as loadChatModel, h as omGetRequest, m as omPostRequest, s as registerLegacyUrlFormat, V as requestImageEdits, R as resolveHiModelProxy, v as setupHi, I as startPlanningAssistant, c as unregisterLegacyUrlFormat };
package/hi.min.js CHANGED
@@ -294,9 +294,52 @@ var i = (e, t) => t === e.libraryId ? e : {
294
294
  type: "availability",
295
295
  available: !0
296
296
  });
297
- }, M = {
297
+ }, M = async ({ serverUrl: e, authorization: t }) => {
298
+ let n = t ? { Authorization: t } : {}, r;
299
+ try {
300
+ let t = await fetch(`${e}/backends/list`, {
301
+ headers: n,
302
+ signal: AbortSignal.timeout(5e3)
303
+ });
304
+ r = t.ok ? await t.json() : [];
305
+ } catch {
306
+ return {};
307
+ }
308
+ if (!Array.isArray(r) || r.length !== 1) return {};
309
+ let [{ enableAIPlanning: i, enableAIRendering: a }] = r, o = `${e}/api/ai/v1`;
310
+ return {
311
+ ...!0 === i && { chat: {
312
+ provider: "openai-compatible",
313
+ baseUrl: o,
314
+ model: "planning",
315
+ headers: n,
316
+ responses: !0,
317
+ readsImages: !0
318
+ } },
319
+ ...!0 === a && { rendering: {
320
+ baseUrl: o,
321
+ model: "rendering",
322
+ headers: n
323
+ } }
324
+ };
325
+ }, N = async (e) => (await fetch(e)).blob(), P = async (e, t, { baseUrl: n, model: r, headers: i }) => {
326
+ let { prompt: a, image: o, aspect: s } = JSON.parse(e.body), c = await N(o), l = new FormData();
327
+ l.append("model", r), l.append("prompt", a), l.append("size", ((e = "1:1") => {
328
+ let [t, n] = e.split(":").map(Number);
329
+ return t === n ? "1024x1024" : t > n ? "1536x1024" : "1024x1536";
330
+ })(s)), l.append("quality", "medium"), l.append("output_format", "png"), l.append("image", c, `scene.${c.type.split("/")[1]}`);
331
+ let u = await fetch(`${n}/images/edits`, {
332
+ method: "POST",
333
+ headers: i,
334
+ body: l,
335
+ signal: t
336
+ });
337
+ if (!u.ok) return u;
338
+ let { data: d } = await u.json(), f = d?.[0]?.b64_json, p = new FormData();
339
+ return f ? p.append("image", await N(`data:image/png;base64,${f}`)) : p.append("text", "The endpoint returned no image"), new Response(p);
340
+ }, F = {
298
341
  HIDE: "hide",
299
342
  SHOW_ATTRIBUTES: "attributes",
300
343
  SHOW_ARTICLES: "articles"
301
344
  };
302
- export { M as HI_PANEL_ACTION, v as cleanupHi, p as createHiLibraryCallbacks, y as createHiMcpTools, u as libLoadArticleCatalog, f as libLoadCalcScript, d as libLoadMasterData, n as loadChatModel, h as omGetRequest, m as omPostRequest, s as registerLegacyUrlFormat, _ as setupHi, j as startPlanningAssistant, c as unregisterLegacyUrlFormat };
345
+ export { F as HI_PANEL_ACTION, v as cleanupHi, p as createHiLibraryCallbacks, y as createHiMcpTools, u as libLoadArticleCatalog, f as libLoadCalcScript, d as libLoadMasterData, n as loadChatModel, h as omGetRequest, m as omPostRequest, s as registerLegacyUrlFormat, P as requestImageEdits, M as resolveHiModelProxy, _ as setupHi, j as startPlanningAssistant, c as unregisterLegacyUrlFormat };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "10.0.0-alpha.1",
3
+ "version": "10.0.0-alpha.2",
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",
@@ -0,0 +1,72 @@
1
+ /**
2
+ * The iframe hands its AI model requests to the host page ("bring your own
3
+ * endpoint"), over Comlink on a port it sends, like connect_hi
4
+ */
5
+ export type AiFeature = 'lifestyle-rendering';
6
+ /**
7
+ * The feature names what the request is for, so no route, method or headers
8
+ * of a built-in endpoint reach the host. A feature with several operations
9
+ * (e.g. edit, upscale) would add an `operation` field then; today each
10
+ * feature has one.
11
+ */
12
+ export interface AiModelRequest {
13
+ feature: AiFeature;
14
+ /** The feature's input as JSON, e.g. a RenderingInput; never a key */
15
+ body: string;
16
+ }
17
+ /**
18
+ * A rendering request, the same on every route: JSON for a host page's own
19
+ * endpoint, the b2c-api's multipart form for the built-in one. The named
20
+ * fields are the contract; options added later come as further fields, which
21
+ * a host may ignore.
22
+ */
23
+ export interface RenderingInput {
24
+ prompt: string;
25
+ /** The upload as a data URL */
26
+ image: string;
27
+ /** Output size tier, e.g. 2K */
28
+ size?: string;
29
+ /** Supported ratio closest to the image, e.g. 3:2 */
30
+ aspect?: string;
31
+ /** Image model of the backend; unset: its default */
32
+ model?: string;
33
+ [option: string]: unknown;
34
+ }
35
+ export type AiModelAuthReason = 'start' | 'expired';
36
+ export interface AiModelHandlers {
37
+ onAiModelRequest(request: AiModelRequest, signal: AbortSignal): Promise<Response>;
38
+ /**
39
+ * The host's login: 'start' when the chat shows signed out, 'expired'
40
+ * after a 401; true unlocks the AI features. Without it there is no login
41
+ * gate.
42
+ */
43
+ onRequestAiModelAuth?(reason: AiModelAuthReason, feature: AiFeature): Promise<boolean>;
44
+ }
45
+ /** The host page ended the request itself, e.g. aborted its own fetch */
46
+ export declare class AiModelRequestCancelledError extends Error {
47
+ constructor();
48
+ }
49
+ interface AiModelAnswer {
50
+ status: number;
51
+ statusText: string;
52
+ headers: [string, string][];
53
+ body: ArrayBuffer;
54
+ }
55
+ export interface AiModelHost {
56
+ request(request: AiModelRequest, signal: AbortSignal): Promise<AiModelAnswer>;
57
+ auth(reason: AiModelAuthReason, feature: AiFeature): Promise<boolean>;
58
+ }
59
+ export interface AiModelConnection extends AiModelHost {
60
+ /** Ends the connection; the host's side ends with its relay */
61
+ close(): void;
62
+ }
63
+ export declare const connectAiModelHost: (host: Window) => AiModelConnection;
64
+ /** Rejects at once on `signal`'s abort, whether the host stops or not */
65
+ export declare const relayAiModelRequest: (host: AiModelHost, request: AiModelRequest, signal?: AbortSignal) => Promise<Response>;
66
+ /**
67
+ * False once `signal` aborts, whatever the host answers later, and when the
68
+ * relay fails
69
+ */
70
+ export declare const relayAiModelAuth: (host: AiModelHost, reason: AiModelAuthReason, feature: AiFeature, signal?: AbortSignal) => Promise<boolean>;
71
+ export declare const serveAiModelRelay: (source: Window, origin: string, handlers: AiModelHandlers) => (() => void);
72
+ export {};
@@ -1,7 +1,6 @@
1
1
  import { default as RoomleEmbeddingApi } from './roomle-embedding-lib';
2
2
  import { AiFeature, AiModelHandlers } from '../../common/src/utils/ai-model-relay';
3
- export type { AiFeature, AiModelAuthReason, AiModelHandlers, AiModelRequest, } from '../../common/src/utils/ai-model-relay';
4
- export type { RenderingInput } from '../../../src/common/utils/img-gen';
3
+ export type { AiFeature, AiModelAuthReason, AiModelHandlers, AiModelRequest, RenderingInput, } from '../../common/src/utils/ai-model-relay';
5
4
  export interface AiModelHostOptions extends AiModelHandlers {
6
5
  /**
7
6
  * The features the host answers; the others keep the built-in endpoints.
@@ -16,5 +16,7 @@ export { omPostRequest, omGetRequest, } from './homag-intelligence/hi-order-mana
16
16
  export { setupHi, cleanupHi } from './homag-intelligence/hi-setup';
17
17
  export { createHiMcpTools, type HiMcpTool, type HiMcpTools, type HiMcpPlannerApi, } from './homag-intelligence/hi-mcp-tools';
18
18
  export { loadChatModel, startPlanningAssistant, type PlanningAssistantConfig, type PlanningAssistantPlannerApi, } from './homag-intelligence/hi-planning-assistant';
19
+ export { resolveHiModelProxy, type HiModelProxy, type HiModelProxyOptions, } from './homag-intelligence/hi-model-proxy';
20
+ export { requestImageEdits, type ImageEditsEndpoint, } from './homag-intelligence/image-edits';
19
21
  export { type ExternalObjectSnapshotSaveResult, type HiContextAction, } from '../../web-sdk/packages';
20
22
  export { HI_PANEL_ACTION, type HiPanelActionType, type HiOrderHeader, type HiOrder, type HiOrderData, type HiPriceData, type HiCallbacks, } from '../../common/src/hi/hi-types';
@@ -0,0 +1,26 @@
1
+ import { ImageEditsEndpoint } from './image-edits';
2
+ import { PlanningAssistantConfig } from '../planning-assistant/chat-model';
3
+ /**
4
+ * What the model proxy of the HI server serves the HI user. The model, its
5
+ * endpoint and its key stay in the backend; the page sends only its
6
+ * authorization.
7
+ */
8
+ export interface HiModelProxy {
9
+ /** The AI Planning Assistant, when the backend's `enableAIPlanning` is true */
10
+ chat?: PlanningAssistantConfig;
11
+ /** The lifestyle renderings of the AI image chat, when the backend's `enableAIRendering` is true */
12
+ rendering?: ImageEditsEndpoint;
13
+ }
14
+ export interface HiModelProxyOptions {
15
+ /** The HI server, e.g. `https://dfscfgtest01-app.azurewebsites.net`; `''` for the page's own origin */
16
+ serverUrl: string;
17
+ /** The Basic authorization of the HI user; without it, the browser's session of a same-origin page */
18
+ authorization?: string;
19
+ }
20
+ /**
21
+ * Reads the backend list of the HI user and returns what the model proxy of
22
+ * the HI server serves. The proxy serves only a user of exactly one backend:
23
+ * the chat when that backend's `enableAIPlanning` is true, the renderings
24
+ * when its `enableAIRendering` is true. A failed backend list serves neither.
25
+ */
26
+ export declare const resolveHiModelProxy: ({ serverUrl, authorization, }: HiModelProxyOptions) => Promise<HiModelProxy>;
@@ -0,0 +1,21 @@
1
+ import { AiModelRequest } from '../../../common/src/utils/ai-model-relay';
2
+ /**
3
+ * An endpoint that speaks OpenAI images/edits, e.g. the model proxy of the HI
4
+ * server or an Azure AI Foundry resource
5
+ */
6
+ export interface ImageEditsEndpoint {
7
+ /** The OpenAI v1 base URL; the request goes to `<baseUrl>/images/edits` */
8
+ baseUrl: string;
9
+ /** The model name the endpoint expects, e.g. `rendering` on the HI model proxy */
10
+ model: string;
11
+ /** Sent with every request, e.g. `Authorization` or `api-key` */
12
+ headers?: Record<string, string>;
13
+ }
14
+ /**
15
+ * Answers a rendering request of the AI image chat at an images/edits
16
+ * endpoint: sends the prompt and the capture with the endpoint's model and
17
+ * headers, and answers the chat with a form holding the image, or a text when
18
+ * the endpoint returns none. An error answer goes back unchanged: the chat
19
+ * reads its status, its `Retry-After` and OpenAI's `error.message` itself.
20
+ */
21
+ export declare const requestImageEdits: (request: AiModelRequest, signal: AbortSignal, { baseUrl, model, headers }: ImageEditsEndpoint) => Promise<Response>;
@@ -0,0 +1,12 @@
1
+ import { AgentMcpTools } from './mcp-tools';
2
+ /**
3
+ * Records tool execution independently of whether the model finishes its
4
+ * step, so an interrupted reply can say what the tools changed.
5
+ */
6
+ export declare const createChatRecovery: (tools: AgentMcpTools, domain?: {
7
+ subject: string;
8
+ readTools: ReadonlySet<string>;
9
+ }) => {
10
+ tools: AgentMcpTools;
11
+ summary: () => string;
12
+ };
@@ -0,0 +1,17 @@
1
+ import { PlanningAssistantOutput, PlanningAssistantPrompt } from '../planning-assistant';
2
+ import { PlanningAssistantConfig } from './chat-model';
3
+ import { AgentMcpTools } from './mcp-tools';
4
+ /** Runs a browser agent with the tools and prompts supplied by its SDK domain. */
5
+ export declare const createAssistant: (config: PlanningAssistantConfig, signal: AbortSignal, output: (part: PlanningAssistantOutput) => unknown, setupDomain: () => Promise<{
6
+ prompts: {
7
+ systemPrompt: string;
8
+ imagePrompt: string;
9
+ };
10
+ tools: AgentMcpTools;
11
+ }>, turnPolicy?: {
12
+ timeoutMs: number;
13
+ recovery: (tools: AgentMcpTools) => {
14
+ tools: AgentMcpTools;
15
+ summary(): string;
16
+ };
17
+ }) => Promise<(prompt: PlanningAssistantPrompt) => Promise<void>>;
@@ -0,0 +1,36 @@
1
+ /** The message the user sends in the AI Planning Assistant window. */
2
+ export interface PlanningAssistantPrompt {
3
+ /** What the user typed, trimmed; empty when the user sends only an image. */
4
+ text: string;
5
+ /** The images of the message as JPEG data URLs: the long side at most 1568 px, EXIF rotation applied, transparent parts white. */
6
+ images: string[];
7
+ }
8
+ /**
9
+ * One part of the output of the host's planning agent for the AI Planning Assistant window:
10
+ * - "text": a piece of the answer of the running turn, markdown, appended to the answer
11
+ * - "activity": what the agent does now, e.g. the tool it runs, shown in the status line
12
+ * - "error": the turn failed; the text replaces the answer of the turn and ends the turn
13
+ * - "done": the turn is complete; the input is free again
14
+ * - "availability": the input on or off, with the reason shown in the status line; off until the host enables it
15
+ * - "images": the image drop on or off; off until the host enables it
16
+ */
17
+ export type PlanningAssistantOutput = {
18
+ type: 'text';
19
+ text: string;
20
+ } | {
21
+ type: 'activity';
22
+ text: string;
23
+ } | {
24
+ type: 'error';
25
+ text: string;
26
+ statusCode?: number;
27
+ } | {
28
+ type: 'done';
29
+ } | {
30
+ type: 'availability';
31
+ available: boolean;
32
+ text?: string;
33
+ } | {
34
+ type: 'images';
35
+ enabled: boolean;
36
+ };
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:754a2cdf-5d43-59a7-bd3f-b10533b4c0ea",
6
+ "serialNumber": "urn:uuid:27206947-3938-5b3b-ab2d-11d7613559a7",
7
7
  "metadata": {
8
- "timestamp": "2026-11-09T19:39:39.000Z",
8
+ "timestamp": "2026-11-10T12:13:11.000Z",
9
9
  "component": {
10
10
  "type": "library",
11
11
  "name": "@roomle/embedding-lib",
12
- "version": "74570fef0c256d9c51b34ef2a4376ec43e3f7ca5",
13
- "bom-ref": "@roomle/embedding-lib@74570fef0c256d9c51b34ef2a4376ec43e3f7ca5"
12
+ "version": "b02859bd7c70b9817b5b7948e626131a4605f87d",
13
+ "bom-ref": "@roomle/embedding-lib@b02859bd7c70b9817b5b7948e626131a4605f87d"
14
14
  }
15
15
  },
16
16
  "components": [
@@ -351,7 +351,7 @@
351
351
  ],
352
352
  "dependencies": [
353
353
  {
354
- "ref": "@roomle/embedding-lib@74570fef0c256d9c51b34ef2a4376ec43e3f7ca5"
354
+ "ref": "@roomle/embedding-lib@b02859bd7c70b9817b5b7948e626131a4605f87d"
355
355
  },
356
356
  {
357
357
  "ref": "pkg:npm/%40ai-sdk/anthropic@4.0.68"