@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
|
@@ -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/roomle-embedding-lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
|
|
2
|
-
import { t as e } from "./browser-
|
|
2
|
+
import { t as e } from "./browser-D6M-d6y5.mjs";
|
|
3
3
|
//#region packages/common/src/utils/message-handler.ts
|
|
4
4
|
var t = class {
|
|
5
5
|
_side;
|
|
@@ -204,7 +204,7 @@ var t = class {
|
|
|
204
204
|
setupPlugins(e, t, n = "website") {
|
|
205
205
|
for (let r of e) typeof r == "string" && r === "dragIn" ? this.pluginsLoaded.push(new Promise((e, r) => {
|
|
206
206
|
try {
|
|
207
|
-
import("./drag-in-
|
|
207
|
+
import("./drag-in-O5uwMddL.mjs").then((e) => e.n).then(({ DragIn: i }) => {
|
|
208
208
|
let a = new i(this.ui, t, n, this.viewName);
|
|
209
209
|
a.init().then(() => {
|
|
210
210
|
this.plugins.dragIn = a, e();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
|
|
2
|
-
import { t as e } from "./browser-
|
|
2
|
+
import { t as e } from "./browser-BjtSrqbu.mjs";
|
|
3
3
|
var t = class {
|
|
4
4
|
_side;
|
|
5
5
|
_incomingMessageBus = null;
|
|
@@ -185,7 +185,7 @@ var t = class {
|
|
|
185
185
|
setupPlugins(e, t, n = "website") {
|
|
186
186
|
for (let r of e) typeof r == "string" && r === "dragIn" ? this.pluginsLoaded.push(new Promise((e, r) => {
|
|
187
187
|
try {
|
|
188
|
-
import("./drag-in-
|
|
188
|
+
import("./drag-in-CWHSbwvG.mjs").then((e) => e.n).then(({ DragIn: i }) => {
|
|
189
189
|
let a = new i(this.ui, t, n, this.viewName);
|
|
190
190
|
a.init().then(() => {
|
|
191
191
|
this.plugins.dragIn = a, e();
|
package/sbom.cdx.json
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.6",
|
|
5
5
|
"version": 1,
|
|
6
|
-
"serialNumber": "urn:uuid:
|
|
6
|
+
"serialNumber": "urn:uuid:27206947-3938-5b3b-ab2d-11d7613559a7",
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-
|
|
8
|
+
"timestamp": "2026-11-10T12:13:11.000Z",
|
|
9
9
|
"component": {
|
|
10
10
|
"type": "library",
|
|
11
11
|
"name": "@roomle/embedding-lib",
|
|
12
|
-
"version": "
|
|
13
|
-
"bom-ref": "@roomle/embedding-lib@
|
|
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@
|
|
354
|
+
"ref": "@roomle/embedding-lib@b02859bd7c70b9817b5b7948e626131a4605f87d"
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
"ref": "pkg:npm/%40ai-sdk/anthropic@4.0.68"
|
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
|