@roomle/embedding-lib 9.0.0-alpha.4 → 9.0.0-alpha.5

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 (29) hide show
  1. package/docs/md/web/embedding/CHANGELOG.md +60 -4
  2. package/{drag-ghost-BOwjMbG3.mjs → drag-ghost-BxqPJdhq.mjs} +1 -1
  3. package/{drag-ghost-BQ8r6NVo.mjs → drag-ghost-CDFtC1pd.mjs} +1 -1
  4. package/{drag-in-BP_E53zb.mjs → drag-in-CV1E-DO6.mjs} +2 -2
  5. package/{drag-in-QhL3zGC0.mjs → drag-in-ClPpCYyi.mjs} +2 -2
  6. package/embedding-plugins.js +1 -1
  7. package/embedding-plugins.min.js +1 -1
  8. package/{from-custom-view-BM_zRJCf.mjs → from-custom-view-Q9A-J7qV.mjs} +2 -2
  9. package/{from-custom-view-D2Z1YmCx.mjs → from-custom-view-Sx6P6iDI.mjs} +2 -2
  10. package/{from-website-DlklVbxU.mjs → from-website-BmCO2xli.mjs} +2 -2
  11. package/{from-website-CPVeVVMI.mjs → from-website-DZJy_l42.mjs} +2 -2
  12. package/hi.js +53 -13
  13. package/hi.min.js +51 -11
  14. package/package.json +1 -1
  15. package/packages/embedding-lib/src/hi.d.ts +1 -3
  16. package/packages/embedding-lib/src/homag-intelligence/hi-mcp-tools.d.ts +65 -8
  17. package/packages/embedding-lib/src/homag-intelligence/hi-planning-assistant.d.ts +2 -2
  18. package/roomle-embedding-lib.js +1 -1
  19. package/roomle-embedding-lib.min.js +1 -1
  20. package/hi-mcp-server-BiZlFkBm.mjs +0 -4866
  21. package/hi-mcp-server-DTQnrykg.mjs +0 -5278
  22. package/packages/embedding-lib/src/homag-intelligence/hi-mcp/agent-facing.d.ts +0 -35
  23. package/packages/embedding-lib/src/homag-intelligence/hi-mcp/hi-mcp-server.d.ts +0 -3
  24. package/packages/embedding-lib/src/homag-intelligence/hi-mcp/mcp-tool-types.d.ts +0 -57
  25. package/packages/embedding-lib/src/homag-intelligence/hi-mcp/mcp-tool.d.ts +0 -13
  26. package/packages/embedding-lib/src/homag-intelligence/hi-mcp/plan-history.d.ts +0 -33
  27. package/packages/embedding-lib/src/homag-intelligence/hi-mcp/planner-api.d.ts +0 -32
  28. package/packages/embedding-lib/src/homag-intelligence/hi-mcp/skills.d.ts +0 -23
  29. package/packages/embedding-lib/src/homag-intelligence/hi-mcp/tool-executors.d.ts +0 -4
@@ -1,35 +0,0 @@
1
- type WallSide = 'left' | 'right' | 'top' | 'bottom';
2
- interface DerivedWall {
3
- index: number;
4
- side: WallSide;
5
- start: [number, number, number];
6
- end: [number, number, number];
7
- lengthMm: number;
8
- type?: string;
9
- thicknessMm?: number;
10
- facingRotationY: number;
11
- }
12
- export declare const wallName: (side: WallSide) => string;
13
- export interface RoomCorner {
14
- name: string;
15
- point: [number, number, number];
16
- posRotationY: number;
17
- }
18
- export declare const roomCorners: (walls: DerivedWall[]) => RoomCorner[];
19
- export declare const spanAlongWall: (wall: DerivedWall, points: [number, number][]) => [number, number];
20
- export interface WallOfOpening {
21
- roomIndex: number;
22
- wall: number;
23
- fromEndMm: [number, number];
24
- }
25
- export declare const wallOfOpening: (outline: [number, number][], rooms: {
26
- walls?: DerivedWall[];
27
- }[]) => WallOfOpening | undefined;
28
- export declare const withSharedSelectionsOnce: (attributes: any[]) => any[];
29
- export declare const agentFacingAttributes: (masterData: any) => {
30
- [k: string]: any[];
31
- };
32
- export declare const agentFacingArticle: (article: any) => any;
33
- export declare const agentFacingRooms: (rooms: any) => any;
34
- export declare const agentFacingObstacles: (obstacles: any, rooms: any) => any;
35
- export {};
@@ -1,3 +0,0 @@
1
- import { HiMcpTools } from './mcp-tool-types';
2
- import { HiMcpPlannerApi } from './planner-api';
3
- export declare const createHiMcpTools: (roomDesignerApi: HiMcpPlannerApi) => HiMcpTools;
@@ -1,57 +0,0 @@
1
- /** The result of a tool as an MCP server answers `tools/call`. */
2
- export interface McpToolResult {
3
- content: ({
4
- type: 'text';
5
- text: string;
6
- } | {
7
- type: 'image';
8
- data: string;
9
- mimeType: string;
10
- })[];
11
- isError?: boolean;
12
- }
13
- /** What the model gets of a tool result, as `@ai-sdk/mcp` hands it to the AI SDK. */
14
- export interface HiMcpModelOutput {
15
- type: 'content';
16
- value: ({
17
- type: 'text';
18
- text: string;
19
- } | {
20
- type: 'file';
21
- mediaType: string;
22
- data: {
23
- type: 'data';
24
- data: string;
25
- };
26
- })[];
27
- }
28
- /** The input schema of a tool as a Standard Schema with its JSON Schema. */
29
- export interface HiMcpInputSchema {
30
- '~standard': {
31
- version: 1;
32
- vendor: string;
33
- validate: (value: unknown) => {
34
- value: unknown;
35
- };
36
- jsonSchema: {
37
- input: (options: {
38
- target: string;
39
- }) => Record<string, unknown>;
40
- output: (options: {
41
- target: string;
42
- }) => Record<string, unknown>;
43
- };
44
- };
45
- }
46
- /** A tool of the HI MCP tool set, in the shape of an AI SDK dynamic tool. */
47
- export interface HiMcpTool {
48
- type: 'dynamic';
49
- description: string;
50
- inputSchema: HiMcpInputSchema;
51
- execute: (input: unknown) => Promise<McpToolResult>;
52
- toModelOutput: (options: {
53
- output: McpToolResult;
54
- }) => HiMcpModelOutput;
55
- }
56
- /** The HI MCP tools by name, the tool set an AI SDK `streamText` takes. */
57
- export type HiMcpTools = Record<string, HiMcpTool>;
@@ -1,13 +0,0 @@
1
- import { z } from 'zod';
2
- import { HiMcpModelOutput, HiMcpTool, McpToolResult } from './mcp-tool-types';
3
- /** The tool result as `@ai-sdk/mcp` passes it to the model: text parts and images as file parts. */
4
- export declare const mcpToModelOutput: ({ output, }: {
5
- output: McpToolResult;
6
- }) => HiMcpModelOutput;
7
- /**
8
- * A tool as an MCP server registers it and an MCP client hands it to the AI
9
- * SDK: the JSON Schema the MCP SDK serves, which the AI SDK does not validate;
10
- * the input validated here, an invalid input and a thrown error answered as
11
- * MCP error results, which the model reads like any other result.
12
- */
13
- export declare const mcpTool: (name: string, description: string, shape: z.ZodRawShape, handler: (args: any) => Promise<McpToolResult>) => HiMcpTool;
@@ -1,33 +0,0 @@
1
- /** A tool call that changed the plan, as the undo tool reverts it. */
2
- export interface ToolCallRecord {
3
- tool: string;
4
- /** The planner steps the call put on the planner's undo history. */
5
- steps: number;
6
- /** The plan's groups before and after the call, as comparison keys. */
7
- groupsBefore: string;
8
- groupsAfter: string;
9
- }
10
- export declare class PlanHistory {
11
- private _events;
12
- private _inFlight;
13
- private _done;
14
- private _undone;
15
- private _changedInPlanner;
16
- private _waiters;
17
- get events(): number;
18
- get changedInPlanner(): boolean;
19
- historyChanged(): void;
20
- /** Resolves true once `count` events have arrived, false after the timeout. */
21
- waitForEvents(count: number, timeoutMs: number): Promise<boolean>;
22
- begin(): void;
23
- end(): void;
24
- /** A new change on top of the history ends redo, as in the planner. */
25
- record(call: ToolCallRecord): void;
26
- lastDone(): ToolCallRecord | undefined;
27
- lastUndone(): ToolCallRecord | undefined;
28
- markUndone(): void;
29
- markRedone(): void;
30
- forget(): void;
31
- /** A change in the planner was found: no record can be trusted any more. */
32
- markChangedInPlanner(): void;
33
- }
@@ -1,32 +0,0 @@
1
- export declare const DEFAULT_CALL_TIMEOUT_MS = 30000;
2
- export declare const SNAPSHOT_CALL_TIMEOUT_MS = 120000;
3
- export interface PlannerApi {
4
- extended: {
5
- getExternalObjectPlanContext(include: string[], options?: {
6
- interiorDesign: {
7
- groupId: string;
8
- rootId?: string;
9
- containerModuleId?: string;
10
- articleId?: string;
11
- };
12
- }): Promise<any>;
13
- externalObjectGroupOperation(command: string, payload: Record<string, unknown>): Promise<any>;
14
- fetchPrice(): Promise<any>;
15
- getExternalObjectSnapshot(options: Record<string, boolean>): Promise<any>;
16
- undo(): Promise<void>;
17
- redo(): Promise<void>;
18
- };
19
- }
20
- /**
21
- * The planner API a host hands to the HI MCP tools: the six planner methods
22
- * the tools call, and the planner's callbacks, whose `onHistoryChange` the
23
- * tools chain to tell their own planner steps from the user's changes.
24
- */
25
- export type HiMcpPlannerApi = PlannerApi & {
26
- extended: {
27
- callbacks: {
28
- onHistoryChange?: (undo: boolean, redo: boolean) => void;
29
- };
30
- };
31
- };
32
- export declare const createPlannerApi: ({ extended }: PlannerApi) => PlannerApi;
@@ -1,23 +0,0 @@
1
- /** A frontmatter field as YAML reads it: a scalar, or a nested field (metadata) as an object of scalars. */
2
- export type FrontmatterValue = string | Record<string, string>;
3
- /** A planning skill in the Agent Skills format: a directory with SKILL.md and supporting files. */
4
- export interface Skill {
5
- name: string;
6
- description: string;
7
- frontmatter: Record<string, FrontmatterValue>;
8
- /** The text of every file of the skill by its path in the skill's directory. */
9
- texts: Record<string, string>;
10
- files: string[];
11
- }
12
- export declare const SKILL_FILE = "SKILL.md";
13
- /**
14
- * Reads every skill of the skills directory, given as the text of each file by
15
- * its path below the directory; a broken skill fails the load and names its
16
- * file.
17
- */
18
- export declare const loadSkills: (files: Record<string, string>) => Skill[];
19
- /** One line per skill: its name and its description. */
20
- export declare const skillIndex: (skills: Skill[]) => string;
21
- /** A file of a skill by its path; only a file of the skill's list is read. */
22
- export declare const readSkillFile: (skills: Skill[], name: string, file?: string) => string;
23
- export declare const skills: Skill[];
@@ -1,4 +0,0 @@
1
- import { PlanHistory } from './plan-history';
2
- import { PlannerApi } from './planner-api';
3
- export type ToolExecutor = (roomDesignerApi: PlannerApi, args: Record<string, unknown>) => Promise<unknown>;
4
- export declare const createToolExecutors: (planHistory: PlanHistory) => Record<string, ToolExecutor>;