@roomle/embedding-lib 11.0.0-alpha.1 → 11.0.0-alpha.10

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 (76) hide show
  1. package/THIRD-PARTY-NOTICES.txt +2 -2
  2. package/ai.js +86 -17
  3. package/ai.min.js +83 -13
  4. package/{browser-D6M-d6y5.mjs → browser-Cys-y5Hy.mjs} +1 -2
  5. package/chat-model-B7BO8IhK.mjs +212 -0
  6. package/chat-model-XYf503pT.mjs +213 -0
  7. package/coerce-CuLRCRlo.mjs +6 -0
  8. package/coerce-Dup0o-HR.mjs +7 -0
  9. package/{comlink-m82YLjsS.mjs → comlink-7u13Z2ZH.mjs} +2 -3
  10. package/{comlink-BYqErFai.mjs → comlink-DKhvPU0o.mjs} +1 -1
  11. package/configurator.js +7 -7
  12. package/configurator.min.js +6 -5
  13. package/construction.js +279 -22
  14. package/construction.min.js +287 -27
  15. package/continuation-CswXtOus.mjs +10 -0
  16. package/continuation-NclHDSgS.mjs +9 -0
  17. package/{dist-DCzWWudD.mjs → dist-7-X7Xqsl.mjs} +851 -919
  18. package/{dist-CjIZv2gB.mjs → dist-BMxyw-Zs.mjs} +411 -405
  19. package/{dist-wPZpiGiu.mjs → dist-BU022PnG.mjs} +4 -9
  20. package/{dist-CGgFMwb1.mjs → dist-BY8OLJ2p.mjs} +1 -1
  21. package/{dist-6TznX-Ae.mjs → dist-BZSd56sr.mjs} +3850 -3942
  22. package/{dist-Ur4DqwwC.mjs → dist-Ba3J8AjB.mjs} +400 -390
  23. package/{dist-CnTUCpLZ.mjs → dist-CbQKC1xX.mjs} +1590 -1616
  24. package/{dist-BsVeWZ8R.mjs → dist-CiybWJvs.mjs} +44 -41
  25. package/{dist-BI_3AeI-.mjs → dist-CkZuNdCU.mjs} +6 -4
  26. package/{dist-Bt1FopV4.mjs → dist-D2ZAAHGn.mjs} +1058 -1042
  27. package/{dist-Cxe4osFc.mjs → dist-DjsS42rR.mjs} +916 -962
  28. package/{dist-Cmx_tCV5.mjs → dist-Jcq_kKKT.mjs} +403 -393
  29. package/{dist-D0XFfKEL.mjs → dist-S9sLSjZ4.mjs} +3112 -3104
  30. package/{dist-BV-32IEX.mjs → dist-XECXrV5Q.mjs} +1497 -1558
  31. package/{dist-CZbrRF4T.mjs → dist-a5_BIeaS.mjs} +45 -51
  32. package/{dist-Dr3LcjP6.mjs → dist-bQAJDeYc.mjs} +698 -748
  33. package/docs/md/web/embedding/CHANGELOG.md +20 -175
  34. package/{drag-ghost-C1WS2KmW.mjs → drag-ghost-QZelgA-_.mjs} +2 -3
  35. package/{drag-ghost-B24KVqgc.mjs → drag-ghost-VmgSWLva.mjs} +5 -7
  36. package/{drag-in-O5uwMddL.mjs → drag-in-Cd_67tzS.mjs} +4 -5
  37. package/{drag-in-CWHSbwvG.mjs → drag-in-DlDsgY4T.mjs} +3 -3
  38. package/embedding-plugins.js +1 -2
  39. package/embedding-plugins.min.js +1 -2
  40. package/{experimental-evaluation-DyONuPyk.mjs → experimental-evaluation-B4hKMgFH.mjs} +19 -38
  41. package/{experimental-evaluation-DPkDk-5A.mjs → experimental-evaluation-DmqghFSx.mjs} +1 -1
  42. package/{from-custom-view-BgmiWIEN.mjs → from-custom-view-6HMD_sPe.mjs} +5 -4
  43. package/{from-custom-view-CxmIIsHU.mjs → from-custom-view-BRFynafo.mjs} +16 -16
  44. package/{from-website-CvcnHmr2.mjs → from-website-Dl1VN4h7.mjs} +5 -6
  45. package/{from-website-B8qFEG_R.mjs → from-website-iZzauH4C.mjs} +3 -3
  46. package/hi.js +251 -214
  47. package/hi.min.js +330 -288
  48. package/mcp-tools-BLB7pCga.mjs +42 -0
  49. package/mcp-tools-BirFT2R0.mjs +41 -0
  50. package/package.json +1 -1
  51. package/packages/common/src/utils/ai-model-relay.d.ts +22 -2
  52. package/packages/embedding-lib/src/ai.d.ts +3 -1
  53. package/packages/embedding-lib/src/hi.d.ts +1 -1
  54. package/packages/embedding-lib/src/homag-intelligence/hi-planning-assistant.d.ts +14 -2
  55. package/packages/embedding-lib/src/planning-assistant/chat-model.d.ts +1 -1
  56. package/packages/web-sdk/packages/assistant.d.ts +2 -0
  57. package/packages/web-sdk/packages/common-core/src/planning-assistant/chat-model.d.ts +1 -1
  58. package/packages/web-sdk/packages/common-core/src/planning-assistant/continuation.d.ts +5 -0
  59. package/packages/web-sdk/packages/common-core/src/planning-assistant/mcp-tools.d.ts +3 -1
  60. package/packages/web-sdk/packages/common-core/src/planning-assistant/runtime.d.ts +6 -1
  61. package/packages/web-sdk/packages/common-core/src/planning-assistant/types.d.ts +3 -1
  62. package/packages/web-sdk/packages/common-core/src/planning-assistant.d.ts +3 -0
  63. package/rolldown-runtime--db92txo.mjs +10 -0
  64. package/rolldown-runtime-CyjYJMBa.mjs +11 -0
  65. package/roomle-embedding-lib.js +25 -34
  66. package/roomle-embedding-lib.min.js +3 -3
  67. package/sbom.cdx.json +5 -5
  68. package/turn-limits-9LbUeSG2.mjs +9 -0
  69. package/turn-limits-Ciq383Bd.mjs +10 -0
  70. package/{utils-BwWn6Fw4.mjs → utils-CJnKZceY.mjs} +3 -4
  71. package/{utils-BoELtcEK.mjs → utils-DdNhTbJr.mjs} +6 -6
  72. package/chat-model-CFuHw4cp.mjs +0 -322
  73. package/chat-model-JqqVnnmY.mjs +0 -327
  74. package/coerce-CqJod_GZ.mjs +0 -8
  75. package/coerce-CsI42_k0.mjs +0 -6
  76. /package/{browser-BjtSrqbu.mjs → browser-CzLpXYFF.mjs} +0 -0
@@ -0,0 +1,42 @@
1
+
2
+ import "./chat-model-XYf503pT.mjs";
3
+ // packages/web-sdk/packages/common-core/src/planning-assistant/mcp-tools.ts
4
+ var e = ({ output: e }) => ({
5
+ type: "content",
6
+ value: e.content.map((e) => e.type === "text" ? {
7
+ type: "text",
8
+ text: e.text
9
+ } : {
10
+ type: "file",
11
+ mediaType: e.mimeType,
12
+ data: {
13
+ type: "data",
14
+ data: e.data
15
+ }
16
+ })
17
+ }), t = (t, n, r) => Object.fromEntries(t.map(({ name: t, description: i, inputSchema: a, annotations: o }) => {
18
+ let s = () => a;
19
+ return [t, {
20
+ type: "dynamic",
21
+ ...o && { annotations: o },
22
+ description: i,
23
+ inputSchema: { "~standard": {
24
+ version: 1,
25
+ vendor: r,
26
+ validate: (e) => ({ value: e }),
27
+ jsonSchema: {
28
+ input: s,
29
+ output: s
30
+ }
31
+ } },
32
+ execute: async (e, r) => (r?.abortSignal?.throwIfAborted(), n(t, e).catch((e) => ({
33
+ content: [{
34
+ type: "text",
35
+ text: e instanceof Error ? e.message : String(e)
36
+ }],
37
+ isError: !0
38
+ }))),
39
+ toModelOutput: e
40
+ }];
41
+ }));
42
+ export { t };
@@ -0,0 +1,41 @@
1
+
2
+ import "./chat-model-B7BO8IhK.mjs";
3
+ var e = ({ output: e }) => ({
4
+ type: "content",
5
+ value: e.content.map((e) => e.type === "text" ? {
6
+ type: "text",
7
+ text: e.text
8
+ } : {
9
+ type: "file",
10
+ mediaType: e.mimeType,
11
+ data: {
12
+ type: "data",
13
+ data: e.data
14
+ }
15
+ })
16
+ }), t = (t, n, r) => Object.fromEntries(t.map(({ name: t, description: i, inputSchema: a, annotations: o }) => {
17
+ let s = () => a;
18
+ return [t, {
19
+ type: "dynamic",
20
+ ...o && { annotations: o },
21
+ description: i,
22
+ inputSchema: { "~standard": {
23
+ version: 1,
24
+ vendor: r,
25
+ validate: (e) => ({ value: e }),
26
+ jsonSchema: {
27
+ input: s,
28
+ output: s
29
+ }
30
+ } },
31
+ execute: async (e, r) => (r?.abortSignal?.throwIfAborted(), n(t, e).catch((e) => ({
32
+ content: [{
33
+ type: "text",
34
+ text: e instanceof Error ? e.message : String(e)
35
+ }],
36
+ isError: !0
37
+ }))),
38
+ toModelOutput: e
39
+ }];
40
+ }));
41
+ export { t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "11.0.0-alpha.1",
3
+ "version": "11.0.0-alpha.10",
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",
@@ -1,8 +1,23 @@
1
+ import { LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4GenerateResult, LanguageModelV4StreamPart } from '@ai-sdk/provider';
2
+ export interface AssistantModelDescriptor {
3
+ model: string;
4
+ readsImages: boolean;
5
+ responsesProvider?: 'openai' | 'azure';
6
+ }
7
+ export type AssistantModelOptions = Omit<LanguageModelV4CallOptions, 'abortSignal' | 'headers'>;
8
+ export interface AssistantModelReader {
9
+ read(): Promise<ReadableStreamReadResult<LanguageModelV4StreamPart>>;
10
+ cancel(): Promise<void>;
11
+ }
12
+ export interface AssistantModelHandlers {
13
+ generate(options: AssistantModelOptions, signal: AbortSignal): Promise<LanguageModelV4GenerateResult>;
14
+ stream(options: AssistantModelOptions, signal: AbortSignal): Promise<ReadableStream<LanguageModelV4StreamPart>>;
15
+ }
1
16
  /**
2
17
  * The iframe hands its AI model requests to the host page ("bring your own
3
18
  * endpoint"), over Comlink on a port it sends, like connect_hi
4
19
  */
5
- export type AiFeature = 'lifestyle-rendering';
20
+ export type AiFeature = 'lifestyle-rendering' | 'configuration-assistant';
6
21
  /**
7
22
  * The feature names what the request is for, so no route, method or headers
8
23
  * of a built-in endpoint reach the host. A feature with several operations
@@ -34,7 +49,8 @@ export interface RenderingInput {
34
49
  }
35
50
  export type AiModelAuthReason = 'start' | 'expired';
36
51
  export interface AiModelHandlers {
37
- onAiModelRequest(request: AiModelRequest, signal: AbortSignal): Promise<Response>;
52
+ assistantModel?: AssistantModelHandlers;
53
+ onAiModelRequest?(request: AiModelRequest, signal: AbortSignal): Promise<Response>;
38
54
  /**
39
55
  * The host's login: 'start' when the chat shows signed out, 'expired'
40
56
  * after a 401; true unlocks the AI features. Without it there is no login
@@ -53,6 +69,8 @@ interface AiModelAnswer {
53
69
  body: ArrayBuffer;
54
70
  }
55
71
  export interface AiModelHost {
72
+ generate?(options: AssistantModelOptions, signal: AbortSignal): Promise<LanguageModelV4GenerateResult>;
73
+ stream?(options: AssistantModelOptions, signal: AbortSignal): Promise<AssistantModelReader>;
56
74
  request(request: AiModelRequest, signal: AbortSignal): Promise<AiModelAnswer>;
57
75
  auth(reason: AiModelAuthReason, feature: AiFeature): Promise<boolean>;
58
76
  }
@@ -69,4 +87,6 @@ export declare const relayAiModelRequest: (host: AiModelHost, request: AiModelRe
69
87
  */
70
88
  export declare const relayAiModelAuth: (host: AiModelHost, reason: AiModelAuthReason, feature: AiFeature, signal?: AbortSignal) => Promise<boolean>;
71
89
  export declare const serveAiModelRelay: (source: Window, origin: string, handlers: AiModelHandlers) => (() => void);
90
+ /** A provider-neutral model; credentials and provider adapters stay on the host. */
91
+ export declare const createRelayedAssistantModel: (host: AiModelHost, descriptor: AssistantModelDescriptor) => LanguageModelV4;
72
92
  export {};
@@ -1,7 +1,9 @@
1
+ import { PlanningAssistantConfig } from './planning-assistant/chat-model';
1
2
  import { default as RoomleEmbeddingApi } from './roomle-embedding-lib';
2
3
  import { AiFeature, AiModelHandlers } from '../../common/src/utils/ai-model-relay';
3
4
  export type { AiFeature, AiModelAuthReason, AiModelHandlers, AiModelRequest, RenderingInput, } from '../../common/src/utils/ai-model-relay';
4
5
  export interface AiModelHostOptions extends AiModelHandlers {
6
+ model?: PlanningAssistantConfig;
5
7
  /**
6
8
  * The features the host answers; the others keep the built-in endpoints.
7
9
  * Left out: every feature, also ones added later. Never empty.
@@ -24,4 +26,4 @@ export interface AiModelHostControl {
24
26
  * instance is created. Rejects, with the relay stopped, when the iframe
25
27
  * cannot take the host, e.g. an older UI without the AI relay.
26
28
  */
27
- export declare const serveAiModelRequests: (instance: Pick<RoomleEmbeddingApi<unknown, unknown>, "startRelay" | "ui">, { features, ...handlers }: AiModelHostOptions) => Promise<AiModelHostControl>;
29
+ export declare const serveAiModelRequests: (instance: Pick<RoomleEmbeddingApi<unknown, unknown>, "startRelay" | "ui">, { features, model, ...handlers }: AiModelHostOptions) => Promise<AiModelHostControl>;
@@ -15,7 +15,7 @@ export { libLoadArticleCatalog, libLoadMasterData, libLoadCalcScript, registerLe
15
15
  export { omPostRequest, omGetRequest, } from './homag-intelligence/hi-order-manager';
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
- export { loadChatModel, startPlanningAssistant, type PlanningAssistantConfig, type PlanningAssistantPlannerApi, } from './homag-intelligence/hi-planning-assistant';
18
+ export { loadChatModel, startPlanningAssistant, type PlanningAssistantConfig, type PlanningAssistantPlannerApi, type PlanningAssistantControl, } from './homag-intelligence/hi-planning-assistant';
19
19
  export { resolveHiModelProxy, type HiModelProxy, type HiModelProxyOptions, } from './homag-intelligence/hi-model-proxy';
20
20
  export { requestImageEdits, type ImageEditsEndpoint, } from './homag-intelligence/image-edits';
21
21
  export { type ExternalObjectSnapshotSaveResult, type HiContextAction, } from '../../web-sdk/packages';
@@ -5,6 +5,12 @@ export { loadChatModel, type PlanningAssistantConfig, } from '../planning-assist
5
5
  /** The planner the planning assistant runs in: the HI MCP tools' planner API, the agent prompts and the window. */
6
6
  export type PlanningAssistantPlannerApi = HiMcpPlannerApi & {
7
7
  extended: {
8
+ stopPlanningAssistant?(owner: string): Promise<void>;
9
+ setPlanningAssistantModel?(model: {
10
+ model: string;
11
+ readsImages: boolean;
12
+ responsesProvider?: 'openai' | 'azure';
13
+ }, owner: string): Promise<void> | void;
8
14
  getExternalObjectAgentPrompts(): Promise<{
9
15
  systemPrompt: string;
10
16
  imagePrompt: string;
@@ -34,7 +40,8 @@ export type PlanningAssistantPlannerApi = HiMcpPlannerApi & {
34
40
  skipped?: boolean;
35
41
  } | null>;
36
42
  callbacks: {
37
- onPlanningAssistantPrompt?: (prompt: PlanningAssistantPrompt) => Promise<void>;
43
+ onPlanningAssistantModeChange?: (mode: 'planner' | 'isolation') => Promise<void>;
44
+ onPlanningAssistantPrompt?: (prompt: PlanningAssistantPrompt) => unknown;
38
45
  };
39
46
  };
40
47
  };
@@ -55,4 +62,9 @@ export declare const withPhotoFacts: (skillText: string, facts?: PhotoFacts) =>
55
62
  * the tools run in the planner of this page, and the agent's output goes to
56
63
  * "planningAssistantOutput". Aborting the signal ends a running turn.
57
64
  */
58
- export declare const startPlanningAssistant: (roomDesignerApi: PlanningAssistantPlannerApi, config: PlanningAssistantConfig, signal: AbortSignal) => Promise<void>;
65
+ export interface PlanningAssistantControl {
66
+ suspend(): Promise<void>;
67
+ resume(): Promise<void>;
68
+ dispose(): Promise<void>;
69
+ }
70
+ export declare const startPlanningAssistant: (roomDesignerApi: PlanningAssistantPlannerApi, config: PlanningAssistantConfig, signal: AbortSignal) => Promise<PlanningAssistantControl | undefined>;
@@ -1 +1 @@
1
- export { loadChatModel, type PlanningAssistantConfig, } from '../../../web-sdk/packages/assistant';
1
+ export { loadChatModel, responsesProviderOf, type PlanningAssistantConfig, } from '../../../web-sdk/packages/assistant';
@@ -2,4 +2,6 @@ export { loadChatModel } from './common-core/src/planning-assistant/chat-model';
2
2
  export type { PlanningAssistantConfig, ConfiguratorAgentApi, } from './common-core/src/planning-assistant/types';
3
3
  export { createAgentMcpTools, mcpToModelOutput, type AgentMcpModelOutput, type AgentMcpInputSchema, type AgentMcpTool, type AgentMcpTools, } from './common-core/src/planning-assistant/mcp-tools';
4
4
  export { createAssistant } from './common-core/src/planning-assistant/runtime';
5
+ export { MAX_TURN_STEPS, TURN_TIMEOUT_MS, lastTurnStep, } from './common-core/src/planning-assistant/turn-limits';
5
6
  export { createChatRecovery } from './common-core/src/planning-assistant/chat-recovery';
7
+ export { responsesProviderOf } from './common-core/src/planning-assistant/continuation';
@@ -2,7 +2,7 @@ import { LanguageModelV4, SharedV4ProviderOptions } from '@ai-sdk/provider';
2
2
  import { PlanningAssistantConfig } from './types';
3
3
  export type { PlanningAssistantConfig } from './types';
4
4
  /** The AI SDK language model of the config and the provider options `streamText` takes with it. */
5
- export declare const loadChatModel: ({ provider, model, apiKey, baseUrl, headers, chatCompletions, responses, storedResponses, reasoningEffort, }: PlanningAssistantConfig, observeRequest?: (body: string) => Promise<void>) => Promise<{
5
+ export declare const loadChatModel: ({ provider, model, apiKey, baseUrl, headers, chatCompletions, responses, storedResponses, reasoningEffort, }: PlanningAssistantConfig, observeRequest?: (body: string) => Promise<void>, hostModel?: LanguageModelV4) => Promise<{
6
6
  languageModel: LanguageModelV4;
7
7
  providerOptions?: SharedV4ProviderOptions;
8
8
  }>;
@@ -0,0 +1,5 @@
1
+ import { ModelMessage } from 'ai';
2
+ import { PlanningAssistantConfig } from './types';
3
+ export declare const responsesProviderOf: (config: PlanningAssistantConfig) => "openai" | "azure" | null;
4
+ export declare const isRejectedContinuation: (error: unknown) => boolean;
5
+ export declare const withoutStoredItems: (message: ModelMessage) => ModelMessage;
@@ -38,7 +38,9 @@ export interface AgentMcpTool {
38
38
  annotations?: AgentToolDefinition['annotations'];
39
39
  description: string;
40
40
  inputSchema: AgentMcpInputSchema;
41
- execute: (input: unknown) => Promise<McpToolResult>;
41
+ execute: (input: unknown, options?: {
42
+ abortSignal?: AbortSignal;
43
+ }) => Promise<McpToolResult>;
42
44
  toModelOutput: (options: {
43
45
  output: McpToolResult;
44
46
  }) => AgentMcpModelOutput;
@@ -1,6 +1,8 @@
1
+ import { LanguageModelV4 } from '@ai-sdk/provider';
1
2
  import { PlanningAssistantOutput, PlanningAssistantPrompt } from '../planning-assistant';
2
3
  import { PlanningAssistantConfig } from './chat-model';
3
4
  import { AgentMcpTools } from './mcp-tools';
5
+ import { ConfigurationAssistantLog } from './session-log';
4
6
  /** Runs a browser agent with the tools and prompts supplied by its SDK domain. */
5
7
  export declare const createAssistant: (config: PlanningAssistantConfig, signal: AbortSignal, output: (part: PlanningAssistantOutput) => unknown, setupDomain: () => Promise<{
6
8
  prompts: {
@@ -8,10 +10,13 @@ export declare const createAssistant: (config: PlanningAssistantConfig, signal:
8
10
  imagePrompt: string;
9
11
  };
10
12
  tools: AgentMcpTools;
13
+ beforeTurn?: () => Promise<string>;
11
14
  }>, turnPolicy?: {
12
15
  timeoutMs: number;
13
16
  recovery: (tools: AgentMcpTools) => {
14
17
  tools: AgentMcpTools;
15
18
  summary(): string;
16
19
  };
17
- }) => Promise<(prompt: PlanningAssistantPrompt) => Promise<void>>;
20
+ }, hostModel?: LanguageModelV4) => Promise<((prompt: PlanningAssistantPrompt, turnSignal?: AbortSignal) => Promise<boolean>) & {
21
+ report: () => ConfigurationAssistantLog;
22
+ }>;
@@ -5,7 +5,7 @@ import { AgentToolDefinition, McpToolResult } from '../agent-tools/mcp-tool-type
5
5
  */
6
6
  export interface PlanningAssistantConfig {
7
7
  /** `azure` for a deployment on an Azure AI Foundry resource, `openai-compatible` for an endpoint that speaks OpenAI Chat Completions or, with `responses`, stateless OpenAI Responses (e.g. a model proxy), else the provider of the model. */
8
- provider: 'azure' | 'openai' | 'openai-compatible' | 'mistral' | 'anthropic' | 'google';
8
+ provider: 'host' | 'azure' | 'openai' | 'openai-compatible' | 'mistral' | 'anthropic' | 'google';
9
9
  /** The model id at the provider; for `azure` the name of the deployment, for `openai-compatible` the model name the endpoint expects. */
10
10
  model: string;
11
11
  /** The API key of the provider, required by every provider but `openai-compatible`; for `azure` the key of the Foundry resource. */
@@ -20,6 +20,8 @@ export interface PlanningAssistantConfig {
20
20
  responses?: boolean;
21
21
  /** `openai-compatible` with `responses` only: store responses on the server (`store: true`) so supported runtimes can continue steps and follow-up turns by `previousResponseId`. */
22
22
  storedResponses?: boolean;
23
+ /** Provider metadata namespace used by a host model that supports stored Responses. */
24
+ responsesProvider?: 'openai' | 'azure';
23
25
  /** `azure` only: the reasoning effort of the deployment; its default when unset. */
24
26
  reasoningEffort?: string;
25
27
  /** Azure Responses only: mark the library prefix for caching on a deployment verified to support explicit breakpoints. */
@@ -11,6 +11,7 @@ export interface PlanningAssistantPrompt {
11
11
  * - "activity": what the agent does now, e.g. the tool it runs, shown in the status line
12
12
  * - "error": the turn failed; the text replaces the answer of the turn and ends the turn
13
13
  * - "done": the turn is complete; the input is free again
14
+ * - "time-limit": the turn reached its time limit; the window asks whether to continue, in the language of the UI
14
15
  * - "availability": the input on or off, with the reason shown in the status line; off until the host enables it
15
16
  * - "images": the image drop on or off; off until the host enables it
16
17
  */
@@ -26,6 +27,8 @@ export type PlanningAssistantOutput = {
26
27
  statusCode?: number;
27
28
  } | {
28
29
  type: 'done';
30
+ } | {
31
+ type: 'time-limit';
29
32
  } | {
30
33
  type: 'availability';
31
34
  available: boolean;
@@ -0,0 +1,10 @@
1
+
2
+ var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), n = (t, n) => {
3
+ let r = {};
4
+ for (var i in t) e(r, i, {
5
+ get: t[i],
6
+ enumerable: !0
7
+ });
8
+ return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ };
10
+ export { n, t };
@@ -0,0 +1,11 @@
1
+
2
+ // \0rolldown/runtime.js
3
+ var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), n = (t, n) => {
4
+ let r = {};
5
+ for (var i in t) e(r, i, {
6
+ get: t[i],
7
+ enumerable: !0
8
+ });
9
+ return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
10
+ };
11
+ export { n, t };
@@ -1,6 +1,6 @@
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-D6M-d6y5.mjs";
3
- //#region packages/common/src/utils/message-handler.ts
2
+ import { t as e } from "./browser-Cys-y5Hy.mjs";
3
+ // packages/common/src/utils/message-handler.ts
4
4
  var t = class {
5
5
  _side;
6
6
  _incomingMessageBus = null;
@@ -90,7 +90,7 @@ var t = class {
90
90
  return !!(r.includes(e) || t.test(e) || e.endsWith("roomle.com") || e.endsWith("gitlab.io") || e.endsWith("gitlab.com"));
91
91
  }, o = (e, t) => s(JSON.parse(JSON.stringify(e)), t), s = (e, t) => {
92
92
  for (let n in t) try {
93
- t[n].constructor === Object ? e[n] = s(e[n], t[n]) : e[n] = t[n];
93
+ e[n] = t[n].constructor === Object ? s(e[n], t[n]) : t[n];
94
94
  } catch {
95
95
  e[n] = t[n];
96
96
  }
@@ -182,11 +182,8 @@ var t = class {
182
182
  t.forEach((e) => {
183
183
  let t = e.split("."), n = t[0], r = t[1];
184
184
  this[n] || (this[n] = {}), this[n][r] = function() {
185
- if (!this._messageHandler) {
186
- console.error("MessageHandler not set");
187
- return;
188
- }
189
- return this._messageHandler.sendMessage(e, [...arguments]);
185
+ if (!this._messageHandler) console.error("MessageHandler not set");
186
+ else return this._messageHandler.sendMessage(e, [...arguments]);
190
187
  }.bind(this);
191
188
  }), n.forEach((e) => {
192
189
  let t = e.split("."), n = t[0], r = t[1], i = t[2];
@@ -204,7 +201,7 @@ var t = class {
204
201
  setupPlugins(e, t, n = "website") {
205
202
  for (let r of e) typeof r == "string" && r === "dragIn" ? this.pluginsLoaded.push(new Promise((e, r) => {
206
203
  try {
207
- import("./drag-in-O5uwMddL.mjs").then((e) => e.n).then(({ DragIn: i }) => {
204
+ import("./drag-in-Cd_67tzS.mjs").then((e) => e.n).then(({ DragIn: i }) => {
208
205
  let a = new i(this.ui, t, n, this.viewName);
209
206
  a.init().then(() => {
210
207
  this.plugins.dragIn = a, e();
@@ -236,8 +233,7 @@ var t = class {
236
233
  reject: t
237
234
  };
238
235
  };
239
- //#endregion
240
- //#region packages/common/src/utils/rapi-version.ts
236
+ // packages/common/src/utils/rapi-version.ts
241
237
  (/* @__PURE__ */ "/items./items/{id}./items/{id}/renderings./items/{id}/conversions./items/{id}/3d-exports./items/{id}/perspectiveImage./items/{id}/perspectiveImageHD./items/{id}/topImage./items/{id}/tags./items/{id}/tagConnections./items/{id}/additionalContents./items/{id}/assetProcessings./items/{id}/3dAssets/{format}./items/{id}/3dAssets/{format}/{dummyFileName}./configurations./configurations/{id}./configurations/{id}/shares./configurations/{id}/renderings./configurations/{id}/3d-exports./configurations/{id}/3dAssets/{format}./configurations/{id}/3dAssets/{format}/{dummyFileName}./auth/signin./auth/signout./auth/reset./auth/reset/confirm./auth/change/pwd./auth/context./assets/analyze./version".split(".")).map((e) => RegExp("^" + e.replace(/\{[^}]+\}/g, "[^/]+") + "/?$"));
242
238
  var w = /\/v[23]\/?$/, T = (e, t) => w.test(e) ? e.replace(w, "/v2") + t : e + t, E = {
243
239
  SDK: "extended",
@@ -288,15 +284,15 @@ var w = /\/v[23]\/?$/, T = (e, t) => w.test(e) ? e.replace(w, "/v2") + t : e + t
288
284
  }
289
285
  });
290
286
  }, L = () => window.innerHeight * .01 + "px", R = (e) => {
291
- e && setTimeout(() => e.style.setProperty(V, L()), 0);
292
- }, z = "rml-styles", B = 450, V = "--rml-full-height", H = {
287
+ e && setTimeout(() => e.style.setProperty(B, L()), 0);
288
+ }, z = "rml-styles", B = "--rml-full-height", V = {
293
289
  CONTAINER: "rml-container",
294
290
  FILL: "rml-fill",
295
291
  POSITION: "rml-pos",
296
292
  TRANSITION: "rml-transition",
297
293
  ANDROID_HEIGHT: "rml-android-height",
298
294
  OVERFLOW_HIDDEN: "rml-overflow-hidden"
299
- }, U = /* @__PURE__ */ new Map(), W = class extends S {
295
+ }, H = /* @__PURE__ */ new Map(), U = class extends S {
300
296
  static createPlanner(e, t, n, r = []) {
301
297
  return this._create(e, t, n, r);
302
298
  }
@@ -352,25 +348,25 @@ var w = /\/v[23]\/?$/, T = (e, t) => w.test(e) ? e.replace(w, "/v2") + t : e + t
352
348
  _relays = /* @__PURE__ */ new Map();
353
349
  constructor(e, n, r, i, a) {
354
350
  if (super(), !e || typeof e.id != "string") throw Error("Please provide a correct configuratorId, you get the correct ID from your Roomle Contact Person");
355
- if (U.has(n)) throw Error("There is already an instance on this DOM element");
351
+ if (H.has(n)) throw Error("There is already an instance on this DOM element");
356
352
  if (!document.getElementById(z)) {
357
353
  let e = r.zIndex || 9999999, t = document.createElement("style");
358
354
  t.type = "text/css", t.id = z;
359
- let n = "transition:all ease-in-out " + B + "ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = L();
355
+ let n = "transition:all ease-in-out 450ms;", i = ["-webkit-", "-o-"].reduce((e, t) => e += t + n, "") + n, a = L();
360
356
  t.innerHTML = `
361
- .${H.CONTAINER}{${V}:${a};}
362
- .${H.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
363
- .${H.TRANSITION}{${i}}
364
- .${H.FILL}{width:100%;height:100%;opacity:1}
365
- .${H.ANDROID_HEIGHT}{height:calc(var(${V},1vh)*100)}
366
- .${H.OVERFLOW_HIDDEN}{overflow:hidden}
357
+ .${V.CONTAINER}{${B}:${a};}
358
+ .${V.POSITION}{position:fixed;top:0;left:0;z-index:${e};opacity:0}
359
+ .${V.TRANSITION}{${i}}
360
+ .${V.FILL}{width:100%;height:100%;opacity:1}
361
+ .${V.ANDROID_HEIGHT}{height:calc(var(${B},1vh)*100)}
362
+ .${V.OVERFLOW_HIDDEN}{overflow:hidden}
367
363
  `, document.head.appendChild(t);
368
364
  }
369
365
  this._executeMessage = this._executeMessage.bind(this);
370
366
  let o = new t("website", window, null, this._executeMessage);
371
367
  this.setMessageHandler(o), this._onResize = this._onResize.bind(this), x() && window.addEventListener("resize", this._onResize), this._container = n, this._initData = r, this._configuratorSettings = e;
372
368
  let s = this._createIframe();
373
- this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe), U.set(n, !0);
369
+ this._onUseFullPage = this._onUseFullPage.bind(this), this._onBackToWebsite = this._onBackToWebsite.bind(this), this._waitForIframe = a, this._container.appendChild(s), this._iframe = s, this.setupPlugins(i, this._iframe), H.set(n, !0);
374
370
  }
375
371
  startRelay(e, t) {
376
372
  this._relays.get(e)?.();
@@ -385,35 +381,30 @@ var w = /\/v[23]\/?$/, T = (e, t) => w.test(e) ? e.replace(w, "/v2") + t : e + t
385
381
  };
386
382
  }
387
383
  teardown() {
388
- this._relays.forEach((e) => e()), this._relays.clear(), this._container && U.delete(this._container);
384
+ this._relays.forEach((e) => e()), this._relays.clear(), this._container && H.delete(this._container);
389
385
  let e = this._container.querySelector("iframe");
390
386
  e && this._container.removeChild(e), window.removeEventListener("resize", this._onResize);
391
387
  }
392
388
  _createIframe() {
393
389
  let e = document.createElement("iframe"), t = this._configuratorSettings?.url || "https://www.roomle.com/t/cp/";
394
- return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.allow = "microphone", e.classList.add(H.CONTAINER), e.classList.add(H.FILL), e;
390
+ return this._initData.useLocalRoomle && (t = location.href.replace("embedding.html", "")), location.href.includes("roomle.gitlab.io") && (t = location.href.replace("embedding.html", "index.html")), this._initData.overrideServerUrl && (t = this._initData.overrideServerUrl), e.src = t, e.allow = "microphone", e.classList.add(V.CONTAINER), e.classList.add(V.FILL), e;
395
391
  }
396
392
  _onResize() {
397
393
  R(this._iframe);
398
394
  }
399
395
  _onUseFullPage() {
400
- this._iframe.classList.add(H.POSITION), document.documentElement.classList.add(H.OVERFLOW_HIDDEN), window.document.body.classList.add(H.OVERFLOW_HIDDEN), x() && (R(this._iframe), this._iframe.classList.add(H.ANDROID_HEIGHT));
396
+ this._iframe.classList.add(V.POSITION), document.documentElement.classList.add(V.OVERFLOW_HIDDEN), window.document.body.classList.add(V.OVERFLOW_HIDDEN), x() && (R(this._iframe), this._iframe.classList.add(V.ANDROID_HEIGHT));
401
397
  }
402
398
  _onBackToWebsite() {
403
- this._iframe.classList.remove(H.POSITION), this._iframe.classList.remove(H.ANDROID_HEIGHT), document.documentElement.classList.remove(H.OVERFLOW_HIDDEN), window.document.body.classList.remove(H.OVERFLOW_HIDDEN);
399
+ this._iframe.classList.remove(V.POSITION), this._iframe.classList.remove(V.ANDROID_HEIGHT), document.documentElement.classList.remove(V.OVERFLOW_HIDDEN), window.document.body.classList.remove(V.OVERFLOW_HIDDEN);
404
400
  }
405
401
  _executeMessage({ message: e, args: t }, n) {
406
402
  if (n.source && n.source === this._iframe?.contentWindow) return e === k.REQUEST_BOOT ? this._messageHandler ? (this._messageHandler.setOutgoingMessageBus(n.source), Promise.resolve({ result: this._initData })) : (console.error("MessageHandler not set"), Promise.resolve({ error: "MessageHandler not set" })) : e === k.SETUP ? (this.handleSetup(t[0]), I(this.ui.callbacks, "onUseFullPage", this._onUseFullPage), I(this.ui.callbacks, "onBackToWebsite", this._onBackToWebsite), this._waitForIframe(this), setTimeout(() => {
407
- if (!this._messageHandler) {
408
- console.error("MessageHandler not set");
409
- return;
410
- }
411
- this._messageHandler.sendMessage(k.WEBSITE_READY);
403
+ this._messageHandler ? this._messageHandler.sendMessage(k.WEBSITE_READY) : console.error("MessageHandler not set");
412
404
  }, 0), Promise.resolve({ result: null })) : this.executeMessage({
413
405
  message: e,
414
406
  args: t
415
407
  });
416
408
  }
417
409
  };
418
- //#endregion
419
- export { k as HANDSHAKE_MESSAGES, F as INTERACTION_CONTAINER_SELECTOR, E as NAMESPACE, D as NAMESPACE_SEPARATOR, O as SDK_CALLBACK, A as WELL_KNOWN_MESSAGES, W as default, P as getConfiguratorSettings, N as getMethodNames, M as isExposable };
410
+ export { k as HANDSHAKE_MESSAGES, F as INTERACTION_CONTAINER_SELECTOR, E as NAMESPACE, D as NAMESPACE_SEPARATOR, O as SDK_CALLBACK, A as WELL_KNOWN_MESSAGES, U as default, P as getConfiguratorSettings, N as getMethodNames, M as isExposable };
@@ -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-BjtSrqbu.mjs";
2
+ import { t as e } from "./browser-CzLpXYFF.mjs";
3
3
  var t = class {
4
4
  _side;
5
5
  _incomingMessageBus = null;
@@ -68,7 +68,7 @@ var t = class {
68
68
  "0.0.0.0"
69
69
  ], r = (e, t) => i(JSON.parse(JSON.stringify(e)), t), i = (e, t) => {
70
70
  for (let n in t) try {
71
- t[n].constructor === Object ? e[n] = i(e[n], t[n]) : e[n] = t[n];
71
+ e[n] = t[n].constructor === Object ? i(e[n], t[n]) : t[n];
72
72
  } catch {
73
73
  e[n] = t[n];
74
74
  }
@@ -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-CWHSbwvG.mjs").then((e) => e.n).then(({ DragIn: i }) => {
188
+ import("./drag-in-DlDsgY4T.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:8baad949-ad6e-5f49-8264-71a059982b91",
6
+ "serialNumber": "urn:uuid:d71a60ab-661b-5471-8302-12096fe9a21a",
7
7
  "metadata": {
8
- "timestamp": "2026-11-17T13:55:45.000Z",
8
+ "timestamp": "2026-11-20T12:48:44.000Z",
9
9
  "component": {
10
10
  "type": "library",
11
11
  "name": "@roomle/embedding-lib",
12
- "version": "d37e283733eaa60ba5e7f8f86fa3e51a2b7d5d03",
13
- "bom-ref": "@roomle/embedding-lib@d37e283733eaa60ba5e7f8f86fa3e51a2b7d5d03"
12
+ "version": "f09ffd4d5947a99fb578e6a72e57b24286b7d1f0",
13
+ "bom-ref": "@roomle/embedding-lib@f09ffd4d5947a99fb578e6a72e57b24286b7d1f0"
14
14
  }
15
15
  },
16
16
  "components": [
@@ -351,7 +351,7 @@
351
351
  ],
352
352
  "dependencies": [
353
353
  {
354
- "ref": "@roomle/embedding-lib@d37e283733eaa60ba5e7f8f86fa3e51a2b7d5d03"
354
+ "ref": "@roomle/embedding-lib@f09ffd4d5947a99fb578e6a72e57b24286b7d1f0"
355
355
  },
356
356
  {
357
357
  "ref": "pkg:npm/%40ai-sdk/anthropic@4.0.68"
@@ -0,0 +1,9 @@
1
+
2
+ var e = (e) => AbortSignal.any(e), t = 3e5, n = (e) => `The turn reached its time limit of ${e / 6e4} minutes. Should I continue?`, r = (e, t, r) => (r({ type: "time-limit" }), r({ type: "done" }), {
3
+ role: "assistant",
4
+ content: `${e}\n\n${n(t)}`
5
+ }), i = "The step limit of this turn is reached: this answer cannot call a tool. Tell the user what you did and what is still open, say that the step limit of the turn was reached, and ask whether you should continue. The next message of the user starts a new turn, in which you can call tools again.", a = (e, t) => e === 31 ? {
6
+ toolChoice: "none",
7
+ instructions: t ? `${t}\n\n${i}` : i
8
+ } : {};
9
+ export { e as a, n as i, r as n, a as r, t };
@@ -0,0 +1,10 @@
1
+
2
+ // packages/common/src/dep-free/abort-signal.ts
3
+ var e = (e) => AbortSignal.any(e), t = 3e5, n = (e) => `The turn reached its time limit of ${e / 6e4} minutes. Should I continue?`, r = (e, t, r) => (r({ type: "time-limit" }), r({ type: "done" }), {
4
+ role: "assistant",
5
+ content: `${e}\n\n${n(t)}`
6
+ }), i = "The step limit of this turn is reached: this answer cannot call a tool. Tell the user what you did and what is still open, say that the step limit of the turn was reached, and ask whether you should continue. The next message of the user starts a new turn, in which you can call tools again.", a = (e, t) => e === 31 ? {
7
+ toolChoice: "none",
8
+ instructions: t ? `${t}\n\n${i}` : i
9
+ } : {};
10
+ export { e as a, n as i, r as n, a as r, t };
@@ -1,5 +1,5 @@
1
1
 
2
- //#region packages/common/src/utils/get-computed-style-cached.ts
2
+ // packages/common/src/utils/get-computed-style-cached.ts
3
3
  var e = class {
4
4
  _computedStyleCache = /* @__PURE__ */ new Map();
5
5
  _maxLifetime = 16;
@@ -122,11 +122,10 @@ var e = class {
122
122
  top: i.y,
123
123
  bottom: i.y + i.height
124
124
  })), o && !s && !c;
125
- }, d = (e, t, n, r) => l(e, t, n) ? r ? !l(e, t, {
125
+ }, d = (e, t, n, r) => l(e, t, n) ? !r || !l(e, t, {
126
126
  left: r.left + n.left,
127
127
  right: r.right + n.left,
128
128
  top: r.top + n.top,
129
129
  bottom: r.bottom + n.top
130
- }) : !0 : !1;
131
- //#endregion
130
+ }) : !1;
132
131
  export { u as a, t as c, a as i, o as n, d as o, r, l as s, c as t };
@@ -80,36 +80,36 @@ var e, t = class {
80
80
  return r === void 0 ? (...e) => {} : r;
81
81
  } }), l = (e, t, n) => e >= n.left && e <= n.right && t >= n.top && t <= n.bottom, u = (e, t, n, r, i, a) => {
82
82
  let o = !1;
83
- n && (o = l(e, t, a ? {
83
+ n && (o = a ? l(e, t, {
84
84
  left: a.left + n.x,
85
85
  right: a.left + n.x + n.width,
86
86
  top: a.top + n.y,
87
87
  bottom: a.top + n.y + n.height
88
- } : {
88
+ }) : l(e, t, {
89
89
  left: n.x,
90
90
  right: n.x + n.width,
91
91
  top: n.y,
92
92
  bottom: n.y + n.height
93
93
  }));
94
94
  let s = !1;
95
- r && (s = l(e, t, a ? {
95
+ r && (s = a ? l(e, t, {
96
96
  left: a.left + r.x,
97
97
  right: a.left + r.x + r.width,
98
98
  top: a.top + r.y,
99
99
  bottom: a.top + r.y + r.height
100
- } : {
100
+ }) : l(e, t, {
101
101
  left: r.x,
102
102
  right: r.x + r.width,
103
103
  top: r.y,
104
104
  bottom: r.y + r.height
105
105
  }));
106
106
  let c = !1;
107
- return i && (c = l(e, t, a ? {
107
+ return i && (c = a ? l(e, t, {
108
108
  left: a.left + i.x,
109
109
  right: a.left + i.x + i.width,
110
110
  top: a.top + i.y,
111
111
  bottom: a.top + i.y + i.height
112
- } : {
112
+ }) : l(e, t, {
113
113
  left: i.x,
114
114
  right: i.x + i.width,
115
115
  top: i.y,