sceneview-mcp 4.0.11 → 4.0.13

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.
@@ -1,5 +1,8 @@
1
1
  // AUTO-GENERATED by scripts/generate-version.js — do not edit by hand.
2
- // Snapshots the package.json "version" field at build time so that
3
- // the MCP server and telemetry report the actual published version
4
- // instead of a stale hardcoded constant.
5
- export const PACKAGE_VERSION = "4.0.11";
2
+ // Snapshots both the MCP package version (from package.json) and the
3
+ // SceneView SDK version (from ../gradle.properties:VERSION_NAME) at
4
+ // build time so the MCP server, telemetry, and the install-snippet
5
+ // generators all report the actually-published versions instead of
6
+ // stale hardcoded constants. See #941.
7
+ export const PACKAGE_VERSION = "4.0.13";
8
+ export const LATEST_SCENEVIEW_RELEASE = "4.18.0";
package/dist/guides.js CHANGED
@@ -3,19 +3,20 @@
3
3
  *
4
4
  * Static content for the platform roadmap, best practices, and AR setup tools.
5
5
  */
6
+ import { LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
6
7
  // ─── Platform Roadmap ─────────────────────────────────────────────────────────
7
8
  export const PLATFORM_ROADMAP = `# SceneView Multi-Platform Roadmap
8
9
 
9
- ## Current Status (v4.0.0)
10
+ ## Current Status (v${LATEST_SCENEVIEW_RELEASE})
10
11
 
11
12
  | Platform | Status | Artifact | Renderer |
12
13
  |----------|--------|----------|----------|
13
- | **Android (Compose)** | Stable | \`io.github.sceneview:sceneview:4.0.0\` | Filament |
14
- | **Android (AR)** | Stable | \`io.github.sceneview:arsceneview:4.0.0\` | Filament + ARCore |
15
- | **iOS (SwiftUI)** | Alpha | SceneViewSwift SPM \`from: "4.0.0"\` | RealityKit + ARKit |
14
+ | **Android (Compose)** | Stable | \`io.github.sceneview:sceneview:${LATEST_SCENEVIEW_RELEASE}\` | Filament |
15
+ | **Android (AR)** | Stable | \`io.github.sceneview:arsceneview:${LATEST_SCENEVIEW_RELEASE}\` | Filament + ARCore |
16
+ | **iOS (SwiftUI)** | Alpha | SceneViewSwift SPM \`from: "${LATEST_SCENEVIEW_RELEASE}"\` | RealityKit + ARKit |
16
17
  | **macOS (SwiftUI)** | Alpha | SceneViewSwift SPM (in Package.swift) | RealityKit |
17
18
  | **visionOS (SwiftUI)** | Alpha | SceneViewSwift SPM (in Package.swift) | RealityKit |
18
- | **KMP Core** | Stable | \`io.github.sceneview:sceneview-core:4.0.0\` | N/A (shared logic) |
19
+ | **KMP Core** | Stable | \`io.github.sceneview:sceneview-core:${LATEST_SCENEVIEW_RELEASE}\` | N/A (shared logic) |
19
20
 
20
21
  ## Architecture: Native Renderers per Platform
21
22
 
@@ -32,7 +33,7 @@ KMP shares **logic**, not **rendering**. Each platform uses its native renderer.
32
33
  - **3D rendering** via Google Filament: PBR materials, HDR environments, glTF/GLB models, post-processing.
33
34
  - **AR** via ARCore: plane detection, hit testing, anchors, cloud anchors, augmented images, depth, light estimation, point cloud.
34
35
  - **Compose-native DSL**: all nodes are \`@Composable\` functions inside \`SceneView { }\` or \`ARSceneView { }\`.
35
- - **26+ node types**: ModelNode, LightNode, AnchorNode, CameraNode, TextNode, PathNode, ViewNode, PlaneNode, SphereNode, CylinderNode, CubeNode, DynamicSkyNode, FogNode, ReflectionProbeNode, PhysicsNode, BillboardNode, LineNode, and more.
36
+ - **42+ node types**: ModelNode, LightNode, AnchorNode, CameraNode, TextNode, PathNode, ViewNode, PlaneNode, SphereNode, CylinderNode, CubeNode, DynamicSkyNode, FogNode, ReflectionProbeNode, PhysicsNode, BillboardNode, LineNode, and more.
36
37
 
37
38
  ## Apple — Alpha (SceneViewSwift)
38
39
 
@@ -338,7 +339,7 @@ export const AR_SETUP_GUIDE = `# SceneView AR — Complete Setup Guide (Android
338
339
  ## 1. SPM Dependency
339
340
 
340
341
  \`\`\`swift
341
- .package(url: "https://github.com/sceneview/sceneview", from: "4.0.0")
342
+ .package(url: "https://github.com/sceneview/sceneview", from: "${LATEST_SCENEVIEW_RELEASE}")
342
343
  \`\`\`
343
344
 
344
345
  ## 2. Info.plist — Camera Permission
@@ -423,7 +424,7 @@ ARSceneView(
423
424
  \`\`\`kotlin
424
425
  // build.gradle.kts (app module)
425
426
  dependencies {
426
- implementation("io.github.sceneview:arsceneview:4.0.0")
427
+ implementation("io.github.sceneview:arsceneview:${LATEST_SCENEVIEW_RELEASE}")
427
428
  // arsceneview includes sceneview transitively — no need to add both
428
429
  }
429
430
  \`\`\`
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@
7
7
  * and handler logic now live in `./tools/`, so this file is a thin
8
8
  * adapter that wires the library into the MCP stdio server plus the
9
9
  * two MCP resources (`sceneview://api`, `sceneview://known-issues`) and
10
- * the pro-tier access / billing checks.
10
+ * the proxy dispatch for Pro-tier tools (`./proxy.ts`).
11
11
  *
12
12
  * IMPORTANT: the runtime behaviour must stay identical to v4.0.0 for
13
13
  * existing npm consumers. Do not reorder checks, do not change content
@@ -17,11 +17,12 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
17
17
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
18
18
  import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
19
19
  import { fetchKnownIssues } from "./issues.js";
20
+ import { DEMO_WITH_SETTINGS_EXAMPLE, SKETCHFAB_STREAMING_EXAMPLE, } from "./examples.js";
20
21
  import { recordClientInit, recordToolCall } from "./telemetry.js";
21
22
  import { isProTool, getToolTier } from "./tiers.js";
22
23
  import { dispatchProxyToolCall, isProxyConfigured, DEFAULT_PRICING_URL, } from "./proxy.js";
23
24
  import { API_DOCS, TOOL_DEFINITIONS, dispatchTool, } from "./tools/index.js";
24
- import { PACKAGE_VERSION } from "./generated/version.js";
25
+ import { LATEST_SCENEVIEW_RELEASE, PACKAGE_VERSION } from "./generated/version.js";
25
26
  // ─── v4 lite-mode startup banner ─────────────────────────────────────────────
26
27
  //
27
28
  // MCP servers must keep stdout clean for JSON-RPC, so we log to stderr.
@@ -57,7 +58,7 @@ server.setRequestHandler(ListResourcesRequestSchema, async () => ({
57
58
  {
58
59
  uri: "sceneview://api",
59
60
  name: "SceneView API Reference",
60
- description: "Complete SceneView 4.0.0 API — SceneView, ARSceneView, SceneScope DSL, ARSceneScope DSL, node types, resource loading, camera, gestures, math types, threading rules, and common patterns. Read this before writing any SceneView code.",
61
+ description: `Complete SceneView ${LATEST_SCENEVIEW_RELEASE} API — SceneView, ARSceneView, SceneScope DSL, ARSceneScope DSL, node types, resource loading, camera, gestures, math types, threading rules, and common patterns. Read this before writing any SceneView code.`,
61
62
  mimeType: "text/markdown",
62
63
  },
63
64
  {
@@ -66,6 +67,18 @@ server.setRequestHandler(ListResourcesRequestSchema, async () => ({
66
67
  description: "Live list of open issues from the SceneView GitHub repository. Check this before reporting a bug or when something isn't working — there may already be a known workaround.",
67
68
  mimeType: "text/markdown",
68
69
  },
70
+ {
71
+ uri: "examples://demo-with-settings",
72
+ name: "Example — DemoScaffold v2 (full-screen scene + ModalBottomSheet)",
73
+ description: "Pattern for full-screen 3D / AR scene + Material 3 ModalBottomSheet controls. The DemoScaffold v2 contract used by every demo in samples/android-demo (issue #1154, PR #1169). Read this before adding a new demo with settings.",
74
+ mimeType: "text/markdown",
75
+ },
76
+ {
77
+ uri: "examples://sketchfab-streaming",
78
+ name: "Example — Stream Sketchfab CC-BY models into a SceneView demo",
79
+ description: "Pattern for streaming CC-BY licensed glTF models from Sketchfab on demand instead of bundling 30 MB of GLBs in the APK. Uses SketchfabAssetResolver + SampleAssets registry + per-slug bundled fallback (Stage 2 of umbrella issue #1152). Read this before adding a streamed demo.",
80
+ mimeType: "text/markdown",
81
+ },
69
82
  ],
70
83
  }));
71
84
  server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
@@ -80,6 +93,22 @@ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
80
93
  contents: [{ uri: "sceneview://known-issues", mimeType: "text/markdown", text: issues }],
81
94
  };
82
95
  }
96
+ case "examples://demo-with-settings":
97
+ return {
98
+ contents: [{
99
+ uri: "examples://demo-with-settings",
100
+ mimeType: "text/markdown",
101
+ text: DEMO_WITH_SETTINGS_EXAMPLE,
102
+ }],
103
+ };
104
+ case "examples://sketchfab-streaming":
105
+ return {
106
+ contents: [{
107
+ uri: "examples://sketchfab-streaming",
108
+ mimeType: "text/markdown",
109
+ text: SKETCHFAB_STREAMING_EXAMPLE,
110
+ }],
111
+ };
83
112
  default:
84
113
  throw new Error(`Unknown resource: ${request.params.uri}`);
85
114
  }
package/dist/issues.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { PACKAGE_VERSION } from "./generated/version.js";
1
2
  export const COMMON_ISSUES = [
2
3
  {
3
4
  id: "threading-sigabrt",
@@ -134,7 +135,10 @@ export async function fetchKnownIssues() {
134
135
  const response = await fetch("https://api.github.com/repos/sceneview/sceneview/issues?state=open&per_page=30", {
135
136
  headers: {
136
137
  Accept: "application/vnd.github+json",
137
- "User-Agent": "sceneview-mcp/3.5.4",
138
+ // Plumb the actual MCP package version so GitHub abuse-watch
139
+ // logs show which MCP build is hitting them — was hardcoded
140
+ // to "3.5.4" pre-#941, far behind the current release.
141
+ "User-Agent": `sceneview-mcp/${PACKAGE_VERSION}`,
138
142
  "X-GitHub-Api-Version": "2022-11-28",
139
143
  },
140
144
  });
@@ -147,10 +151,12 @@ export async function fetchKnownIssues() {
147
151
  fetchError = "GitHub API returned unexpected response format (expected array).";
148
152
  }
149
153
  else {
150
- issues = json.filter((item) => typeof item === "object" &&
154
+ issues = json
155
+ .filter((item) => typeof item === "object" &&
151
156
  item !== null &&
152
157
  typeof item.number === "number" &&
153
- typeof item.title === "string");
158
+ typeof item.title === "string")
159
+ .map(normalizeIssue);
154
160
  }
155
161
  }
156
162
  }
@@ -161,6 +167,51 @@ export async function fetchKnownIssues() {
161
167
  cache = { data: result, fetchedAt: now };
162
168
  return result;
163
169
  }
170
+ /**
171
+ * Coerce a loosely-validated GitHub API item into a complete {@link GitHubIssue}.
172
+ *
173
+ * The upstream type guard only asserts `number` + `title`. A malformed API
174
+ * response — or a partial item served during a GitHub incident — can be
175
+ * missing `user`, `labels` or `updated_at`. Reading those unconditionally in
176
+ * `formatIssues` throws a `TypeError` and takes down the whole
177
+ * `sceneview://known-issues` resource. Default every optional field here so
178
+ * formatting can never crash.
179
+ */
180
+ function normalizeIssue(item) {
181
+ const rawLabels = item.labels;
182
+ const labels = Array.isArray(rawLabels)
183
+ ? rawLabels
184
+ .map((l) => {
185
+ if (typeof l === "string")
186
+ return { name: l };
187
+ if (l !== null && typeof l === "object") {
188
+ const name = l.name;
189
+ if (typeof name === "string")
190
+ return { name };
191
+ }
192
+ return null;
193
+ })
194
+ .filter((l) => l !== null)
195
+ : [];
196
+ const rawUser = item.user;
197
+ const login = rawUser !== null &&
198
+ typeof rawUser === "object" &&
199
+ typeof rawUser.login === "string"
200
+ ? rawUser.login
201
+ : "unknown";
202
+ const updatedAt = typeof item.updated_at === "string" ? item.updated_at : "";
203
+ const createdAt = typeof item.created_at === "string" ? item.created_at : "";
204
+ return {
205
+ number: item.number,
206
+ title: item.title,
207
+ html_url: typeof item.html_url === "string" ? item.html_url : "",
208
+ body: typeof item.body === "string" ? item.body : null,
209
+ labels,
210
+ created_at: createdAt,
211
+ updated_at: updatedAt,
212
+ user: { login },
213
+ };
214
+ }
164
215
  function formatIssues(issues, fetchError) {
165
216
  const lines = ["# SceneView — Open GitHub Issues\n"];
166
217
  if (fetchError) {
package/dist/migration.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
1
2
  export const MIGRATION_GUIDE = `# SceneView 2.x → 3.0 Migration Guide
2
3
 
3
4
  SceneView 3.0 is a full rewrite from Android Views to **Jetpack Compose**. Nearly every public API changed. This guide covers every breaking change and how to fix it.
@@ -6,10 +7,10 @@ SceneView 3.0 is a full rewrite from Android Views to **Jetpack Compose**. Nearl
6
7
 
7
8
  ## 1. Gradle dependency
8
9
 
9
- | 2.x | 3.0 |
10
- |-----|-----|
11
- | \`io.github.sceneview:sceneview:2.x.x\` | \`io.github.sceneview:sceneview:4.0.0\` |
12
- | \`io.github.sceneview:arsceneview:2.x.x\` | \`io.github.sceneview:arsceneview:4.0.0\` |
10
+ | 2.x | Current |
11
+ |-----|---------|
12
+ | \`io.github.sceneview:sceneview:2.x.x\` | \`io.github.sceneview:sceneview:${LATEST_SCENEVIEW_RELEASE}\` |
13
+ | \`io.github.sceneview:arsceneview:2.x.x\` | \`io.github.sceneview:arsceneview:${LATEST_SCENEVIEW_RELEASE}\` |
13
14
 
14
15
  ---
15
16
 
@@ -4,6 +4,7 @@
4
4
  * Setup guides for every supported SceneView platform.
5
5
  * Consolidates Android, iOS, Web, Flutter, React Native, Desktop, and TV.
6
6
  */
7
+ import { LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
7
8
  export const PLATFORM_IDS = ["android", "ios", "web", "flutter", "react-native", "desktop", "tv"];
8
9
  const ANDROID_3D = `## SceneView Android — 3D Setup
9
10
 
@@ -12,7 +13,7 @@ const ANDROID_3D = `## SceneView Android — 3D Setup
12
13
  \`\`\`kotlin
13
14
  // build.gradle.kts (app module)
14
15
  dependencies {
15
- implementation("io.github.sceneview:sceneview:4.0.0")
16
+ implementation("io.github.sceneview:sceneview:${LATEST_SCENEVIEW_RELEASE}")
16
17
  }
17
18
  \`\`\`
18
19
 
@@ -87,7 +88,7 @@ const ANDROID_AR = `## SceneView Android — AR Setup
87
88
  \`\`\`kotlin
88
89
  // build.gradle.kts (app module)
89
90
  dependencies {
90
- implementation("io.github.sceneview:arsceneview:4.0.0")
91
+ implementation("io.github.sceneview:arsceneview:${LATEST_SCENEVIEW_RELEASE}")
91
92
  // arsceneview includes sceneview transitively
92
93
  }
93
94
  \`\`\`
@@ -177,7 +178,7 @@ In Xcode: **File > Add Package Dependencies** > paste:
177
178
  \`\`\`
178
179
  https://github.com/sceneview/sceneview
179
180
  \`\`\`
180
- Set version rule to **"from: 4.0.0"**.
181
+ Set version rule to **"from: ${LATEST_SCENEVIEW_RELEASE}"**.
181
182
 
182
183
  Or in Package.swift:
183
184
  \`\`\`swift
@@ -188,7 +189,7 @@ let package = Package(
188
189
  name: "MyApp",
189
190
  platforms: [.iOS(.v18), .macOS(.v15), .visionOS(.v1)],
190
191
  dependencies: [
191
- .package(url: "https://github.com/sceneview/sceneview", from: "4.0.0")
192
+ .package(url: "https://github.com/sceneview/sceneview", from: "${LATEST_SCENEVIEW_RELEASE}")
192
193
  ],
193
194
  targets: [
194
195
  .executableTarget(
@@ -273,7 +274,7 @@ const IOS_AR = `## SceneViewSwift — iOS AR Setup
273
274
  ### 1. SPM Dependency
274
275
 
275
276
  \`\`\`swift
276
- .package(url: "https://github.com/sceneview/sceneview", from: "4.0.0")
277
+ .package(url: "https://github.com/sceneview/sceneview", from: "${LATEST_SCENEVIEW_RELEASE}")
277
278
  \`\`\`
278
279
 
279
280
  ### 2. Info.plist — Camera Permission (Required)
@@ -414,10 +415,18 @@ SceneView Flutter uses **PlatformView** to embed native SceneView (Android: Fila
414
415
 
415
416
  ### 1. Dependencies
416
417
 
418
+ > **Note:** the 4.0 line of \`sceneview_flutter\` is not yet on pub.dev
419
+ > (registry still holds an unrelated 0.0.1 demo) — see #923. Use the
420
+ > git dependency snippet below for now.
421
+
417
422
  \`\`\`yaml
418
423
  # pubspec.yaml
419
424
  dependencies:
420
- sceneview_flutter: ^4.0.0
425
+ sceneview_flutter:
426
+ git:
427
+ url: https://github.com/sceneview/sceneview
428
+ path: flutter/sceneview_flutter
429
+ ref: v${LATEST_SCENEVIEW_RELEASE}
421
430
  \`\`\`
422
431
 
423
432
  ### 2. Android Setup
@@ -475,8 +484,13 @@ const FLUTTER_AR = `## SceneView Flutter — AR Setup
475
484
  ### 1. Dependencies
476
485
 
477
486
  \`\`\`yaml
487
+ # pub.dev publish for 4.x is pending — see #923. Use the git ref:
478
488
  dependencies:
479
- sceneview_flutter: ^4.0.0
489
+ sceneview_flutter:
490
+ git:
491
+ url: https://github.com/sceneview/sceneview
492
+ path: flutter/sceneview_flutter
493
+ ref: v${LATEST_SCENEVIEW_RELEASE}
480
494
  \`\`\`
481
495
 
482
496
  ### 2. Android Manifest
@@ -632,7 +646,7 @@ plugins {
632
646
 
633
647
  dependencies {
634
648
  implementation(compose.desktop.currentOs)
635
- implementation("io.github.sceneview:sceneview-desktop:4.0.0") // when published
649
+ implementation("io.github.sceneview:sceneview-desktop:${LATEST_SCENEVIEW_RELEASE}") // when published
636
650
  }
637
651
  \`\`\`
638
652
 
@@ -641,6 +655,7 @@ dependencies {
641
655
  \`\`\`kotlin
642
656
  import androidx.compose.ui.window.Window
643
657
  import androidx.compose.ui.window.application
658
+ import { LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
644
659
 
645
660
  fun main() = application {
646
661
  Window(
@@ -683,7 +698,7 @@ SceneView on Android TV uses the same Filament renderer as mobile Android, with
683
698
 
684
699
  \`\`\`kotlin
685
700
  dependencies {
686
- implementation("io.github.sceneview:sceneview:4.0.0")
701
+ implementation("io.github.sceneview:sceneview:${LATEST_SCENEVIEW_RELEASE}")
687
702
  implementation("androidx.leanback:leanback:1.0.0")
688
703
  implementation("androidx.tv:tv-foundation:1.0.0-alpha10")
689
704
  }
@@ -748,14 +763,14 @@ const SETUPS = {
748
763
  android: {
749
764
  name: "Android (Jetpack Compose)",
750
765
  renderer: "Filament (OpenGL ES / Vulkan)",
751
- status: "Stable (v4.0.0)",
766
+ status: "Stable (v${LATEST_SCENEVIEW_RELEASE})",
752
767
  guide3d: ANDROID_3D,
753
768
  guideAr: ANDROID_AR,
754
769
  },
755
770
  ios: {
756
771
  name: "iOS / macOS / visionOS (SwiftUI)",
757
772
  renderer: "RealityKit (Metal)",
758
- status: "Alpha (v4.0.0)",
773
+ status: "Alpha (v${LATEST_SCENEVIEW_RELEASE})",
759
774
  guide3d: IOS_3D,
760
775
  guideAr: IOS_AR,
761
776
  },