@roomle/embedding-lib 10.0.0-alpha.1 → 10.0.0-alpha.3
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 +2 -2
- package/docs/md/web/embedding/CHANGELOG.md +55 -46
- package/hi.js +45 -2
- package/hi.min.js +45 -2
- package/package.json +1 -1
- package/packages/common/src/utils/ai-model-relay.d.ts +72 -0
- package/packages/embedding-lib/src/ai.d.ts +1 -2
- package/packages/embedding-lib/src/hi.d.ts +2 -0
- package/packages/embedding-lib/src/homag-intelligence/hi-model-proxy.d.ts +26 -0
- package/packages/embedding-lib/src/homag-intelligence/image-edits.d.ts +21 -0
- package/packages/web-sdk/packages/common-core/src/planning-assistant/chat-recovery.d.ts +12 -0
- package/packages/web-sdk/packages/common-core/src/planning-assistant/runtime.d.ts +17 -0
- package/packages/web-sdk/packages/common-core/src/planning-assistant.d.ts +36 -0
- package/sbom.cdx.json +5 -5
package/THIRD-PARTY-NOTICES.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Third-party software notices for @roomle/embedding-lib
|
|
2
|
-
Generated 2026-11-
|
|
1
|
+
Third-party software notices for @roomle/embedding-lib cb1bd9e11d83a0aea78947664a0e60c83b88fccc
|
|
2
|
+
Generated 2026-11-12
|
|
3
3
|
|
|
4
4
|
This product includes the following third-party components.
|
|
5
5
|
|
|
@@ -1,47 +1,56 @@
|
|
|
1
|
-
## 10.0.0-alpha.
|
|
1
|
+
## 10.0.0-alpha.3 (2026-11-12)
|
|
2
2
|
|
|
3
|
-
* Merge branch '
|
|
4
|
-
* Merge branch 'master' into chore/
|
|
5
|
-
* Merge branch 'master' into
|
|
6
|
-
* Merge branch 'master' into
|
|
7
|
-
* Merge branch 'master' into
|
|
8
|
-
* Merge branch 'master' into
|
|
9
|
-
* Merge branch 'master' into
|
|
10
|
-
* Merge branch 'master' into
|
|
11
|
-
* Merge branch 'master' into
|
|
12
|
-
* Merge branch 'master' into
|
|
13
|
-
* Merge branch 'master' into
|
|
14
|
-
* Merge branch 'master' into
|
|
15
|
-
* Merge
|
|
16
|
-
* Merge
|
|
17
|
-
* Merge
|
|
18
|
-
* Merge
|
|
19
|
-
* Merge
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*
|
|
3
|
+
* Merge branch 'master' into chore/agents-contexts-guideline-RML-18404 ([22f9f4c](https://github.com/roomle-dev/roomle-ui/commit/22f9f4c))
|
|
4
|
+
* Merge branch 'master' into chore/agents-contexts-guideline-RML-18404 ([780cbce](https://github.com/roomle-dev/roomle-ui/commit/780cbce))
|
|
5
|
+
* Merge branch 'master' into feat/configuration-assistant-bug-report-RML-18578 ([920d4cd](https://github.com/roomle-dev/roomle-ui/commit/920d4cd))
|
|
6
|
+
* Merge branch 'master' into feat/hi-article-name-description-RML-18584 ([a6ce409](https://github.com/roomle-dev/roomle-ui/commit/a6ce409))
|
|
7
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([1caa71a](https://github.com/roomle-dev/roomle-ui/commit/1caa71a))
|
|
8
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([bb742b5](https://github.com/roomle-dev/roomle-ui/commit/bb742b5))
|
|
9
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([da5e26a](https://github.com/roomle-dev/roomle-ui/commit/da5e26a))
|
|
10
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([81a08e8](https://github.com/roomle-dev/roomle-ui/commit/81a08e8))
|
|
11
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([bdaaedb](https://github.com/roomle-dev/roomle-ui/commit/bdaaedb))
|
|
12
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([857503b](https://github.com/roomle-dev/roomle-ui/commit/857503b))
|
|
13
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([8a27076](https://github.com/roomle-dev/roomle-ui/commit/8a27076))
|
|
14
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([60a9775](https://github.com/roomle-dev/roomle-ui/commit/60a9775))
|
|
15
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([98f8a8d](https://github.com/roomle-dev/roomle-ui/commit/98f8a8d))
|
|
16
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([5997ab0](https://github.com/roomle-dev/roomle-ui/commit/5997ab0))
|
|
17
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([7076a8f](https://github.com/roomle-dev/roomle-ui/commit/7076a8f))
|
|
18
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([9be426b](https://github.com/roomle-dev/roomle-ui/commit/9be426b))
|
|
19
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([1f9b99d](https://github.com/roomle-dev/roomle-ui/commit/1f9b99d))
|
|
20
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([18d5de3](https://github.com/roomle-dev/roomle-ui/commit/18d5de3))
|
|
21
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([1226acd](https://github.com/roomle-dev/roomle-ui/commit/1226acd))
|
|
22
|
+
* Merge branch 'master' into fix/hi-module-reread-after-reload-RML-18368 ([4afc035](https://github.com/roomle-dev/roomle-ui/commit/4afc035))
|
|
23
|
+
* Merge branch 'master' into release/test ([cb1bd9e](https://github.com/roomle-dev/roomle-ui/commit/cb1bd9e))
|
|
24
|
+
* Merge pull request #3261 from roomle-dev/fix/hi-module-reread-after-reload-RML-18368 ([80888ee](https://github.com/roomle-dev/roomle-ui/commit/80888ee)), closes [#3261](https://github.com/roomle-dev/roomle-ui/issues/3261)
|
|
25
|
+
* Merge pull request #3265 from roomle-dev/chore/agents-contexts-guideline-RML-18404 ([178d401](https://github.com/roomle-dev/roomle-ui/commit/178d401)), closes [#3265](https://github.com/roomle-dev/roomle-ui/issues/3265)
|
|
26
|
+
* Merge pull request #3320 from roomle-dev/fix/webgpu-fixes ([2ada46f](https://github.com/roomle-dev/roomle-ui/commit/2ada46f)), closes [#3320](https://github.com/roomle-dev/roomle-ui/issues/3320)
|
|
27
|
+
* Merge pull request #3328 from roomle-dev/upgraded-by-ci/core-3.3.0-alpha.15 ([906ecb8](https://github.com/roomle-dev/roomle-ui/commit/906ecb8)), closes [#3328](https://github.com/roomle-dev/roomle-ui/issues/3328)
|
|
28
|
+
* Merge pull request #3333 from roomle-dev/fix/lvl2-catalog-dimensions-fix ([b57fdba](https://github.com/roomle-dev/roomle-ui/commit/b57fdba)), closes [#3333](https://github.com/roomle-dev/roomle-ui/issues/3333)
|
|
29
|
+
* Merge pull request #3334 from roomle-dev/feat/configuration-assistant-bug-report-RML-18578 ([ce902a5](https://github.com/roomle-dev/roomle-ui/commit/ce902a5)), closes [#3334](https://github.com/roomle-dev/roomle-ui/issues/3334)
|
|
30
|
+
* Merge pull request #3335 from roomle-dev/feat/hi-article-name-description-RML-18584 ([af7d782](https://github.com/roomle-dev/roomle-ui/commit/af7d782)), closes [#3335](https://github.com/roomle-dev/roomle-ui/issues/3335)
|
|
31
|
+
* Merge pull request #3337 from roomle-dev/upgraded-by-ci/core-3.3.0-alpha.16 ([f6c41b4](https://github.com/roomle-dev/roomle-ui/commit/f6c41b4)), closes [#3337](https://github.com/roomle-dev/roomle-ui/issues/3337)
|
|
32
|
+
* Update PR review guidelines in review-external-pr.md ([daa58c1](https://github.com/roomle-dev/roomle-ui/commit/daa58c1))
|
|
33
|
+
* Update web-sdk.md with scene manager details ([4d8a5cb](https://github.com/roomle-dev/roomle-ui/commit/4d8a5cb))
|
|
34
|
+
* feat: add a bug report button to the configuration assistant ([8ce20d8](https://github.com/roomle-dev/roomle-ui/commit/8ce20d8))
|
|
35
|
+
* feat(sdk): add getExternalObjectArticleInfo for HI root modules ([ecde2f1](https://github.com/roomle-dev/roomle-ui/commit/ecde2f1))
|
|
36
|
+
* feat: show HI article in the product settings header ([3910be7](https://github.com/roomle-dev/roomle-ui/commit/3910be7))
|
|
37
|
+
* feat: show HI article name, id and description in product settings ([399ffd2](https://github.com/roomle-dev/roomle-ui/commit/399ffd2))
|
|
38
|
+
* feat(core): upgrade to version 3.3.0-alpha.15 ([f0421bc](https://github.com/roomle-dev/roomle-ui/commit/f0421bc))
|
|
39
|
+
* feat(core): upgrade to version 3.3.0-alpha.16 ([767f705](https://github.com/roomle-dev/roomle-ui/commit/767f705))
|
|
40
|
+
* chore: download the translations of the configuration assistant ([e884ed5](https://github.com/roomle-dev/roomle-ui/commit/e884ed5))
|
|
41
|
+
* chore: merge master into hi module reread fix ([a38becf](https://github.com/roomle-dev/roomle-ui/commit/a38becf))
|
|
42
|
+
* chore: reconcile concurrent master merges ([f69e359](https://github.com/roomle-dev/roomle-ui/commit/f69e359))
|
|
43
|
+
* chore(agents): require naming and verifying contexts for SDK changes RML-18404 ([7ed77ed](https://github.com/roomle-dev/roomle-ui/commit/7ed77ed))
|
|
44
|
+
* fix: add minimum webgpu fog distance for very small objects ([b869241](https://github.com/roomle-dev/roomle-ui/commit/b869241))
|
|
45
|
+
* fix: address review comments on PR #3334 ([60ddac6](https://github.com/roomle-dev/roomle-ui/commit/60ddac6)), closes [#3334](https://github.com/roomle-dev/roomle-ui/issues/3334)
|
|
46
|
+
* fix: address review comments on the bug report button ([10d5bed](https://github.com/roomle-dev/roomle-ui/commit/10d5bed))
|
|
47
|
+
* fix: keep components the configuration assistant docks or drags on their dock ([fbabaa4](https://github.com/roomle-dev/roomle-ui/commit/fbabaa4))
|
|
48
|
+
* fix(hi): keep group and root rotations in [0, 360) ([2b88b3e](https://github.com/roomle-dev/roomle-ui/commit/2b88b3e))
|
|
49
|
+
* fix: make the header description tooltip keyboard accessible ([fabf03b](https://github.com/roomle-dev/roomle-ui/commit/fabf03b))
|
|
50
|
+
* fix(hi): re-read an hi module after its reload, not at the hand-over ([d803cb8](https://github.com/roomle-dev/roomle-ui/commit/d803cb8))
|
|
51
|
+
* fix: reduce top offset of product infos without price to 1rem ([4a70242](https://github.com/roomle-dev/roomle-ui/commit/4a70242))
|
|
52
|
+
* fix: remove workaround for offset camera for ground reflection ([e2d1b2a](https://github.com/roomle-dev/roomle-ui/commit/e2d1b2a))
|
|
53
|
+
* fix: restore product settings layout for objects without article info ([406a6b5](https://github.com/roomle-dev/roomle-ui/commit/406a6b5))
|
|
54
|
+
* fix: simplifly unit calculation on catalog dimensions ([bd2bbfc](https://github.com/roomle-dev/roomle-ui/commit/bd2bbfc))
|
|
55
|
+
* fix(hi): skip the hi validation of article parameters while a module is selected ([ec933e1](https://github.com/roomle-dev/roomle-ui/commit/ec933e1))
|
|
56
|
+
* refactor: drop empty price container in product settings infos ([1be42ba](https://github.com/roomle-dev/roomle-ui/commit/1be42ba))
|
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 {
|
|
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 {
|
|
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.
|
|
3
|
+
"version": "10.0.0-alpha.3",
|
|
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:
|
|
6
|
+
"serialNumber": "urn:uuid:1a5f32ff-4075-5f44-bfe3-e33f60ce9d99",
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-
|
|
8
|
+
"timestamp": "2026-11-12T06:59:30.000Z",
|
|
9
9
|
"component": {
|
|
10
10
|
"type": "library",
|
|
11
11
|
"name": "@roomle/embedding-lib",
|
|
12
|
-
"version": "
|
|
13
|
-
"bom-ref": "@roomle/embedding-lib@
|
|
12
|
+
"version": "cb1bd9e11d83a0aea78947664a0e60c83b88fccc",
|
|
13
|
+
"bom-ref": "@roomle/embedding-lib@cb1bd9e11d83a0aea78947664a0e60c83b88fccc"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"components": [
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
],
|
|
352
352
|
"dependencies": [
|
|
353
353
|
{
|
|
354
|
-
"ref": "@roomle/embedding-lib@
|
|
354
|
+
"ref": "@roomle/embedding-lib@cb1bd9e11d83a0aea78947664a0e60c83b88fccc"
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
"ref": "pkg:npm/%40ai-sdk/anthropic@4.0.68"
|