@roomle/embedding-lib 0.0.0-dev-9d077e2 → 0.0.0-dev-c1bdbb4

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.
Files changed (31) hide show
  1. package/{drag-ghost-BOwjMbG3.mjs → drag-ghost-BxqPJdhq.mjs} +1 -1
  2. package/{drag-ghost-BQ8r6NVo.mjs → drag-ghost-CDFtC1pd.mjs} +1 -1
  3. package/{drag-in-BP_E53zb.mjs → drag-in-CV1E-DO6.mjs} +2 -2
  4. package/{drag-in-QhL3zGC0.mjs → drag-in-ClPpCYyi.mjs} +2 -2
  5. package/embedding-plugins.js +1 -1
  6. package/embedding-plugins.min.js +1 -1
  7. package/{from-custom-view-BM_zRJCf.mjs → from-custom-view-Q9A-J7qV.mjs} +2 -2
  8. package/{from-custom-view-D2Z1YmCx.mjs → from-custom-view-Sx6P6iDI.mjs} +2 -2
  9. package/{from-website-DlklVbxU.mjs → from-website-BmCO2xli.mjs} +2 -2
  10. package/{from-website-CPVeVVMI.mjs → from-website-DZJy_l42.mjs} +2 -2
  11. package/hi.js +194 -39
  12. package/hi.min.js +175 -38
  13. package/package.json +1 -8
  14. package/packages/embedding-lib/src/homag-intelligence/hi-mcp-tools.d.ts +61 -4
  15. package/packages/embedding-lib/src/homag-intelligence/hi-planning-assistant.d.ts +40 -4
  16. package/roomle-embedding-lib.js +1 -1
  17. package/roomle-embedding-lib.min.js +1 -1
  18. package/configurator.d.ts +0 -2
  19. package/configurator.js +0 -119
  20. package/configurator.min.js +0 -117
  21. package/packages/embedding-lib/src/configurator-agent/chat-recovery.d.ts +0 -9
  22. package/packages/embedding-lib/src/configurator-agent/configurator-mcp-tools.d.ts +0 -11
  23. package/packages/embedding-lib/src/configurator-agent/configurator-planning-assistant.d.ts +0 -8
  24. package/packages/embedding-lib/src/configurator.d.ts +0 -3
  25. package/packages/embedding-lib/src/planning-assistant/chat-model.d.ts +0 -33
  26. package/packages/embedding-lib/src/planning-assistant/mcp-tools.d.ts +0 -52
  27. package/packages/embedding-lib/src/planning-assistant/planning-assistant.d.ts +0 -23
  28. package/planning-assistant-BW9fNGZO.mjs +0 -158
  29. package/planning-assistant-CyVA2uUX.mjs +0 -143
  30. /package/{comlink-BJnhpJa4.mjs → comlink-B2Kj_5Ge.mjs} +0 -0
  31. /package/{comlink-lSsogKgb.mjs → comlink-B5lV2OWp.mjs} +0 -0
@@ -1,158 +0,0 @@
1
- //#region packages/embedding-lib/src/planning-assistant/mcp-tools.ts
2
- var e = ({ output: e }) => ({
3
- type: "content",
4
- value: e.content.map((e) => e.type === "text" ? {
5
- type: "text",
6
- text: e.text
7
- } : {
8
- type: "file",
9
- mediaType: e.mimeType,
10
- data: {
11
- type: "data",
12
- data: e.data
13
- }
14
- })
15
- }), t = (t, n, r) => Object.fromEntries(t.map(({ name: t, description: i, inputSchema: a, annotations: o }) => {
16
- let s = () => a;
17
- return [t, {
18
- type: "dynamic",
19
- ...o && { annotations: o },
20
- description: i,
21
- inputSchema: { "~standard": {
22
- version: 1,
23
- vendor: r,
24
- validate: (e) => ({ value: e }),
25
- jsonSchema: {
26
- input: s,
27
- output: s
28
- }
29
- } },
30
- execute: (e) => n(t, e).catch((e) => ({
31
- content: [{
32
- type: "text",
33
- text: e instanceof Error ? e.message : String(e)
34
- }],
35
- isError: !0
36
- })),
37
- toModelOutput: e
38
- }];
39
- })), n = (e) => `https://esm.sh/${e}?deps=zod@4.6.5`, r = async ({ provider: e, model: t, apiKey: r, baseUrl: i, chatCompletions: a, reasoningEffort: o }) => {
40
- switch (e) {
41
- case "azure": {
42
- let { createAzure: e } = await import(
43
- /* @vite-ignore */
44
- n("@ai-sdk/azure@4.0.85")
45
- ), s = e({
46
- apiKey: r,
47
- baseURL: i
48
- });
49
- return {
50
- languageModel: a ? s.chat(t) : s(t),
51
- providerOptions: o ? { azure: { reasoningEffort: o } } : void 0
52
- };
53
- }
54
- case "mistral": {
55
- let { createMistral: e } = await import(
56
- /* @vite-ignore */
57
- n("@ai-sdk/mistral@4.0.54")
58
- );
59
- return { languageModel: e({ apiKey: r })(t) };
60
- }
61
- case "anthropic": {
62
- let { createAnthropic: e } = await import(
63
- /* @vite-ignore */
64
- n("@ai-sdk/anthropic@4.0.68")
65
- );
66
- return { languageModel: e({
67
- apiKey: r,
68
- headers: { "anthropic-dangerous-direct-browser-access": "true" }
69
- })(t) };
70
- }
71
- case "google": {
72
- let { createGoogleGenerativeAI: e } = await import(
73
- /* @vite-ignore */
74
- n("@ai-sdk/google@4.0.85")
75
- );
76
- return { languageModel: e({ apiKey: r })(t) };
77
- }
78
- default: throw Error(`Unknown provider "${e}" - supported: azure, mistral, anthropic, google`);
79
- }
80
- }, i = async (e, t, i, a, o) => {
81
- let s = (t) => e.planningAssistantOutput(t), c;
82
- try {
83
- c = await Promise.all([
84
- import(
85
- /* @vite-ignore */
86
- n("ai@7.0.122")
87
- ),
88
- r(t),
89
- a()
90
- ]);
91
- } catch (e) {
92
- s({
93
- type: "availability",
94
- available: !1,
95
- text: String(e)
96
- });
97
- return;
98
- }
99
- let [{ streamText: l, stepCountIs: u }, d, { prompts: f, tools: p }] = c, m = [];
100
- e.callbacks.onPlanningAssistantPrompt = async ({ text: e, images: t }) => {
101
- let n = {
102
- role: "user",
103
- content: [{
104
- type: "text",
105
- text: e || f.imagePrompt
106
- }, ...t.map((e) => ({
107
- type: "file",
108
- data: e,
109
- mediaType: "image/jpeg"
110
- }))]
111
- }, r = o?.recovery(p), a = new AbortController(), c = () => a.abort(i.reason);
112
- i.addEventListener("abort", c, { once: !0 }), i.aborted && c();
113
- let h = o ? setTimeout(() => a.abort(/* @__PURE__ */ Error("The configurator assistant turn exceeded five minutes.")), o.timeoutMs) : void 0;
114
- try {
115
- let e = l({
116
- model: d.languageModel,
117
- providerOptions: d.providerOptions,
118
- instructions: f.systemPrompt,
119
- messages: [...m, n],
120
- tools: r?.tools ?? p,
121
- stopWhen: u(16),
122
- abortSignal: o ? a.signal : i,
123
- prepareStep: ({ stepNumber: e }) => e === 15 ? { toolChoice: "none" } : void 0
124
- });
125
- for await (let t of e.stream) if (t.type === "text-delta") s({
126
- type: "text",
127
- text: t.text
128
- });
129
- else if (t.type === "tool-call") s({
130
- type: "activity",
131
- text: t.toolName
132
- });
133
- else if (t.type === "error") throw t.error;
134
- else if (t.type === "abort" && o) throw a.signal.reason ?? /* @__PURE__ */ Error("Turn aborted");
135
- if (o && a.signal.aborted) throw a.signal.reason;
136
- m.push(n, ...await e.responseMessages), s({ type: "done" });
137
- } catch (e) {
138
- let t = r?.summary();
139
- t && m.push(n, {
140
- role: "assistant",
141
- content: t
142
- }), s({
143
- type: "error",
144
- text: `The planning assistant failed: ${e instanceof Error ? e.message : String(e)}${t ? `\n\n${t}` : ""}`
145
- });
146
- } finally {
147
- clearTimeout(h), i.removeEventListener("abort", c);
148
- }
149
- }, s({
150
- type: "images",
151
- enabled: t.readsImages
152
- }), s({
153
- type: "availability",
154
- available: !0
155
- });
156
- };
157
- //#endregion
158
- export { r as n, t as r, i as t };
@@ -1,143 +0,0 @@
1
- var e = ({ output: e }) => ({
2
- type: "content",
3
- value: e.content.map((e) => e.type === "text" ? {
4
- type: "text",
5
- text: e.text
6
- } : {
7
- type: "file",
8
- mediaType: e.mimeType,
9
- data: {
10
- type: "data",
11
- data: e.data
12
- }
13
- })
14
- }), t = (t, n, r) => Object.fromEntries(t.map(({ name: t, description: i, inputSchema: a, annotations: o }) => {
15
- let s = () => a;
16
- return [t, {
17
- type: "dynamic",
18
- ...o && { annotations: o },
19
- description: i,
20
- inputSchema: { "~standard": {
21
- version: 1,
22
- vendor: r,
23
- validate: (e) => ({ value: e }),
24
- jsonSchema: {
25
- input: s,
26
- output: s
27
- }
28
- } },
29
- execute: (e) => n(t, e).catch((e) => ({
30
- content: [{
31
- type: "text",
32
- text: e instanceof Error ? e.message : String(e)
33
- }],
34
- isError: !0
35
- })),
36
- toModelOutput: e
37
- }];
38
- })), n = (e) => `https://esm.sh/${e}?deps=zod@4.6.5`, r = async ({ provider: e, model: t, apiKey: r, baseUrl: i, chatCompletions: a, reasoningEffort: o }) => {
39
- switch (e) {
40
- case "azure": {
41
- let { createAzure: e } = await import(n("@ai-sdk/azure@4.0.85")), s = e({
42
- apiKey: r,
43
- baseURL: i
44
- });
45
- return {
46
- languageModel: a ? s.chat(t) : s(t),
47
- providerOptions: o ? { azure: { reasoningEffort: o } } : void 0
48
- };
49
- }
50
- case "mistral": {
51
- let { createMistral: e } = await import(n("@ai-sdk/mistral@4.0.54"));
52
- return { languageModel: e({ apiKey: r })(t) };
53
- }
54
- case "anthropic": {
55
- let { createAnthropic: e } = await import(n("@ai-sdk/anthropic@4.0.68"));
56
- return { languageModel: e({
57
- apiKey: r,
58
- headers: { "anthropic-dangerous-direct-browser-access": "true" }
59
- })(t) };
60
- }
61
- case "google": {
62
- let { createGoogleGenerativeAI: e } = await import(n("@ai-sdk/google@4.0.85"));
63
- return { languageModel: e({ apiKey: r })(t) };
64
- }
65
- default: throw Error(`Unknown provider "${e}" - supported: azure, mistral, anthropic, google`);
66
- }
67
- }, i = async (e, t, i, a, o) => {
68
- let s = (t) => e.planningAssistantOutput(t), c;
69
- try {
70
- c = await Promise.all([
71
- import(n("ai@7.0.122")),
72
- r(t),
73
- a()
74
- ]);
75
- } catch (e) {
76
- s({
77
- type: "availability",
78
- available: !1,
79
- text: String(e)
80
- });
81
- return;
82
- }
83
- let [{ streamText: l, stepCountIs: u }, d, { prompts: f, tools: p }] = c, m = [];
84
- e.callbacks.onPlanningAssistantPrompt = async ({ text: e, images: t }) => {
85
- let n = {
86
- role: "user",
87
- content: [{
88
- type: "text",
89
- text: e || f.imagePrompt
90
- }, ...t.map((e) => ({
91
- type: "file",
92
- data: e,
93
- mediaType: "image/jpeg"
94
- }))]
95
- }, r = o?.recovery(p), a = new AbortController(), c = () => a.abort(i.reason);
96
- i.addEventListener("abort", c, { once: !0 }), i.aborted && c();
97
- let h = o ? setTimeout(() => a.abort(/* @__PURE__ */ Error("The configurator assistant turn exceeded five minutes.")), o.timeoutMs) : void 0;
98
- try {
99
- let e = l({
100
- model: d.languageModel,
101
- providerOptions: d.providerOptions,
102
- instructions: f.systemPrompt,
103
- messages: [...m, n],
104
- tools: r?.tools ?? p,
105
- stopWhen: u(16),
106
- abortSignal: o ? a.signal : i,
107
- prepareStep: ({ stepNumber: e }) => e === 15 ? { toolChoice: "none" } : void 0
108
- });
109
- for await (let t of e.stream) if (t.type === "text-delta") s({
110
- type: "text",
111
- text: t.text
112
- });
113
- else if (t.type === "tool-call") s({
114
- type: "activity",
115
- text: t.toolName
116
- });
117
- else {
118
- if (t.type === "error") throw t.error;
119
- if (t.type === "abort" && o) throw a.signal.reason ?? /* @__PURE__ */ Error("Turn aborted");
120
- }
121
- if (o && a.signal.aborted) throw a.signal.reason;
122
- m.push(n, ...await e.responseMessages), s({ type: "done" });
123
- } catch (e) {
124
- let t = r?.summary();
125
- t && m.push(n, {
126
- role: "assistant",
127
- content: t
128
- }), s({
129
- type: "error",
130
- text: `The planning assistant failed: ${e instanceof Error ? e.message : String(e)}${t ? `\n\n${t}` : ""}`
131
- });
132
- } finally {
133
- clearTimeout(h), i.removeEventListener("abort", c);
134
- }
135
- }, s({
136
- type: "images",
137
- enabled: t.readsImages
138
- }), s({
139
- type: "availability",
140
- available: !0
141
- });
142
- };
143
- export { r as n, t as r, i as t };
File without changes
File without changes