From e7cc8c430f3449ab084b02785c2c11685ae360c4 Mon Sep 17 00:00:00 2001 From: Marcus <139352735+sucrammal@users.noreply.github.com> Date: Mon, 15 Jun 2026 12:35:44 -0400 Subject: [PATCH 1/9] Move frame builder backend deps into dev deps --- package.json | 12 +++++------- pnpm-lock.yaml | 30 +++++++++++++++--------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index d8a7b022c..291be12e0 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@changesets/cli": "2.29.6", "@connectrpc/connect": "1.7.0", "@connectrpc/connect-web": "1.7.0", + "@langchain/anthropic": "^1.4.0", "@dimforge/rapier3d-compat": "0.18.2", "@eslint/compat": "2.0.2", "@eslint/js": "10.0.1", @@ -115,11 +116,13 @@ "type-fest": "^5.0.1", "typescript": "5.9.2", "typescript-eslint": "8.56.1", + "uuid-tool": "^2.0.3", "vite": "7.3.2", "vite-plugin-devtools-json": "1.0.0", "vite-plugin-glsl": "^1.5.5", "vite-plugin-mkcert": "1.17.9", - "vitest": "3.2.6" + "vitest": "3.2.6", + "zod": "^4.4.3" }, "peerDependencies": { "@ag-grid-community/client-side-row-model": ">=32.3.0", @@ -209,16 +212,11 @@ ], "dependencies": { "@bufbuild/protobuf": "1.10.1", - "@connectrpc/connect": "1.7.0", - "@connectrpc/connect-web": "1.7.0", - "@langchain/anthropic": "^1.4.0", "@neodrag/svelte": "^2.3.3", "d3-force": "^3.0.0", "filtrex": "^3.1.0", "koota": "0.6.5", "lodash-es": "4.18.1", - "three-mesh-bvh": "^0.9.8", - "uuid-tool": "^2.0.3", - "zod": "^4.4.3" + "three-mesh-bvh": "^0.9.8" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ea9be5e92..be9b2501d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,15 +15,6 @@ importers: '@bufbuild/protobuf': specifier: 1.10.1 version: 1.10.1 - '@connectrpc/connect': - specifier: 1.7.0 - version: 1.7.0(@bufbuild/protobuf@1.10.1) - '@connectrpc/connect-web': - specifier: 1.7.0 - version: 1.7.0(@bufbuild/protobuf@1.10.1)(@connectrpc/connect@1.7.0(@bufbuild/protobuf@1.10.1)) - '@langchain/anthropic': - specifier: ^1.4.0 - version: 1.4.0(@langchain/core@1.1.48(@opentelemetry/api@1.9.0)(@opentelemetry/sdk-trace-base@2.2.0(@opentelemetry/api@1.9.0))(ws@8.21.0)) '@neodrag/svelte': specifier: ^2.3.3 version: 2.3.3(svelte@5.55.7) @@ -45,12 +36,6 @@ importers: three-mesh-bvh: specifier: ^0.9.8 version: 0.9.8(three@0.183.2) - uuid-tool: - specifier: ^2.0.3 - version: 2.0.3 - zod: - specifier: ^4.4.3 - version: 4.4.3 devDependencies: '@ag-grid-community/client-side-row-model': specifier: 32.3.9 @@ -64,6 +49,12 @@ importers: '@changesets/cli': specifier: 2.29.6 version: 2.29.6(@types/node@25.6.0) + '@connectrpc/connect': + specifier: 1.7.0 + version: 1.7.0(@bufbuild/protobuf@1.10.1) + '@connectrpc/connect-web': + specifier: 1.7.0 + version: 1.7.0(@bufbuild/protobuf@1.10.1)(@connectrpc/connect@1.7.0(@bufbuild/protobuf@1.10.1)) '@dimforge/rapier3d-compat': specifier: 0.18.2 version: 0.18.2 @@ -73,6 +64,9 @@ importers: '@eslint/js': specifier: 10.0.1 version: 10.0.1(eslint@10.0.2(jiti@2.6.1)) + '@langchain/anthropic': + specifier: ^1.4.0 + version: 1.4.0(@langchain/core@1.1.48(@opentelemetry/api@1.9.0)(@opentelemetry/sdk-trace-base@2.2.0(@opentelemetry/api@1.9.0))(ws@8.21.0)) '@playwright/test': specifier: 1.55.1 version: 1.55.1 @@ -274,6 +268,9 @@ importers: typescript-eslint: specifier: 8.56.1 version: 8.56.1(eslint@10.0.2(jiti@2.6.1))(typescript@5.9.2) + uuid-tool: + specifier: ^2.0.3 + version: 2.0.3 vite: specifier: 7.3.2 version: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.30.1)(tsx@4.20.5)(yaml@2.8.1) @@ -289,6 +286,9 @@ importers: vitest: specifier: 3.2.6 version: 3.2.6(@types/node@25.6.0)(@vitest/browser@3.2.4)(jiti@2.6.1)(jsdom@26.1.0)(lightningcss@1.30.1)(tsx@4.20.5)(yaml@2.8.1) + zod: + specifier: ^4.4.3 + version: 4.4.3 packages: From 288948676229bd33aa56f8c688d1ca5dd1963af9 Mon Sep 17 00:00:00 2001 From: Marcus <139352735+sucrammal@users.noreply.github.com> Date: Mon, 15 Jun 2026 12:36:43 -0400 Subject: [PATCH 2/9] Changeset --- .changeset/flat-hats-serve.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/flat-hats-serve.md diff --git a/.changeset/flat-hats-serve.md b/.changeset/flat-hats-serve.md new file mode 100644 index 000000000..1d58eff42 --- /dev/null +++ b/.changeset/flat-hats-serve.md @@ -0,0 +1,5 @@ +--- +'@viamrobotics/motion-tools': patch +--- + +Reorg frame builder deps From 9bd489658ff7149aab8b756e4eda8830ef0627a6 Mon Sep 17 00:00:00 2001 From: Marcus <139352735+sucrammal@users.noreply.github.com> Date: Mon, 15 Jun 2026 12:52:38 -0400 Subject: [PATCH 3/9] Move uuid back into dep --- package.json | 4 ++-- pnpm-lock.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 291be12e0..da5c3dd1a 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,6 @@ "type-fest": "^5.0.1", "typescript": "5.9.2", "typescript-eslint": "8.56.1", - "uuid-tool": "^2.0.3", "vite": "7.3.2", "vite-plugin-devtools-json": "1.0.0", "vite-plugin-glsl": "^1.5.5", @@ -217,6 +216,7 @@ "filtrex": "^3.1.0", "koota": "0.6.5", "lodash-es": "4.18.1", - "three-mesh-bvh": "^0.9.8" + "three-mesh-bvh": "^0.9.8", + "uuid-tool": "^2.0.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index be9b2501d..f5f996235 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,6 +36,9 @@ importers: three-mesh-bvh: specifier: ^0.9.8 version: 0.9.8(three@0.183.2) + uuid-tool: + specifier: ^2.0.3 + version: 2.0.3 devDependencies: '@ag-grid-community/client-side-row-model': specifier: 32.3.9 @@ -268,9 +271,6 @@ importers: typescript-eslint: specifier: 8.56.1 version: 8.56.1(eslint@10.0.2(jiti@2.6.1))(typescript@5.9.2) - uuid-tool: - specifier: ^2.0.3 - version: 2.0.3 vite: specifier: 7.3.2 version: 7.3.2(@types/node@25.6.0)(jiti@2.6.1)(lightningcss@1.30.1)(tsx@4.20.5)(yaml@2.8.1) From e92c050b86c114cac1bb66949b163876fb384c3f Mon Sep 17 00:00:00 2001 From: Marcus <139352735+sucrammal@users.noreply.github.com> Date: Mon, 15 Jun 2026 16:31:31 -0400 Subject: [PATCH 4/9] Validation for duplicate entries under same component --- server/routes/scene-builder.ts | 3 +- .../LLMSceneBuilder/SceneBuilder.svelte | 6 +--- .../LLMSceneBuilder/frameDeltaAdapter.ts | 32 +++++++++++++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/server/routes/scene-builder.ts b/server/routes/scene-builder.ts index cc5de363a..99fe3e078 100644 --- a/server/routes/scene-builder.ts +++ b/server/routes/scene-builder.ts @@ -47,7 +47,7 @@ const ResponseSchema = z.object({ updates: z .array(FrameDeltaSchema) .describe( - 'One entry per component that needs to change. Always populate for any requested change — empty only if truly nothing needs to change.' + 'One entry per component that needs to change. If a component needs both translation and orientation changes, put ALL of them in the same entry — never create two entries with the same componentName. Empty only if truly nothing needs to change.' ), explanation: z .string() @@ -61,6 +61,7 @@ const SYSTEM_PROMPT = `You are a robot spatial configuration assistant. The user Rules: - Only modify components listed in the context below. Each component has a "name" field — use that exact string as "componentName" in your response. - Return only components that actually need to change. +- CRITICAL: Each component may appear at most once in the updates array. If a component needs both a translation change and an orientation change, combine them into a single entry with both fields set. Never create two separate entries for the same componentName. - For translation, return only the changed axes (x, y, z are each optional). All translation values are in millimeters. - For orientation, current values are shown as { roll, pitch, yaw } in degrees. Return only the axes that are changing with their new absolute values. - Coordinate system: X is forward, Y is left, Z is up (right-handed). diff --git a/src/lib/plugins/LLMSceneBuilder/SceneBuilder.svelte b/src/lib/plugins/LLMSceneBuilder/SceneBuilder.svelte index 3168b493b..22f46473d 100644 --- a/src/lib/plugins/LLMSceneBuilder/SceneBuilder.svelte +++ b/src/lib/plugins/LLMSceneBuilder/SceneBuilder.svelte @@ -37,7 +37,7 @@