@roomle/embedding-lib 9.1.0-alpha.4 → 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.
- package/THIRD-PARTY-NOTICES.txt +2 -2
- package/chat-model-DKlWonm6.mjs +322 -0
- package/chat-model-gyIajfDW.mjs +327 -0
- package/configurator.js +1 -1
- package/configurator.min.js +1 -1
- package/construction.d.ts +2 -0
- package/construction.js +58 -0
- package/construction.min.js +56 -0
- package/{dist-XEy6Tk_Y.mjs → dist-6TznX-Ae.mjs} +1657 -1484
- package/{dist-B9yy8ym8.mjs → dist-BsVeWZ8R.mjs} +1 -1
- package/{dist-Bb2L1Zel.mjs → dist-CjIZv2gB.mjs} +1 -1
- package/{dist-5jYYtT4q.mjs → dist-Cmx_tCV5.mjs} +1 -1
- package/{dist-C5fKJXpB.mjs → dist-CnTUCpLZ.mjs} +1 -1
- package/{dist-GTk8ppiK.mjs → dist-Cxe4osFc.mjs} +1 -1
- package/{dist-DJtonrDM.mjs → dist-D0XFfKEL.mjs} +3081 -2908
- package/{dist-Bo3WzRdf.mjs → dist-DCzWWudD.mjs} +1 -1
- package/docs/md/web/embedding/CHANGELOG.md +34 -19
- package/{drag-ghost-yXe7c8jA.mjs → drag-ghost-B24KVqgc.mjs} +1 -1
- package/{drag-ghost-D7FnWbO4.mjs → drag-ghost-C1WS2KmW.mjs} +1 -1
- package/{drag-in-t7T6Pqwc.mjs → drag-in-CWHSbwvG.mjs} +3 -3
- package/{drag-in-BiEe2Lgv.mjs → drag-in-O5uwMddL.mjs} +3 -3
- package/embedding-plugins.js +1 -1
- package/embedding-plugins.min.js +1 -1
- package/{from-custom-view-CTBapIc6.mjs → from-custom-view-BgmiWIEN.mjs} +3 -3
- package/{from-custom-view-xbjgsLll.mjs → from-custom-view-CxmIIsHU.mjs} +3 -3
- package/{from-website-JwG7Ic_U.mjs → from-website-B8qFEG_R.mjs} +3 -3
- package/{from-website-DUPMQPl6.mjs → from-website-CvcnHmr2.mjs} +3 -3
- package/hi.js +49 -6
- package/hi.min.js +49 -6
- package/package.json +8 -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/construction-agent/construction-mcp-tools.d.ts +10 -0
- package/packages/embedding-lib/src/construction-agent/construction-planning-assistant.d.ts +7 -0
- package/packages/embedding-lib/src/construction.d.ts +3 -0
- 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/embedding-lib/src/planning-assistant/chat-recovery.d.ts +1 -0
- package/packages/embedding-lib/src/planning-assistant/planning-assistant.d.ts +15 -0
- package/packages/web-sdk/packages/assistant.d.ts +3 -1
- 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/roomle-embedding-lib.js +2 -2
- package/roomle-embedding-lib.min.js +2 -2
- package/sbom.cdx.json +5 -5
- package/mcp-tools-Cnhgobge.mjs +0 -153
- package/mcp-tools-D3Ei3Apu.mjs +0 -151
- /package/{browser-D6As4Zxr.mjs → browser-BjtSrqbu.mjs} +0 -0
- /package/{browser-zrjtYpL8.mjs → browser-D6M-d6y5.mjs} +0 -0
- /package/{dist-CXemOs84.mjs → dist-BI_3AeI-.mjs} +0 -0
- /package/{dist-CqpDM10w.mjs → dist-CGgFMwb1.mjs} +0 -0
- /package/{dist-CqP0aX0A.mjs → dist-CZbrRF4T.mjs} +0 -0
- /package/{dist-D0kh4WfT.mjs → dist-Dr3LcjP6.mjs} +0 -0
- /package/{dist-COgAdYY1.mjs → dist-Ur4DqwwC.mjs} +0 -0
- /package/{dist-D5HdKuwj.mjs → dist-wPZpiGiu.mjs} +0 -0
- /package/{experimental-evaluation-D56MbtjO.mjs → experimental-evaluation-DPkDk-5A.mjs} +0 -0
- /package/{experimental-evaluation-BgWFolud.mjs → experimental-evaluation-DyONuPyk.mjs} +0 -0
- /package/{utils-CAAGdgk8.mjs → utils-BoELtcEK.mjs} +0 -0
- /package/{utils-WeolMfC5.mjs → utils-BwWn6Fw4.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { At as e, Bt as t, E as n, Et as r, H as i, Ht as a, I as o, J as s, Jt as c, K as l, L as u, Lt as d, M as f, N as p, O as m, Ot as h, P as g, Q as _, Rt as v, S as y, Sn as b, St as x, T as S, Tt as C, U as w, Vt as T, W as E, Wt as D, X as O, Yt as k, _ as A, _t as j, a as M, an as N, bn as P, bt as F, dn as I, dt as ee, f as L, fn as R, g as te, gn as z, h as ne, in as B, it as re, j as V, jn as H, jt as U, kn as ie, kt as ae, ln as W, m as oe, nn as se, nt as ce, ot as G, p as le, pt as ue, rn as de, rt as fe, sn as K, st as pe, tn as q, ut as me, w as he, wt as J, y as ge, zt as _e } from "./dist-BV-32IEX.mjs";
|
|
3
|
-
import { t as ve } from "./experimental-evaluation-
|
|
3
|
+
import { t as ve } from "./experimental-evaluation-DyONuPyk.mjs";
|
|
4
4
|
//#region node_modules/@ai-sdk/google/dist/index.js
|
|
5
5
|
var ye = "4.0.85", Y = he({
|
|
6
6
|
errorSchema: G(() => t(N({ error: N({
|
|
@@ -1,20 +1,35 @@
|
|
|
1
|
-
##
|
|
1
|
+
## 10.0.0-alpha.2 (2026-11-10)
|
|
2
2
|
|
|
3
|
-
*
|
|
4
|
-
* Merge branch 'master' into
|
|
5
|
-
* Merge branch 'master' into
|
|
6
|
-
* Merge branch 'master' into
|
|
7
|
-
* Merge branch 'master' into
|
|
8
|
-
* Merge branch 'master' into
|
|
9
|
-
* Merge
|
|
10
|
-
* Merge
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
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))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-
|
|
2
|
+
import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-O5uwMddL.mjs";
|
|
3
3
|
import "./embedding-plugins.js";
|
|
4
4
|
//#region packages/common/src/utils/drag.ts
|
|
5
5
|
var o = (e, t, n = 0, r = 0) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-
|
|
2
|
+
import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-CWHSbwvG.mjs";
|
|
3
3
|
import "./embedding-plugins.min.js";
|
|
4
4
|
var o = (e, t, n = 0, r = 0) => {
|
|
5
5
|
let i = t.x + t.width + n, a = t.x - n, o = t.y + t.height + r, s = t.y - r, { x: c, y: l } = e;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { n as e } from "./dist-D0XFfKEL.mjs";
|
|
3
3
|
var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-overlay", i = "rml-drag-in-drag-ghost", a = "rml-drag-in-fade-in", o = "rml-drag-in-fade-out", s = { DISPLAY_NONE: "rml-display-none" }, c = .5, l = "250ms", u = "forwards", d = `@keyframes ${a} {from{opacity: 0;}to {opacity: 0.5;}}`, f = `@keyframes ${o} {from{opacity: 0.5;}to {opacity: 0;}}`, p = `${a} ${l} ${u}`, m = `${o} ${l} ${u}`, h = "https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg", g = 112, _ = 112, v = class {
|
|
4
4
|
_mainDomElement;
|
|
5
5
|
_instance;
|
|
@@ -29,7 +29,7 @@ var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-o
|
|
|
29
29
|
}
|
|
30
30
|
async init() {
|
|
31
31
|
if (await super.init(), this._mode === "website") try {
|
|
32
|
-
let { DragInFromWebsiteStrategy: e } = await import("./from-website-
|
|
32
|
+
let { DragInFromWebsiteStrategy: e } = await import("./from-website-B8qFEG_R.mjs");
|
|
33
33
|
this._strategy = new e(this._instance, this._mainDomElement, {
|
|
34
34
|
settings: this.options,
|
|
35
35
|
mode: "website"
|
|
@@ -40,7 +40,7 @@ var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-o
|
|
|
40
40
|
else {
|
|
41
41
|
if (this._mode !== "custom-view") throw Error("Unsupported mode");
|
|
42
42
|
try {
|
|
43
|
-
let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-
|
|
43
|
+
let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-BgmiWIEN.mjs");
|
|
44
44
|
this._strategy = new e(this._instance, this._mainDomElement, this.options, this._viewName);
|
|
45
45
|
} catch (e) {
|
|
46
46
|
throw e;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { n as e } from "./dist-6TznX-Ae.mjs";
|
|
3
3
|
//#region packages/embedding-lib/src/plugins/constants.ts
|
|
4
4
|
var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-overlay", i = "rml-drag-in-drag-ghost", a = "rml-drag-in-fade-in", o = "rml-drag-in-fade-out", s = { DISPLAY_NONE: "rml-display-none" }, c = .5, l = "250ms", u = "forwards", d = `@keyframes ${a} {from{opacity: 0;}to {opacity: ${c};}}`, f = `@keyframes ${o} {from{opacity: ${c};}to {opacity: 0;}}`, p = `${a} ${l} ${u}`, m = `${o} ${l} ${u}`, h = "https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg", g = 112, _ = 112, v = class {
|
|
5
5
|
_mainDomElement;
|
|
@@ -36,7 +36,7 @@ var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-o
|
|
|
36
36
|
}
|
|
37
37
|
async init() {
|
|
38
38
|
if (await super.init(), this._mode === "website") try {
|
|
39
|
-
let { DragInFromWebsiteStrategy: e } = await import("./from-website-
|
|
39
|
+
let { DragInFromWebsiteStrategy: e } = await import("./from-website-CvcnHmr2.mjs");
|
|
40
40
|
this._strategy = new e(this._instance, this._mainDomElement, {
|
|
41
41
|
settings: this.options,
|
|
42
42
|
mode: "website"
|
|
@@ -45,7 +45,7 @@ var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-o
|
|
|
45
45
|
throw console.error("Could not load Dragin strategy \"FromWebsite\""), e;
|
|
46
46
|
}
|
|
47
47
|
else if (this._mode === "custom-view") try {
|
|
48
|
-
let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-
|
|
48
|
+
let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-CxmIIsHU.mjs");
|
|
49
49
|
this._strategy = new e(this._instance, this._mainDomElement, this.options, this._viewName);
|
|
50
50
|
} catch (e) {
|
|
51
51
|
throw console.error("Could not load Dragin strategy \"FromCustomView\""), e;
|
package/embedding-plugins.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
|
|
2
|
-
import { a as e, c as t, d as n, f as r, h as i, i as a, m as o, o as s, s as c, t as l, u } from "./drag-in-
|
|
2
|
+
import { a as e, c as t, d as n, f as r, h as i, i as a, m as o, o as s, s as c, t as l, u } from "./drag-in-O5uwMddL.mjs";
|
|
3
3
|
export { l as DragIn, a as RML_DRAG_GHOST_FADE_IN, e as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS, s as RML_DRAG_GHOST_FADE_OUT, c as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS, t as RML_DRAG_IN_DRAG_ELEMENT_ID, u as RML_DRAG_IN_FALLBACK_GHOST_HEIGHT, n as RML_DRAG_IN_FALLBACK_GHOST_URL, r as RML_DRAG_IN_FALLBACK_GHOST_WIDTH, o as RML_DRAG_IN_STYLES_ID, i as TARGET_OPACITY };
|
package/embedding-plugins.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
|
|
2
|
-
import { a as e, c as t, d as n, f as r, h as i, i as a, m as o, o as s, s as c, t as l, u } from "./drag-in-
|
|
2
|
+
import { a as e, c as t, d as n, f as r, h as i, i as a, m as o, o as s, s as c, t as l, u } from "./drag-in-CWHSbwvG.mjs";
|
|
3
3
|
export { l as DragIn, a as RML_DRAG_GHOST_FADE_IN, e as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS, s as RML_DRAG_GHOST_FADE_OUT, c as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS, t as RML_DRAG_IN_DRAG_ELEMENT_ID, u as RML_DRAG_IN_FALLBACK_GHOST_HEIGHT, n as RML_DRAG_IN_FALLBACK_GHOST_URL, r as RML_DRAG_IN_FALLBACK_GHOST_WIDTH, o as RML_DRAG_IN_STYLES_ID, i as TARGET_OPACITY };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as e, c as t, n } from "./utils-
|
|
3
|
-
import { d as r } from "./drag-in-
|
|
4
|
-
import { t as i } from "./drag-ghost-
|
|
2
|
+
import { a as e, c as t, n } from "./utils-BoELtcEK.mjs";
|
|
3
|
+
import { d as r } from "./drag-in-CWHSbwvG.mjs";
|
|
4
|
+
import { t as i } from "./drag-ghost-C1WS2KmW.mjs";
|
|
5
5
|
var a = (e, n = 0) => t(e) ? {
|
|
6
6
|
clientX: e.touches[n].clientX,
|
|
7
7
|
clientY: e.touches[n].clientY
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as e, c as t, n } from "./utils-
|
|
3
|
-
import { d as r } from "./drag-in-
|
|
4
|
-
import { t as i } from "./drag-ghost-
|
|
2
|
+
import { a as e, c as t, n } from "./utils-BwWn6Fw4.mjs";
|
|
3
|
+
import { d as r } from "./drag-in-O5uwMddL.mjs";
|
|
4
|
+
import { t as i } from "./drag-ghost-B24KVqgc.mjs";
|
|
5
5
|
var a = (e, n = 0) => t(e) ? {
|
|
6
6
|
clientX: e.touches[n].clientX,
|
|
7
7
|
clientY: e.touches[n].clientY
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { c as e, i as t, n, o as r, r as i, s as a } from "./utils-
|
|
3
|
-
import { l as o, p as s, r as c } from "./drag-in-
|
|
4
|
-
import { t as l } from "./drag-ghost-
|
|
2
|
+
import { c as e, i as t, n, o as r, r as i, s as a } from "./utils-BoELtcEK.mjs";
|
|
3
|
+
import { l as o, p as s, r as c } from "./drag-in-CWHSbwvG.mjs";
|
|
4
|
+
import { t as l } from "./drag-ghost-C1WS2KmW.mjs";
|
|
5
5
|
var u = class {
|
|
6
6
|
_options = {};
|
|
7
7
|
_instance;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { c as e, i as t, n, o as r, r as i, s as a } from "./utils-
|
|
3
|
-
import { l as o, p as s, r as c } from "./drag-in-
|
|
4
|
-
import { t as l } from "./drag-ghost-
|
|
2
|
+
import { c as e, i as t, n, o as r, r as i, s as a } from "./utils-BwWn6Fw4.mjs";
|
|
3
|
+
import { l as o, p as s, r as c } from "./drag-in-O5uwMddL.mjs";
|
|
4
|
+
import { t as l } from "./drag-ghost-B24KVqgc.mjs";
|
|
5
5
|
//#region packages/embedding-lib/src/plugins/strategy/from-website.ts
|
|
6
6
|
var u = class {
|
|
7
7
|
_options = {};
|
package/hi.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
3
|
-
import { t } from "./utils-
|
|
4
|
-
import { n,
|
|
2
|
+
import { t as e } from "./browser-D6M-d6y5.mjs";
|
|
3
|
+
import { t } from "./utils-BwWn6Fw4.mjs";
|
|
4
|
+
import { i as n, r } from "./chat-model-gyIajfDW.mjs";
|
|
5
5
|
var i = (e, t) => t === e.libraryId ? e : {
|
|
6
6
|
...e,
|
|
7
7
|
libraryId: t
|
|
@@ -136,7 +136,7 @@ var i = (e, t) => t === e.libraryId ? e : {
|
|
|
136
136
|
let i = e.extended, a = (e) => i.planningAssistantOutput(e), o = [], s = null, c = /* @__PURE__ */ new Set(), l;
|
|
137
137
|
try {
|
|
138
138
|
l = await Promise.all([
|
|
139
|
-
import("./dist-
|
|
139
|
+
import("./dist-6TznX-Ae.mjs").then((e) => e.t),
|
|
140
140
|
n(t, async (e) => {
|
|
141
141
|
o.push({
|
|
142
142
|
...await D(e, c),
|
|
@@ -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
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
3
|
-
import { t } from "./utils-
|
|
4
|
-
import { n,
|
|
2
|
+
import { t as e } from "./browser-BjtSrqbu.mjs";
|
|
3
|
+
import { t } from "./utils-BoELtcEK.mjs";
|
|
4
|
+
import { i as n, r } from "./chat-model-DKlWonm6.mjs";
|
|
5
5
|
var i = (e, t) => t === e.libraryId ? e : {
|
|
6
6
|
...e,
|
|
7
7
|
libraryId: t
|
|
@@ -124,7 +124,7 @@ var i = (e, t) => t === e.libraryId ? e : {
|
|
|
124
124
|
let i = e.extended, a = (e) => i.planningAssistantOutput(e), o = [], s = null, c = /* @__PURE__ */ new Set(), l;
|
|
125
125
|
try {
|
|
126
126
|
l = await Promise.all([
|
|
127
|
-
import("./dist-
|
|
127
|
+
import("./dist-D0XFfKEL.mjs").then((e) => e.t),
|
|
128
128
|
n(t, async (e) => {
|
|
129
129
|
o.push({
|
|
130
130
|
...await T(e, c),
|
|
@@ -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": "
|
|
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",
|
|
@@ -43,6 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"./configurator/min": {
|
|
45
45
|
"import": "./configurator.min.js"
|
|
46
|
+
},
|
|
47
|
+
"./construction": {
|
|
48
|
+
"import": "./construction.js",
|
|
49
|
+
"types": "./construction.d.ts"
|
|
50
|
+
},
|
|
51
|
+
"./construction/min": {
|
|
52
|
+
"import": "./construction.min.js"
|
|
46
53
|
}
|
|
47
54
|
},
|
|
48
55
|
"scripts": {
|
|
@@ -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.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AgentToolDefinition, McpToolResult } from '../../../web-sdk/packages';
|
|
2
|
+
export interface FenceAgentApi {
|
|
3
|
+
getConstructionAgentTools(): Promise<AgentToolDefinition[]>;
|
|
4
|
+
callConstructionAgentTool(name: string, input: unknown): Promise<McpToolResult>;
|
|
5
|
+
getConstructionAgentPrompts(): Promise<{
|
|
6
|
+
systemPrompt: string;
|
|
7
|
+
imagePrompt: string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export declare const createConstructionMcpTools: (api: FenceAgentApi) => Promise<import('../../../web-sdk/packages/assistant').AgentMcpTools>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AssistantWindow } from '../planning-assistant/planning-assistant';
|
|
2
|
+
import { PlanningAssistantConfig } from '../planning-assistant/chat-model';
|
|
3
|
+
import { FenceAgentApi } from './construction-mcp-tools';
|
|
4
|
+
export declare const startFencePlanningAssistant: (endpoints: {
|
|
5
|
+
planner: FenceAgentApi;
|
|
6
|
+
window: AssistantWindow;
|
|
7
|
+
}, config: PlanningAssistantConfig, signal: AbortSignal) => Promise<void>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { createConstructionMcpTools, type FenceAgentApi, } from './construction-agent/construction-mcp-tools';
|
|
2
|
+
export { startFencePlanningAssistant } from './construction-agent/construction-planning-assistant';
|
|
3
|
+
export { loadChatModel, type PlanningAssistantConfig, } from './planning-assistant/chat-model';
|
|
@@ -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 @@
|
|
|
1
|
+
export { createChatRecovery } from '../../../web-sdk/packages/assistant';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PlanningAssistantOutput, PlanningAssistantPrompt } from '../../../web-sdk/packages';
|
|
2
|
+
import { createAssistant, PlanningAssistantConfig, AgentMcpTools } from '../../../web-sdk/packages/assistant';
|
|
3
|
+
export interface AssistantWindow {
|
|
4
|
+
planningAssistantOutput(part: PlanningAssistantOutput): unknown;
|
|
5
|
+
callbacks: {
|
|
6
|
+
onPlanningAssistantPrompt?: (prompt: PlanningAssistantPrompt) => void | Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare const startAssistant: (windowApi: AssistantWindow, config: PlanningAssistantConfig, signal: AbortSignal, setupDomain: () => Promise<{
|
|
10
|
+
prompts: {
|
|
11
|
+
systemPrompt: string;
|
|
12
|
+
imagePrompt: string;
|
|
13
|
+
};
|
|
14
|
+
tools: AgentMcpTools;
|
|
15
|
+
}>, turnPolicy?: Parameters<typeof createAssistant>[4]) => Promise<void>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { loadChatModel } from './common-core/src/planning-assistant/chat-model';
|
|
2
2
|
export type { PlanningAssistantConfig, ConfiguratorAgentApi, } from './common-core/src/planning-assistant/types';
|
|
3
|
-
export
|
|
3
|
+
export { createAgentMcpTools, mcpToModelOutput, type AgentMcpModelOutput, type AgentMcpInputSchema, type AgentMcpTool, type AgentMcpTools, } from './common-core/src/planning-assistant/mcp-tools';
|
|
4
|
+
export { createAssistant } from './common-core/src/planning-assistant/runtime';
|
|
5
|
+
export { createChatRecovery } from './common-core/src/planning-assistant/chat-recovery';
|
|
@@ -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>>;
|