sceneview-mcp 4.0.11 → 4.0.12

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/README.md CHANGED
@@ -45,6 +45,17 @@ Restart Claude Desktop after saving.
45
45
 
46
46
  ### Claude Code
47
47
 
48
+ Two options.
49
+
50
+ **Recommended — install the [SceneView Claude Code plugin](https://github.com/sceneview/claude-marketplace)** to get this MCP server **plus** 11 namespaced contributor commands and cross-platform reminder hooks in one shot:
51
+
52
+ ```bash
53
+ /plugin marketplace add sceneview/claude-marketplace
54
+ /plugin install sceneview@sceneview
55
+ ```
56
+
57
+ **Or — just the MCP server** (lighter, no commands or hooks):
58
+
48
59
  ```bash
49
60
  claude mcp add sceneview -- npx -y sceneview-mcp
50
61
  ```
@@ -21,9 +21,16 @@
21
21
  */
22
22
  import { promises as fs } from "node:fs";
23
23
  import path from "node:path";
24
+ import { LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
24
25
  // ─── Constants ───────────────────────────────────────────────────────────────
25
- /** The latest SceneView release known to this build of the MCP. */
26
- export const LATEST_SCENEVIEW_VERSION = "4.0.0";
26
+ /**
27
+ * The latest SceneView release known to this build of the MCP, snapshotted
28
+ * from the root `gradle.properties:VERSION_NAME` at build time via
29
+ * `scripts/generate-version.js`. See #941 — pre-fix this was hardcoded to
30
+ * "4.0.0" and never bumped, so every install of every MCP version told the
31
+ * LLM that "4.0.0" was current even when the real SDK was at 4.0.9.
32
+ */
33
+ export const LATEST_SCENEVIEW_VERSION = LATEST_SCENEVIEW_RELEASE;
27
34
  /** Hard cap on the number of source files inspected per call. */
28
35
  export const MAX_FILES_SCANNED = 30;
29
36
  /** Hard cap on total bytes read across all source files per call (500 KB). */
package/dist/artifact.js CHANGED
@@ -12,7 +12,7 @@
12
12
  // - scene: multi-model 3D scene with lighting and environment (Filament.js)
13
13
  // - product-360: product turntable with hotspot annotations (Filament.js)
14
14
  // ─── Constants ───────────────────────────────────────────────────────────────
15
- const FILAMENT_CDN = "https://cdn.jsdelivr.net/npm/filament@1.70.1/filament.js";
15
+ const FILAMENT_CDN = "https://cdn.jsdelivr.net/npm/filament@1.70.2/filament.js";
16
16
  const DEFAULT_MODEL = "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/DamagedHelmet/glTF-Binary/DamagedHelmet.glb";
17
17
  const DEFAULT_COLORS = [
18
18
  "#4285F4", "#EA4335", "#FBBC04", "#34A853", "#FF6D01",
@@ -1,9 +1,4 @@
1
- /**
2
- * debug-issue.ts
3
- *
4
- * Targeted debugging guide for common SceneView issues.
5
- * Given a symptom, returns a focused diagnostic checklist.
6
- */
1
+ import { LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
7
2
  export const DEBUG_CATEGORIES = [
8
3
  "model-not-showing",
9
4
  "ar-not-working",
@@ -305,7 +300,7 @@ fun DebugModelViewer() {
305
300
  title: "Build / Gradle Errors",
306
301
  guide: `## Debugging: Build Errors
307
302
 
308
- ### "Cannot resolve io.github.sceneview:sceneview:4.0.0"
303
+ ### "Cannot resolve io.github.sceneview:sceneview:${LATEST_SCENEVIEW_RELEASE}"
309
304
 
310
305
  1. Check repositories in \`settings.gradle.kts\`:
311
306
  \`\`\`kotlin
@@ -348,7 +343,7 @@ SceneView bundles Filament. If you also depend on Filament directly:
348
343
  \`\`\`kotlin
349
344
  // Remove direct Filament dependency — SceneView includes it
350
345
  // implementation("com.google.android.filament:filament-android:1.x.x") // REMOVE
351
- implementation("io.github.sceneview:sceneview:4.0.0") // This includes Filament
346
+ implementation("io.github.sceneview:sceneview:${LATEST_SCENEVIEW_RELEASE}") // This includes Filament
352
347
  \`\`\`
353
348
 
354
349
  ### "Cannot find Filament material"
@@ -672,10 +667,40 @@ export function autoDetectIssue(description) {
672
667
  if (lower.includes("wrong thread") || lower.includes("off main thread") || lower.includes("dispatchers.io") || lower.includes("background thread")) {
673
668
  return "crash";
674
669
  }
675
- if (lower.includes("not showing") || lower.includes("invisible") || lower.includes("can't see") || lower.includes("model doesn't appear") || lower.includes("model not visible") || lower.includes("nothing shows up") || lower.includes("model is null") || lower.includes("remembermodelinstance returns null")) {
670
+ if (lower.includes("not showing") || lower.includes("invisible") || lower.includes("can't see") || lower.includes("model doesn't appear") || lower.includes("model not visible") || lower.includes("nothing shows up") || lower.includes("model is null") || lower.includes("remembermodelinstance returns null") || lower.includes("no model")) {
676
671
  return "model-not-showing";
677
672
  }
678
- if (lower.includes("ar not") || lower.includes("ar doesn't") || lower.includes("arcore") || lower.includes("plane") || lower.includes("anchor") || lower.includes("camera permission") || lower.includes("augmented reality") || lower.includes("hit test") || lower.includes("hitresult")) {
673
+ // AR-not-working catches "the AR camera feed is dark" and the half-dozen
674
+ // ways a user describes a non-functional AR session. Pre-#940 only "ar not",
675
+ // "ar doesn't", and the technical terms (arcore/plane/anchor/hit test)
676
+ // matched — the natural phrasings "ar camera is black", "my AR is black",
677
+ // "ARScene shows nothing", etc. fell through to null.
678
+ //
679
+ // The regex `\b(ar|arscene|arsceneview|arcore)\b.*\b(black|dark)\b` catches
680
+ // any sentence where "AR" (in any of its forms) and a "no signal" keyword
681
+ // both appear, independent of the connecting words ("is", "feed is",
682
+ // "camera was", etc.). "dark" is added per the #940 review — "AR mode is
683
+ // dark" / "AR feed dimmed" are common synonyms users reach for.
684
+ //
685
+ // The bare `\bcamera\b.*\b(black|dark)\b` check is NOW gated on the
686
+ // sentence containing an AR-flavoured token — without that gate it
687
+ // false-positives on "the orbit camera in my 3D scene renders a black
688
+ // background" (a 3D-only issue that should route to model-not-showing
689
+ // or material). Caught by the #940 follow-up review.
690
+ const hasArContext = /\b(ar|arscene|arsceneview|arcore|arkit|arcore)\b/.test(lower)
691
+ || lower.includes("augmented reality");
692
+ const arBlackHints = (hasArContext && /\b(black|dark|dimmed)\b/.test(lower))
693
+ || /\b(ar|arscene|arsceneview|arcore)\b.*\b(black|dark|dimmed)\b/.test(lower);
694
+ if (lower.includes("ar not") ||
695
+ lower.includes("ar doesn't") ||
696
+ lower.includes("arcore") ||
697
+ lower.includes("plane") ||
698
+ lower.includes("anchor") ||
699
+ lower.includes("camera permission") ||
700
+ lower.includes("augmented reality") ||
701
+ lower.includes("hit test") ||
702
+ lower.includes("hitresult") ||
703
+ arBlackHints) {
679
704
  return "ar-not-working";
680
705
  }
681
706
  if (lower.includes("crash") || lower.includes("sigabrt") || lower.includes("native crash") || lower.includes("fatal") || lower.includes("exception") || lower.includes("destroy") || lower.includes("double free") || lower.includes("segfault") || (lower.includes("oom") && !lower.includes("zoom")) || lower.includes("out of memory") || lower.includes("nullpointerexception") || lower.includes("npe")) {
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * Material, collision, model optimization, and web rendering guides.
5
5
  */
6
+ import { LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
6
7
  // ─── Material Guide ─────────────────────────────────────────────────────────
7
8
  export const MATERIAL_GUIDE = `# SceneView Material & Shader Guide
8
9
 
@@ -406,7 +407,7 @@ export const WEB_RENDERING_GUIDE = `# SceneView Web Rendering Guide (Filament.js
406
407
 
407
408
  ## Architecture
408
409
 
409
- SceneView Web uses **Filament.js v1.70.1** — Google's Filament engine compiled to WebAssembly. This is the **same PBR rendering engine** as SceneView Android, ensuring visual parity.
410
+ SceneView Web uses **Filament.js v1.70.2** — Google's Filament engine compiled to WebAssembly. This is the **same PBR rendering engine** as SceneView Android, ensuring visual parity.
410
411
 
411
412
  \`\`\`
412
413
  Browser → WebGL2 → Filament.js (WASM) → GPU
@@ -419,7 +420,7 @@ Browser → WebGL2 → Filament.js (WASM) → GPU
419
420
  ### Using sceneview.js (npm or local)
420
421
  \`\`\`html
421
422
  <!-- Option 1: npm CDN -->
422
- <script src="https://cdn.jsdelivr.net/npm/sceneview-web@4.0.0/sceneview.js"></script>
423
+ <script src="https://cdn.jsdelivr.net/npm/sceneview-web@${LATEST_SCENEVIEW_RELEASE}/sceneview-web.js"></script>
423
424
 
424
425
  <!-- Option 2: local hosting (recommended for production) -->
425
426
  <!-- Copy js/filament/ directory to your server for faster WASM loading -->
@@ -517,7 +518,7 @@ camera {
517
518
 
518
519
  | Feature | SceneView (Filament.js) | model-viewer |
519
520
  |---------|------------------------|--------------|
520
- | **Engine** | Filament v1.70.1 WASM | Filament WASM (same engine) |
521
+ | **Engine** | Filament v1.70.2 WASM | Filament WASM (same engine) |
521
522
  | **Bundle size** | ~215KB JS + 3.3MB WASM | ~800 KB (subset) |
522
523
  | **Procedural geometry** | Yes (cubes, spheres, etc.) | No |
523
524
  | **Custom materials** | Yes (full Filament API) | Limited |
@@ -1,11 +1,3 @@
1
- /**
2
- * generate-scene.ts
3
- *
4
- * Generates a complete SceneView{} or ARSceneView{} composable from a text description.
5
- * Maps common objects/concepts to SceneView node types and builds compilable code.
6
- *
7
- * All generated code targets SceneView v4.0.0 API and is verified against llms.txt.
8
- */
9
1
  const OBJECT_MAPPINGS = [
10
2
  // Furniture
11
3
  { keywords: ["table"], nodeType: "CubeNode", geometryType: "cube", defaultScale: 1.0, defaultPosition: [0, 0.4, 0], color: "Color(0.55f, 0.35f, 0.17f)", comment: "Table (flat cube)" },
@@ -245,7 +237,7 @@ export function generateScene(description) {
245
237
  }
246
238
  // Build the code
247
239
  const isAR = parsed.isAR;
248
- dependencies.push(isAR ? "io.github.sceneview:arsceneview:4.0.0" : "io.github.sceneview:sceneview:4.0.0");
240
+ dependencies.push(isAR ? "io.github.sceneview:arsceneview:${LATEST_SCENEVIEW_RELEASE}" : "io.github.sceneview:sceneview:${LATEST_SCENEVIEW_RELEASE}");
249
241
  // Build model instance declarations
250
242
  const modelElements = elements.filter((e) => e.type === "model");
251
243
  const uniqueModels = new Map();