@roomle/embedding-lib 0.0.0-dev-ec00289 → 0.0.0-dev-2e65be5
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/ai.d.ts +2 -0
- package/ai.js +60 -0
- package/ai.min.js +58 -0
- package/chat-model-DKlWonm6.mjs +322 -0
- package/chat-model-gyIajfDW.mjs +327 -0
- package/{comlink-Dc3LZUoi.mjs → comlink-BYqErFai.mjs} +87 -77
- package/{comlink-Cmiqa2s0.mjs → comlink-m82YLjsS.mjs} +29 -22
- package/configurator.js +1 -1
- package/configurator.min.js +1 -1
- 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/{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/fence.d.ts +2 -0
- package/fence.js +58 -0
- package/fence.min.js +56 -0
- 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 +81 -63
- package/hi.min.js +70 -52
- package/package.json +15 -1
- package/packages/embedding-lib/src/ai.d.ts +28 -0
- 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/planning-assistant/chat-recovery.d.ts +1 -0
- package/packages/embedding-lib/src/planning-assistant/planning-assistant.d.ts +15 -0
- package/packages/embedding-lib/src/roomle-embedding-lib.d.ts +17 -0
- package/packages/web-sdk/packages/assistant.d.ts +3 -1
- package/packages/web-sdk/packages/common-core/src/planning-assistant/types.d.ts +5 -0
- package/roomle-embedding-lib.js +17 -4
- package/roomle-embedding-lib.min.js +17 -4
- 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
package/mcp-tools-Cnhgobge.mjs
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region packages/web-sdk/packages/common-core/src/planning-assistant/chat-model.ts
|
|
3
|
-
var e = "The images of this result follow in the next message.", t = (t) => t.flatMap((t) => {
|
|
4
|
-
if (t.role !== "tool") return [t];
|
|
5
|
-
let n = [], r = t.content.map((t) => {
|
|
6
|
-
if (t.type !== "tool-result" || t.output.type !== "content") return t;
|
|
7
|
-
let r = t.output.value.filter((e) => e.type === "file");
|
|
8
|
-
return r.length ? (n.push(...r), {
|
|
9
|
-
...t,
|
|
10
|
-
output: {
|
|
11
|
-
...t.output,
|
|
12
|
-
value: [...t.output.value.filter((e) => e.type !== "file"), {
|
|
13
|
-
type: "text",
|
|
14
|
-
text: e
|
|
15
|
-
}]
|
|
16
|
-
}
|
|
17
|
-
}) : t;
|
|
18
|
-
});
|
|
19
|
-
return n.length ? [{
|
|
20
|
-
...t,
|
|
21
|
-
content: r
|
|
22
|
-
}, {
|
|
23
|
-
role: "user",
|
|
24
|
-
content: n
|
|
25
|
-
}] : [t];
|
|
26
|
-
}), n = (e) => ({
|
|
27
|
-
specificationVersion: e.specificationVersion,
|
|
28
|
-
provider: e.provider,
|
|
29
|
-
modelId: e.modelId,
|
|
30
|
-
supportedUrls: e.supportedUrls,
|
|
31
|
-
doGenerate: (n) => e.doGenerate({
|
|
32
|
-
...n,
|
|
33
|
-
prompt: t(n.prompt)
|
|
34
|
-
}),
|
|
35
|
-
doStream: (n) => e.doStream({
|
|
36
|
-
...n,
|
|
37
|
-
prompt: t(n.prompt)
|
|
38
|
-
})
|
|
39
|
-
}), r = async ({ provider: e, model: t, apiKey: r, baseUrl: i, headers: a, chatCompletions: o, responses: s, reasoningEffort: c }, l) => {
|
|
40
|
-
let u = l ? { fetch: new Proxy(fetch, { apply: async (e, t, n) => (typeof n[1]?.body == "string" && await l(n[1].body), fetch(...n)) }) } : {};
|
|
41
|
-
switch (e) {
|
|
42
|
-
case "openai": {
|
|
43
|
-
let { createOpenAI: e } = await import("./dist-GTk8ppiK.mjs");
|
|
44
|
-
return { languageModel: e({
|
|
45
|
-
apiKey: r,
|
|
46
|
-
...u
|
|
47
|
-
})(t) };
|
|
48
|
-
}
|
|
49
|
-
case "azure": {
|
|
50
|
-
let { createAzure: e } = await import("./dist-D0kh4WfT.mjs"), n = e({
|
|
51
|
-
apiKey: r,
|
|
52
|
-
baseURL: i,
|
|
53
|
-
...u
|
|
54
|
-
});
|
|
55
|
-
return {
|
|
56
|
-
languageModel: o ? n.chat(t) : n(t),
|
|
57
|
-
providerOptions: c ? { azure: { reasoningEffort: c } } : void 0
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
case "openai-compatible": {
|
|
61
|
-
if (!i) throw Error("The provider \"openai-compatible\" needs a baseUrl");
|
|
62
|
-
if (s) {
|
|
63
|
-
let { createOpenAI: e } = await import("./dist-GTk8ppiK.mjs"), n = {
|
|
64
|
-
...!r && !a?.Authorization ? { Authorization: void 0 } : {},
|
|
65
|
-
...a
|
|
66
|
-
};
|
|
67
|
-
return {
|
|
68
|
-
languageModel: e({
|
|
69
|
-
baseURL: i,
|
|
70
|
-
apiKey: r ?? "none",
|
|
71
|
-
headers: n,
|
|
72
|
-
...u
|
|
73
|
-
}).responses(t),
|
|
74
|
-
providerOptions: { openai: {
|
|
75
|
-
store: !1,
|
|
76
|
-
forceReasoning: !0
|
|
77
|
-
} }
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
let { createOpenAICompatible: e } = await import("./dist-D5HdKuwj.mjs");
|
|
81
|
-
return { languageModel: n(e({
|
|
82
|
-
name: "openai-compatible",
|
|
83
|
-
baseURL: i,
|
|
84
|
-
apiKey: r,
|
|
85
|
-
headers: a,
|
|
86
|
-
includeUsage: !0,
|
|
87
|
-
...u
|
|
88
|
-
})(t)) };
|
|
89
|
-
}
|
|
90
|
-
case "mistral": {
|
|
91
|
-
let { createMistral: e } = await import("./dist-CqP0aX0A.mjs");
|
|
92
|
-
return { languageModel: n(e({
|
|
93
|
-
apiKey: r,
|
|
94
|
-
...u
|
|
95
|
-
})(t)) };
|
|
96
|
-
}
|
|
97
|
-
case "anthropic": {
|
|
98
|
-
let { createAnthropic: e } = await import("./dist-C5fKJXpB.mjs");
|
|
99
|
-
return { languageModel: e({
|
|
100
|
-
apiKey: r,
|
|
101
|
-
headers: { "anthropic-dangerous-direct-browser-access": "true" },
|
|
102
|
-
...u
|
|
103
|
-
})(t) };
|
|
104
|
-
}
|
|
105
|
-
case "google": {
|
|
106
|
-
let { createGoogleGenerativeAI: e } = await import("./dist-Bo3WzRdf.mjs");
|
|
107
|
-
return { languageModel: e({
|
|
108
|
-
apiKey: r,
|
|
109
|
-
...u
|
|
110
|
-
})(t) };
|
|
111
|
-
}
|
|
112
|
-
default: throw Error(`Unknown provider "${e}" - supported: azure, openai, openai-compatible, mistral, anthropic, google`);
|
|
113
|
-
}
|
|
114
|
-
}, i = ({ output: e }) => ({
|
|
115
|
-
type: "content",
|
|
116
|
-
value: e.content.map((e) => e.type === "text" ? {
|
|
117
|
-
type: "text",
|
|
118
|
-
text: e.text
|
|
119
|
-
} : {
|
|
120
|
-
type: "file",
|
|
121
|
-
mediaType: e.mimeType,
|
|
122
|
-
data: {
|
|
123
|
-
type: "data",
|
|
124
|
-
data: e.data
|
|
125
|
-
}
|
|
126
|
-
})
|
|
127
|
-
}), a = (e, t, n) => Object.fromEntries(e.map(({ name: e, description: r, inputSchema: a, annotations: o }) => {
|
|
128
|
-
let s = () => a;
|
|
129
|
-
return [e, {
|
|
130
|
-
type: "dynamic",
|
|
131
|
-
...o && { annotations: o },
|
|
132
|
-
description: r,
|
|
133
|
-
inputSchema: { "~standard": {
|
|
134
|
-
version: 1,
|
|
135
|
-
vendor: n,
|
|
136
|
-
validate: (e) => ({ value: e }),
|
|
137
|
-
jsonSchema: {
|
|
138
|
-
input: s,
|
|
139
|
-
output: s
|
|
140
|
-
}
|
|
141
|
-
} },
|
|
142
|
-
execute: (n) => t(e, n).catch((e) => ({
|
|
143
|
-
content: [{
|
|
144
|
-
type: "text",
|
|
145
|
-
text: e instanceof Error ? e.message : String(e)
|
|
146
|
-
}],
|
|
147
|
-
isError: !0
|
|
148
|
-
})),
|
|
149
|
-
toModelOutput: i
|
|
150
|
-
}];
|
|
151
|
-
}));
|
|
152
|
-
//#endregion
|
|
153
|
-
export { r as n, a as t };
|
package/mcp-tools-D3Ei3Apu.mjs
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
var e = (e) => e.flatMap((e) => {
|
|
3
|
-
if (e.role !== "tool") return [e];
|
|
4
|
-
let t = [], n = e.content.map((e) => {
|
|
5
|
-
if (e.type !== "tool-result" || e.output.type !== "content") return e;
|
|
6
|
-
let n = e.output.value.filter((e) => e.type === "file");
|
|
7
|
-
return n.length ? (t.push(...n), {
|
|
8
|
-
...e,
|
|
9
|
-
output: {
|
|
10
|
-
...e.output,
|
|
11
|
-
value: [...e.output.value.filter((e) => e.type !== "file"), {
|
|
12
|
-
type: "text",
|
|
13
|
-
text: "The images of this result follow in the next message."
|
|
14
|
-
}]
|
|
15
|
-
}
|
|
16
|
-
}) : e;
|
|
17
|
-
});
|
|
18
|
-
return t.length ? [{
|
|
19
|
-
...e,
|
|
20
|
-
content: n
|
|
21
|
-
}, {
|
|
22
|
-
role: "user",
|
|
23
|
-
content: t
|
|
24
|
-
}] : [e];
|
|
25
|
-
}), t = (t) => ({
|
|
26
|
-
specificationVersion: t.specificationVersion,
|
|
27
|
-
provider: t.provider,
|
|
28
|
-
modelId: t.modelId,
|
|
29
|
-
supportedUrls: t.supportedUrls,
|
|
30
|
-
doGenerate: (n) => t.doGenerate({
|
|
31
|
-
...n,
|
|
32
|
-
prompt: e(n.prompt)
|
|
33
|
-
}),
|
|
34
|
-
doStream: (n) => t.doStream({
|
|
35
|
-
...n,
|
|
36
|
-
prompt: e(n.prompt)
|
|
37
|
-
})
|
|
38
|
-
}), n = async ({ provider: e, model: n, apiKey: r, baseUrl: i, headers: a, chatCompletions: o, responses: s, reasoningEffort: c }, l) => {
|
|
39
|
-
let u = l ? { fetch: new Proxy(fetch, { apply: async (e, t, n) => (typeof n[1]?.body == "string" && await l(n[1].body), fetch(...n)) }) } : {};
|
|
40
|
-
switch (e) {
|
|
41
|
-
case "openai": {
|
|
42
|
-
let { createOpenAI: e } = await import("./dist-5jYYtT4q.mjs");
|
|
43
|
-
return { languageModel: e({
|
|
44
|
-
apiKey: r,
|
|
45
|
-
...u
|
|
46
|
-
})(n) };
|
|
47
|
-
}
|
|
48
|
-
case "azure": {
|
|
49
|
-
let { createAzure: e } = await import("./dist-COgAdYY1.mjs"), t = e({
|
|
50
|
-
apiKey: r,
|
|
51
|
-
baseURL: i,
|
|
52
|
-
...u
|
|
53
|
-
});
|
|
54
|
-
return {
|
|
55
|
-
languageModel: o ? t.chat(n) : t(n),
|
|
56
|
-
providerOptions: c ? { azure: { reasoningEffort: c } } : void 0
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
case "openai-compatible": {
|
|
60
|
-
if (!i) throw Error("The provider \"openai-compatible\" needs a baseUrl");
|
|
61
|
-
if (s) {
|
|
62
|
-
let { createOpenAI: e } = await import("./dist-5jYYtT4q.mjs");
|
|
63
|
-
return {
|
|
64
|
-
languageModel: e({
|
|
65
|
-
baseURL: i,
|
|
66
|
-
apiKey: r ?? "none",
|
|
67
|
-
headers: {
|
|
68
|
-
...r || a?.Authorization ? {} : { Authorization: void 0 },
|
|
69
|
-
...a
|
|
70
|
-
},
|
|
71
|
-
...u
|
|
72
|
-
}).responses(n),
|
|
73
|
-
providerOptions: { openai: {
|
|
74
|
-
store: !1,
|
|
75
|
-
forceReasoning: !0
|
|
76
|
-
} }
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
let { createOpenAICompatible: e } = await import("./dist-CqpDM10w.mjs");
|
|
80
|
-
return { languageModel: t(e({
|
|
81
|
-
name: "openai-compatible",
|
|
82
|
-
baseURL: i,
|
|
83
|
-
apiKey: r,
|
|
84
|
-
headers: a,
|
|
85
|
-
includeUsage: !0,
|
|
86
|
-
...u
|
|
87
|
-
})(n)) };
|
|
88
|
-
}
|
|
89
|
-
case "mistral": {
|
|
90
|
-
let { createMistral: e } = await import("./dist-CXemOs84.mjs");
|
|
91
|
-
return { languageModel: t(e({
|
|
92
|
-
apiKey: r,
|
|
93
|
-
...u
|
|
94
|
-
})(n)) };
|
|
95
|
-
}
|
|
96
|
-
case "anthropic": {
|
|
97
|
-
let { createAnthropic: e } = await import("./dist-B9yy8ym8.mjs");
|
|
98
|
-
return { languageModel: e({
|
|
99
|
-
apiKey: r,
|
|
100
|
-
headers: { "anthropic-dangerous-direct-browser-access": "true" },
|
|
101
|
-
...u
|
|
102
|
-
})(n) };
|
|
103
|
-
}
|
|
104
|
-
case "google": {
|
|
105
|
-
let { createGoogleGenerativeAI: e } = await import("./dist-Bb2L1Zel.mjs");
|
|
106
|
-
return { languageModel: e({
|
|
107
|
-
apiKey: r,
|
|
108
|
-
...u
|
|
109
|
-
})(n) };
|
|
110
|
-
}
|
|
111
|
-
default: throw Error(`Unknown provider "${e}" - supported: azure, openai, openai-compatible, mistral, anthropic, google`);
|
|
112
|
-
}
|
|
113
|
-
}, r = ({ output: e }) => ({
|
|
114
|
-
type: "content",
|
|
115
|
-
value: e.content.map((e) => e.type === "text" ? {
|
|
116
|
-
type: "text",
|
|
117
|
-
text: e.text
|
|
118
|
-
} : {
|
|
119
|
-
type: "file",
|
|
120
|
-
mediaType: e.mimeType,
|
|
121
|
-
data: {
|
|
122
|
-
type: "data",
|
|
123
|
-
data: e.data
|
|
124
|
-
}
|
|
125
|
-
})
|
|
126
|
-
}), i = (e, t, n) => Object.fromEntries(e.map(({ name: e, description: i, inputSchema: a, annotations: o }) => {
|
|
127
|
-
let s = () => a;
|
|
128
|
-
return [e, {
|
|
129
|
-
type: "dynamic",
|
|
130
|
-
...o && { annotations: o },
|
|
131
|
-
description: i,
|
|
132
|
-
inputSchema: { "~standard": {
|
|
133
|
-
version: 1,
|
|
134
|
-
vendor: n,
|
|
135
|
-
validate: (e) => ({ value: e }),
|
|
136
|
-
jsonSchema: {
|
|
137
|
-
input: s,
|
|
138
|
-
output: s
|
|
139
|
-
}
|
|
140
|
-
} },
|
|
141
|
-
execute: (n) => t(e, n).catch((e) => ({
|
|
142
|
-
content: [{
|
|
143
|
-
type: "text",
|
|
144
|
-
text: e instanceof Error ? e.message : String(e)
|
|
145
|
-
}],
|
|
146
|
-
isError: !0
|
|
147
|
-
})),
|
|
148
|
-
toModelOutput: r
|
|
149
|
-
}];
|
|
150
|
-
}));
|
|
151
|
-
export { n, i as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|