sceneview-mcp 4.3.2 → 4.3.4

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.
@@ -225,7 +225,11 @@ export const SYMBOLS = {
225
225
  "io.github.sceneview.DimensionMarksDefaults": {
226
226
  "module": "sceneview",
227
227
  "members": [
228
- "INSTANCE"
228
+ "INSTANCE",
229
+ "edging",
230
+ "getEdging",
231
+ "getLabelBackground",
232
+ "labelBackground"
229
233
  ]
230
234
  },
231
235
  "io.github.sceneview.DimensionTagClearance": {
@@ -3360,14 +3364,18 @@ export const SYMBOLS = {
3360
3364
  "io.github.sceneview.ar.node.ARFogConfig": {
3361
3365
  "module": "arsceneview",
3362
3366
  "members": [
3367
+ "color",
3363
3368
  "component1",
3364
3369
  "component2",
3365
3370
  "component3",
3371
+ "component4",
3366
3372
  "component5",
3373
+ "copy",
3367
3374
  "density",
3368
3375
  "enabled",
3369
3376
  "end",
3370
3377
  "equals",
3378
+ "getColor",
3371
3379
  "getDensity",
3372
3380
  "getEnabled",
3373
3381
  "getEnd",
@@ -6926,8 +6934,30 @@ export const SYMBOLS = {
6926
6934
  "io.github.sceneview.gesture.NodeEditingOverlayColors": {
6927
6935
  "module": "sceneview",
6928
6936
  "members": [
6937
+ "accent",
6938
+ "badgeBackground",
6939
+ "badgeBorder",
6940
+ "badgeText",
6941
+ "component1",
6942
+ "component2",
6943
+ "component3",
6944
+ "component4",
6945
+ "component5",
6946
+ "component6",
6947
+ "component7",
6948
+ "copy",
6929
6949
  "equals",
6950
+ "getAccent",
6951
+ "getBadgeBackground",
6952
+ "getBadgeBorder",
6953
+ "getBadgeText",
6954
+ "getLimit",
6955
+ "getSelection",
6956
+ "getShadow",
6930
6957
  "hashCode",
6958
+ "limit",
6959
+ "selection",
6960
+ "shadow",
6931
6961
  "toString"
6932
6962
  ]
6933
6963
  },
@@ -9262,6 +9292,9 @@ export const SYMBOLS = {
9262
9292
  "ARCoreAvailabilityOverlay": [
9263
9293
  "arsceneview"
9264
9294
  ],
9295
+ "ARFogNode": [
9296
+ "arsceneview"
9297
+ ],
9265
9298
  "ARHapticFeedback": [
9266
9299
  "arsceneview"
9267
9300
  ],
@@ -9289,6 +9322,9 @@ export const SYMBOLS = {
9289
9322
  "Box": [
9290
9323
  "sceneview"
9291
9324
  ],
9325
+ "CinematicHero": [
9326
+ "sceneview"
9327
+ ],
9292
9328
  "Compat2xChildNodes": [
9293
9329
  "sceneview"
9294
9330
  ],
@@ -9325,9 +9361,15 @@ export const SYMBOLS = {
9325
9361
  "DebugOverlay": [
9326
9362
  "sceneview"
9327
9363
  ],
9364
+ "DimensionMarks": [
9365
+ "sceneview"
9366
+ ],
9328
9367
  "DynamicSkyNode": [
9329
9368
  "sceneview"
9330
9369
  ],
9370
+ "FogNode": [
9371
+ "sceneview"
9372
+ ],
9331
9373
  "GRAVITY": [
9332
9374
  "sceneview-core"
9333
9375
  ],
@@ -9361,6 +9403,21 @@ export const SYMBOLS = {
9361
9403
  "PhysicsNode": [
9362
9404
  "sceneview"
9363
9405
  ],
9406
+ "PlacementReticleVisual": [
9407
+ "arsceneview"
9408
+ ],
9409
+ "PlacementScene": [
9410
+ "arsceneview"
9411
+ ],
9412
+ "PlaneDiscoveryGuide": [
9413
+ "arsceneview"
9414
+ ],
9415
+ "PlaneDiscoveryGuideOverlay": [
9416
+ "arsceneview"
9417
+ ],
9418
+ "PlaneDiscoveryHandHint": [
9419
+ "arsceneview"
9420
+ ],
9364
9421
  "PlaneDiscoveryHelpCard": [
9365
9422
  "arsceneview"
9366
9423
  ],
@@ -10686,6 +10743,9 @@ export const SYMBOLS = {
10686
10743
  "rememberModelSnapshot": [
10687
10744
  "sceneview"
10688
10745
  ],
10746
+ "rememberModelThumbnail": [
10747
+ "sceneview"
10748
+ ],
10689
10749
  "rememberNode": [
10690
10750
  "sceneview"
10691
10751
  ],
@@ -10773,6 +10833,9 @@ export const SYMBOLS = {
10773
10833
  "reticleAlphaFor": [
10774
10834
  "arsceneview"
10775
10835
  ],
10836
+ "reticleDotColorFor": [
10837
+ "arsceneview"
10838
+ ],
10776
10839
  "reticleDotRadiusFor": [
10777
10840
  "arsceneview"
10778
10841
  ],
@@ -4,7 +4,7 @@
4
4
  // build time so the MCP server, telemetry, and the install-snippet
5
5
  // generators all report the actually-published versions instead of
6
6
  // stale hardcoded constants. See #941.
7
- export const PACKAGE_VERSION = "4.3.2";
7
+ export const PACKAGE_VERSION = "4.3.4";
8
8
  export const LATEST_SCENEVIEW_RELEASE = "4.72.0";
9
9
  // The pub.dev coordinate for `flutter_sceneview`, read from the plugin's
10
10
  // README. Deliberately NOT LATEST_SCENEVIEW_RELEASE: pub.dev lags the SDK,
package/dist/validator.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { LATEST_SCENEVIEW_RELEASE } from "./generated/version.js";
1
2
  import { didYouMean, isKnownTopLevelFunction, isKnownTypeName, knownTypeNames, membersOfClass, rememberHelperNames, resolveImport, } from "./symbols.js";
2
3
  function findLines(lines, pattern) {
3
4
  return lines.map((l, i) => (pattern.test(l) ? i + 1 : -1)).filter((n) => n !== -1);
@@ -13,7 +14,141 @@ function locallyDeclaredNames(code) {
13
14
  }
14
15
  return names;
15
16
  }
17
+ function outdatedSceneViewVersionIssue(artifact, version, line) {
18
+ const coordinate = `io.github.sceneview:${artifact}`;
19
+ return {
20
+ severity: "error",
21
+ rule: "setup/outdated-sceneview-version",
22
+ message: `\`${coordinate}:${version}\` is a pre-4.x release whose API no longer exists. Use \`${coordinate}:${LATEST_SCENEVIEW_RELEASE}\`, which also ships 16 KB page-size aligned native libraries (required by Google Play from February 1, 2027); if the app cannot move to compileSdk 37 / AGP 9 yet, use \`${coordinate}:4.18.0\`, the newest release that builds on AGP 8 / compileSdk 36. See the migration guide (\`get_migration_guide\`).`,
23
+ line,
24
+ };
25
+ }
16
26
  const RULES = [
27
+ // ─── Outdated SceneView dependency ──────────────────────────────────────
28
+ {
29
+ id: "setup/outdated-sceneview-version",
30
+ severity: "error",
31
+ check(_code, lines) {
32
+ const issues = [];
33
+ const directDependency = /io\.github\.sceneview:(sceneview|arsceneview|sceneview-compose):(\d+(?:\.\d+)*(?:-[0-9A-Za-z.-]+)?)(?=["'])/;
34
+ const directDependencies = new RegExp(directDependency.source, "g");
35
+ findLines(lines, directDependency).forEach((lineNumber) => {
36
+ for (const match of lines[lineNumber - 1].matchAll(directDependencies)) {
37
+ if (Number.parseInt(match[2], 10) < 4) {
38
+ issues.push(outdatedSceneViewVersionIssue(match[1], match[2], lineNumber));
39
+ }
40
+ }
41
+ });
42
+ const catalogSections = [];
43
+ let catalogSection = "";
44
+ lines.forEach((line) => {
45
+ const sectionMatch = line.match(/^\s*\[([^\]]+)]\s*(?:#.*)?$/);
46
+ if (sectionMatch) {
47
+ catalogSection = sectionMatch[1];
48
+ }
49
+ catalogSections.push(catalogSection);
50
+ });
51
+ // Version catalogs: resolve each SceneView entry of [libraries] to its
52
+ // literal version or to the [versions] key it references.
53
+ const versionValue = /(\d+(?:\.\d+)*(?:-[0-9A-Za-z.-]+)?)/.source;
54
+ const catalogVersions = new Map();
55
+ lines.forEach((line, index) => {
56
+ if (catalogSections[index] !== "versions")
57
+ return;
58
+ const m = line.match(new RegExp(`^\\s*([A-Za-z0-9_.-]+)\\s*=\\s*["']${versionValue}["']\\s*(?:#.*)?$`));
59
+ if (m)
60
+ catalogVersions.set(m[1], { version: m[2], line: index + 1 });
61
+ });
62
+ const reported = new Set(issues.map((issue) => issue.line));
63
+ lines.forEach((line, index) => {
64
+ if (catalogSections[index] !== "libraries")
65
+ return;
66
+ const artifactMatch = line.match(/\bmodule\s*=\s*["']io\.github\.sceneview:(sceneview|arsceneview|sceneview-compose)["']/) ??
67
+ (/\bgroup\s*=\s*["']io\.github\.sceneview["']/.test(line)
68
+ ? line.match(/\bname\s*=\s*["'](sceneview|arsceneview|sceneview-compose)["']/)
69
+ : null);
70
+ if (!artifactMatch)
71
+ return;
72
+ let found;
73
+ const inline = line.match(new RegExp(`\\bversion\\s*=\\s*["']${versionValue}["']`));
74
+ if (inline) {
75
+ found = { version: inline[1], line: index + 1 };
76
+ }
77
+ else {
78
+ const ref = line.match(/\bversion\.ref\s*=\s*["']([^"']+)["']/);
79
+ if (ref)
80
+ found = catalogVersions.get(ref[1]);
81
+ }
82
+ if (!found || Number.parseInt(found.version, 10) >= 4 || reported.has(found.line))
83
+ return;
84
+ reported.add(found.line);
85
+ issues.push(outdatedSceneViewVersionIssue(artifactMatch[1], found.version, found.line));
86
+ });
87
+ return issues;
88
+ },
89
+ },
90
+ // ─── Compose Multiplatform dependency with Android API ──────────────────
91
+ {
92
+ id: "setup/sceneview-compose-android-api",
93
+ severity: "error",
94
+ check(code, lines) {
95
+ const composeDependency = /io\.github\.sceneview:sceneview-compose(?::[^\s"')]+)?/;
96
+ if (!composeDependency.test(code))
97
+ return [];
98
+ // A KMP module can declare the façade for commonMain AND the Android
99
+ // artifact for androidMain: the Android API is then on the classpath.
100
+ if (/io\.github\.sceneview:(?:sceneview|arsceneview)(?::|["'\s)]|$)/m.test(code))
101
+ return [];
102
+ // Comments and string literals are not API usage.
103
+ // Strings first, so a "https://…" literal is not read as a line comment.
104
+ const codeOnly = code
105
+ .replace(/"(?:\\.|[^"\\\n])*"/g, '""')
106
+ .replace(/\/\*[\s\S]*?\*\//g, " ")
107
+ .replace(/\/\/[^\n]*/g, " ");
108
+ const localNames = locallyDeclaredNames(codeOnly);
109
+ const androidImport = /\bimport\s+io\.github\.sceneview\.(?!compose(?:\.|\b))/;
110
+ const androidNames = [
111
+ "Scene",
112
+ "SceneView",
113
+ "ARScene",
114
+ "ARSceneView",
115
+ "PlacementScene",
116
+ "AutoPlacementScene",
117
+ "rememberEngine",
118
+ "rememberModelLoader",
119
+ "rememberModelInstance",
120
+ "rememberEnvironmentLoader",
121
+ "rememberMaterialLoader",
122
+ "rememberView",
123
+ "rememberARView",
124
+ "ModelNode",
125
+ "AnchorNode",
126
+ "CubeNode",
127
+ "LightNode",
128
+ ];
129
+ // A call (`Name(` or `Name {`) to an Android name the snippet does not declare itself.
130
+ const calledAndroidNames = androidNames.filter((name) => !localNames.has(name) && new RegExp(`\\b${name}\\s*[({]`).test(codeOnly));
131
+ if (!androidImport.test(codeOnly) && calledAndroidNames.length === 0)
132
+ return [];
133
+ const arNames = new Set([
134
+ "ARScene",
135
+ "ARSceneView",
136
+ "PlacementScene",
137
+ "AutoPlacementScene",
138
+ "rememberARView",
139
+ "AnchorNode",
140
+ ]);
141
+ const isAr = /\bimport\s+io\.github\.sceneview\.ar(?:\.|\b)/.test(codeOnly) ||
142
+ calledAndroidNames.some((name) => arNames.has(name));
143
+ const coordinate = isAr ? "io.github.sceneview:arsceneview" : "io.github.sceneview:sceneview";
144
+ return findLines(lines, composeDependency).map((line) => ({
145
+ severity: "error",
146
+ rule: "setup/sceneview-compose-android-api",
147
+ message: `\`sceneview-compose\` is the Compose Multiplatform \`SceneViewer\` façade and does not expose the Android \`io.github.sceneview.*\` API. Use \`${coordinate}\` instead.`,
148
+ line,
149
+ }));
150
+ },
151
+ },
17
152
  // ─── Threading ────────────────────────────────────────────────────────────
18
153
  {
19
154
  id: "threading/filament-off-main-thread",
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "sceneview-mcp",
3
- "version": "4.3.2",
3
+ "version": "4.3.4",
4
4
  "mcpName": "io.github.sceneview/mcp",
5
- "description": "MCP server for SceneView — cross-platform 3D & AR SDK for Android and iOS. Gives your AI coding assistant the full SceneView SDK so it writes correct, compilable code.",
5
+ "description": "MCP server for SceneView, the 3D & AR SDK for Android and the web. Gives your AI coding assistant the full SceneView SDK so it writes correct, compilable code.",
6
6
  "keywords": [
7
7
  "mcp",
8
8
  "model-context-protocol",