sceneview-mcp 4.1.1 → 4.1.2

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.
@@ -26,6 +26,10 @@ export const SYMBOLS = {
26
26
  "io.github.sceneview.ar.collaborative",
27
27
  "io.github.sceneview.ar.collaborative.CollaborativeMessage",
28
28
  "io.github.sceneview.ar.collaborative.LoopbackCollaborativeTransport",
29
+ "io.github.sceneview.ar.depth",
30
+ "io.github.sceneview.ar.depth.ArDepthFrame",
31
+ "io.github.sceneview.ar.depth.MlDepthState",
32
+ "io.github.sceneview.ar.depth.MonocularDepthEstimator",
29
33
  "io.github.sceneview.ar.light",
30
34
  "io.github.sceneview.ar.light.LightEstimator",
31
35
  "io.github.sceneview.ar.node",
@@ -122,6 +126,23 @@ export const SYMBOLS = {
122
126
  "union"
123
127
  ]
124
128
  },
129
+ "io.github.sceneview.CameraFit": {
130
+ "module": "sceneview",
131
+ "members": [
132
+ "component1",
133
+ "component2",
134
+ "copy",
135
+ "distance",
136
+ "equals",
137
+ "eye",
138
+ "getDistance",
139
+ "getEye",
140
+ "getTarget",
141
+ "hashCode",
142
+ "target",
143
+ "toString"
144
+ ]
145
+ },
125
146
  "io.github.sceneview.CinematicCameraProfile": {
126
147
  "module": "sceneview",
127
148
  "members": [
@@ -438,6 +459,31 @@ export const SYMBOLS = {
438
459
  "values"
439
460
  ]
440
461
  },
462
+ "io.github.sceneview.ViewportPadding": {
463
+ "module": "sceneview",
464
+ "members": [
465
+ "Companion",
466
+ "bottom",
467
+ "component1",
468
+ "component2",
469
+ "component3",
470
+ "component4",
471
+ "copy",
472
+ "equals",
473
+ "getBottom",
474
+ "getLeft",
475
+ "getRight",
476
+ "getTop",
477
+ "getZero",
478
+ "hashCode",
479
+ "isZero",
480
+ "left",
481
+ "right",
482
+ "toString",
483
+ "top",
484
+ "zero"
485
+ ]
486
+ },
441
487
  "io.github.sceneview.animation.AnimatableModel": {
442
488
  "module": "sceneview",
443
489
  "members": [
@@ -1534,17 +1580,42 @@ export const SYMBOLS = {
1534
1580
  "members": [
1535
1581
  "Companion",
1536
1582
  "FOUND_HOLD_MS",
1583
+ "HINT_MIN_SHOWN_MS",
1584
+ "HINT_STABLE_MS",
1537
1585
  "INITIALIZING_DELAY_MS",
1538
1586
  "MIN_DELAY_MS",
1587
+ "MIN_SHOWN_MS",
1588
+ "RECOVER_STABLE_MS",
1589
+ "REENTER_STABLE_MS",
1590
+ "SCAN_LINGER_MS",
1539
1591
  "cue",
1540
1592
  "getCue",
1593
+ "getHint",
1594
+ "getScanLingering",
1541
1595
  "getSurface",
1596
+ "hint",
1542
1597
  "isCoaching",
1543
1598
  "nextTransitionDelayMillis",
1599
+ "scanLingering",
1544
1600
  "surface",
1545
1601
  "update"
1546
1602
  ]
1547
1603
  },
1604
+ "io.github.sceneview.ar.ArTrackingHint": {
1605
+ "module": "arsceneview",
1606
+ "members": [
1607
+ "Companion",
1608
+ "LOW_DETAIL",
1609
+ "NONE",
1610
+ "TOO_DARK",
1611
+ "TOO_FAST",
1612
+ "entries",
1613
+ "from",
1614
+ "getEntries",
1615
+ "valueOf",
1616
+ "values"
1617
+ ]
1618
+ },
1548
1619
  "io.github.sceneview.ar.AssetTicket": {
1549
1620
  "module": "arsceneview",
1550
1621
  "members": [
@@ -1565,8 +1636,10 @@ export const SYMBOLS = {
1565
1636
  "members": [
1566
1637
  "createAnchor",
1567
1638
  "getPlane",
1639
+ "getPlaneOrNull",
1568
1640
  "getPose",
1569
1641
  "plane",
1642
+ "planeOrNull",
1570
1643
  "pose"
1571
1644
  ]
1572
1645
  },
@@ -1576,8 +1649,10 @@ export const SYMBOLS = {
1576
1649
  "anchor",
1577
1650
  "getAnchor",
1578
1651
  "getPlane",
1652
+ "getPlaneOrNull",
1579
1653
  "getPose",
1580
1654
  "plane",
1655
+ "planeOrNull",
1581
1656
  "pose"
1582
1657
  ]
1583
1658
  },
@@ -1602,6 +1677,7 @@ export const SYMBOLS = {
1602
1677
  "getScaleFactor",
1603
1678
  "getSelectionGeneration",
1604
1679
  "getSessionGeneration",
1680
+ "getShowsSelectionRing",
1605
1681
  "getTicket",
1606
1682
  "getWantsSurface",
1607
1683
  "hasCameraFrame",
@@ -1625,7 +1701,10 @@ export const SYMBOLS = {
1625
1701
  "selectPlacement",
1626
1702
  "selectionGeneration",
1627
1703
  "sessionGeneration",
1704
+ "setShowsSelectionRing",
1705
+ "showsSelectionRing",
1628
1706
  "ticket",
1707
+ "toggleBaseScale",
1629
1708
  "wantsSurface",
1630
1709
  "withdrawRequest"
1631
1710
  ]
@@ -2628,6 +2707,203 @@ export const SYMBOLS = {
2628
2707
  "translation"
2629
2708
  ]
2630
2709
  },
2710
+ "io.github.sceneview.ar.depth.ArDepthFrame": {
2711
+ "module": "arsceneview",
2712
+ "members": [
2713
+ "MAX_U16",
2714
+ "MAX_U8",
2715
+ "MM_PER_METER",
2716
+ "cameraPose",
2717
+ "confidence",
2718
+ "confidenceAt",
2719
+ "depthMetersAt",
2720
+ "getCameraPose",
2721
+ "getConfidence",
2722
+ "getHeight",
2723
+ "getIntrinsics",
2724
+ "getMillimetres",
2725
+ "getSource",
2726
+ "getTimestampNs",
2727
+ "getWidth",
2728
+ "height",
2729
+ "intrinsics",
2730
+ "millimetres",
2731
+ "source",
2732
+ "timestampNs",
2733
+ "width"
2734
+ ]
2735
+ },
2736
+ "io.github.sceneview.ar.depth.ArDepthFrame.Source": {
2737
+ "module": "arsceneview",
2738
+ "members": [
2739
+ "Ml",
2740
+ "Native",
2741
+ "entries",
2742
+ "getEntries",
2743
+ "valueOf",
2744
+ "values"
2745
+ ]
2746
+ },
2747
+ "io.github.sceneview.ar.depth.DepthIntrinsics": {
2748
+ "module": "arsceneview",
2749
+ "members": [
2750
+ "component1",
2751
+ "component2",
2752
+ "component3",
2753
+ "component4",
2754
+ "copy",
2755
+ "cx",
2756
+ "cy",
2757
+ "equals",
2758
+ "fx",
2759
+ "fy",
2760
+ "getCx",
2761
+ "getCy",
2762
+ "getFx",
2763
+ "getFy",
2764
+ "hashCode",
2765
+ "toString"
2766
+ ]
2767
+ },
2768
+ "io.github.sceneview.ar.depth.MlDepthSession": {
2769
+ "module": "arsceneview",
2770
+ "members": [
2771
+ "CAPTURE_POOL",
2772
+ "MAX_ANCHORS",
2773
+ "MAX_CONSECUTIVE_ERRORS",
2774
+ "MAX_PLANES",
2775
+ "MS_PER_SECOND",
2776
+ "NANOS_PER_MS",
2777
+ "NANOS_PER_SECOND",
2778
+ "OUTPUT_POOL",
2779
+ "STATS_WINDOW",
2780
+ "STILL_ROTATION_RAD",
2781
+ "STILL_TRANSLATION_M",
2782
+ "TAG",
2783
+ "close",
2784
+ "depthFrames",
2785
+ "getDepthFrames",
2786
+ "getState",
2787
+ "onSessionUpdated",
2788
+ "state"
2789
+ ]
2790
+ },
2791
+ "io.github.sceneview.ar.depth.MlDepthState": {
2792
+ "module": "arsceneview",
2793
+ "members": []
2794
+ },
2795
+ "io.github.sceneview.ar.depth.MlDepthState.Failed": {
2796
+ "module": "arsceneview",
2797
+ "members": [
2798
+ "component1",
2799
+ "copy",
2800
+ "equals",
2801
+ "error",
2802
+ "getError",
2803
+ "hashCode",
2804
+ "toString"
2805
+ ]
2806
+ },
2807
+ "io.github.sceneview.ar.depth.MlDepthState.Preparing": {
2808
+ "module": "arsceneview",
2809
+ "members": [
2810
+ "INSTANCE",
2811
+ "equals",
2812
+ "hashCode",
2813
+ "toString"
2814
+ ]
2815
+ },
2816
+ "io.github.sceneview.ar.depth.MlDepthState.Running": {
2817
+ "module": "arsceneview",
2818
+ "members": [
2819
+ "component1",
2820
+ "copy",
2821
+ "equals",
2822
+ "getStats",
2823
+ "hashCode",
2824
+ "stats",
2825
+ "toString"
2826
+ ]
2827
+ },
2828
+ "io.github.sceneview.ar.depth.MlDepthState.Throttled": {
2829
+ "module": "arsceneview",
2830
+ "members": [
2831
+ "INSTANCE",
2832
+ "equals",
2833
+ "hashCode",
2834
+ "toString"
2835
+ ]
2836
+ },
2837
+ "io.github.sceneview.ar.depth.MlDepthState.WaitingForAnchors": {
2838
+ "module": "arsceneview",
2839
+ "members": [
2840
+ "anchors",
2841
+ "component1",
2842
+ "copy",
2843
+ "equals",
2844
+ "getAnchors",
2845
+ "hashCode",
2846
+ "toString"
2847
+ ]
2848
+ },
2849
+ "io.github.sceneview.ar.depth.MlDepthStats": {
2850
+ "module": "arsceneview",
2851
+ "members": [
2852
+ "anchors",
2853
+ "component1",
2854
+ "component2",
2855
+ "component3",
2856
+ "component4",
2857
+ "component5",
2858
+ "component6",
2859
+ "component7",
2860
+ "copy",
2861
+ "equals",
2862
+ "getAnchors",
2863
+ "getHolding",
2864
+ "getInliers",
2865
+ "getLastInferenceMs",
2866
+ "getMedianInferenceMs",
2867
+ "getPublishedHz",
2868
+ "getRmsRelativeError",
2869
+ "hashCode",
2870
+ "holding",
2871
+ "inliers",
2872
+ "lastInferenceMs",
2873
+ "medianInferenceMs",
2874
+ "publishedHz",
2875
+ "rmsRelativeError",
2876
+ "toString"
2877
+ ]
2878
+ },
2879
+ "io.github.sceneview.ar.depth.MonocularDepthEstimator": {
2880
+ "module": "arsceneview",
2881
+ "members": [
2882
+ "estimate",
2883
+ "getInputHeight",
2884
+ "getInputWidth",
2885
+ "getOutputHeight",
2886
+ "getOutputKind",
2887
+ "getOutputWidth",
2888
+ "inputHeight",
2889
+ "inputWidth",
2890
+ "outputHeight",
2891
+ "outputKind",
2892
+ "outputWidth",
2893
+ "warmUp"
2894
+ ]
2895
+ },
2896
+ "io.github.sceneview.ar.depth.MonocularDepthEstimator.OutputKind": {
2897
+ "module": "arsceneview",
2898
+ "members": [
2899
+ "AffineInverse",
2900
+ "Metric",
2901
+ "entries",
2902
+ "getEntries",
2903
+ "valueOf",
2904
+ "values"
2905
+ ]
2906
+ },
2631
2907
  "io.github.sceneview.ar.light.LightEstimator": {
2632
2908
  "module": "arsceneview",
2633
2909
  "members": [
@@ -2695,7 +2971,9 @@ export const SYMBOLS = {
2695
2971
  "io.github.sceneview.ar.node.ARCameraNode": {
2696
2972
  "module": "arsceneview",
2697
2973
  "members": [
2974
+ "contentPadding",
2698
2975
  "frame",
2976
+ "getContentPadding",
2699
2977
  "getFrame",
2700
2978
  "getPose",
2701
2979
  "getSession",
@@ -2704,6 +2982,7 @@ export const SYMBOLS = {
2704
2982
  "onTrackingStateChanged",
2705
2983
  "pose",
2706
2984
  "session",
2985
+ "setContentPadding",
2707
2986
  "setFrame",
2708
2987
  "setSession",
2709
2988
  "trackingState",
@@ -5937,6 +6216,7 @@ export const SYMBOLS = {
5937
6216
  "members": [
5938
6217
  "aperture",
5939
6218
  "camera",
6219
+ "contentPadding",
5940
6220
  "cullingFar",
5941
6221
  "cullingProjectionTransform",
5942
6222
  "customProjection",
@@ -5949,6 +6229,7 @@ export const SYMBOLS = {
5949
6229
  "forwardDirection",
5950
6230
  "getAperture",
5951
6231
  "getCamera",
6232
+ "getContentPadding",
5952
6233
  "getCullingFar",
5953
6234
  "getCullingProjectionTransform",
5954
6235
  "getFar",
@@ -5983,6 +6264,7 @@ export const SYMBOLS = {
5983
6264
  "scaling",
5984
6265
  "screenPointToRay",
5985
6266
  "sensitivity",
6267
+ "setContentPadding",
5986
6268
  "setCustomProjection",
5987
6269
  "setEditable",
5988
6270
  "setExposure",
@@ -6606,6 +6888,7 @@ export const SYMBOLS = {
6606
6888
  "smoothTransform",
6607
6889
  "smoothTransformEnabled",
6608
6890
  "smoothTransformSpeed",
6891
+ "takeTouchStreamHandBack",
6609
6892
  "touchable",
6610
6893
  "transform",
6611
6894
  "transformInstance",
@@ -7003,6 +7286,7 @@ export const SYMBOLS = {
7003
7286
  "setTouchForwardingEnabled",
7004
7287
  "setViewSize",
7005
7288
  "stream",
7289
+ "takeTouchStreamHandBack",
7006
7290
  "texture",
7007
7291
  "touchForwardingEnabled",
7008
7292
  "updateGeometrySize",
@@ -7014,7 +7298,8 @@ export const SYMBOLS = {
7014
7298
  "module": "sceneview",
7015
7299
  "members": [
7016
7300
  "invalidateChildInParent",
7017
- "onDescendantInvalidated"
7301
+ "onDescendantInvalidated",
7302
+ "requestDisallowInterceptTouchEvent"
7018
7303
  ]
7019
7304
  },
7020
7305
  "io.github.sceneview.node.ViewNode.WindowManager": {
@@ -7698,6 +7983,9 @@ export const SYMBOLS = {
7698
7983
  "DEFAULT_FRAMING_ELEVATION_DEGREES": [
7699
7984
  "sceneview"
7700
7985
  ],
7986
+ "DEFAULT_FRAMING_FILL": [
7987
+ "sceneview"
7988
+ ],
7701
7989
  "DEFAULT_FRAMING_PADDING": [
7702
7990
  "sceneview"
7703
7991
  ],
@@ -8241,12 +8529,18 @@ export const SYMBOLS = {
8241
8529
  "firstByTypeOrNull": [
8242
8530
  "arsceneview"
8243
8531
  ],
8532
+ "fitCameraToBounds": [
8533
+ "sceneview"
8534
+ ],
8244
8535
  "fitDistanceForBounds": [
8245
8536
  "sceneview"
8246
8537
  ],
8247
8538
  "fitDistanceForContent": [
8248
8539
  "sceneview"
8249
8540
  ],
8541
+ "fitToBounds": [
8542
+ "sceneview"
8543
+ ],
8250
8544
  "flatten": [
8251
8545
  "sceneview"
8252
8546
  ],
@@ -8263,6 +8557,9 @@ export const SYMBOLS = {
8263
8557
  "fractionToTime": [
8264
8558
  "sceneview-core"
8265
8559
  ],
8560
+ "frame": [
8561
+ "sceneview"
8562
+ ],
8266
8563
  "frameCount": [
8267
8564
  "sceneview-core"
8268
8565
  ],
@@ -8460,6 +8757,9 @@ export const SYMBOLS = {
8460
8757
  "arsceneview",
8461
8758
  "sceneview"
8462
8759
  ],
8760
+ "getPostProjectionTransform": [
8761
+ "sceneview"
8762
+ ],
8463
8763
  "getProjectionTransform": [
8464
8764
  "arsceneview",
8465
8765
  "sceneview"
@@ -8496,6 +8796,12 @@ export const SYMBOLS = {
8496
8796
  "getRenderablesPrimitiveCounts": [
8497
8797
  "sceneview"
8498
8798
  ],
8799
+ "getRenderedCullingProjectionTransform": [
8800
+ "sceneview"
8801
+ ],
8802
+ "getRenderedProjectionTransform": [
8803
+ "sceneview"
8804
+ ],
8499
8805
  "getResourceUri": [
8500
8806
  "sceneview"
8501
8807
  ],
@@ -8508,6 +8814,9 @@ export const SYMBOLS = {
8508
8814
  "getScaling": [
8509
8815
  "sceneview"
8510
8816
  ],
8817
+ "getShift": [
8818
+ "sceneview"
8819
+ ],
8511
8820
  "getSize": [
8512
8821
  "sceneview"
8513
8822
  ],
@@ -8836,6 +9145,9 @@ export const SYMBOLS = {
8836
9145
  "arsceneview",
8837
9146
  "sceneview"
8838
9147
  ],
9148
+ "postProjectionTransform": [
9149
+ "sceneview"
9150
+ ],
8839
9151
  "priority": [
8840
9152
  "sceneview"
8841
9153
  ],
@@ -9040,6 +9352,15 @@ export const SYMBOLS = {
9040
9352
  "renderablesPrimitiveCounts": [
9041
9353
  "sceneview"
9042
9354
  ],
9355
+ "renderedCullingProjectionTransform": [
9356
+ "sceneview"
9357
+ ],
9358
+ "renderedProjectionTransform": [
9359
+ "sceneview"
9360
+ ],
9361
+ "replayHandedBackDown": [
9362
+ "sceneview"
9363
+ ],
9043
9364
  "resourceUri": [
9044
9365
  "sceneview"
9045
9366
  ],
@@ -9406,6 +9727,9 @@ export const SYMBOLS = {
9406
9727
  "shadowReceiver": [
9407
9728
  "sceneview"
9408
9729
  ],
9730
+ "shift": [
9731
+ "sceneview"
9732
+ ],
9409
9733
  "shouldShowReticle": [
9410
9734
  "arsceneview"
9411
9735
  ],
@@ -4,8 +4,8 @@
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.1.1";
8
- export const LATEST_SCENEVIEW_RELEASE = "4.50.0";
7
+ export const PACKAGE_VERSION = "4.1.2";
8
+ export const LATEST_SCENEVIEW_RELEASE = "4.53.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,
11
11
  // and a caret range against an unpublished version cannot be resolved.
package/dist/samples.js CHANGED
@@ -23,7 +23,7 @@ fun ModelViewerScreen() {
23
23
  mainLightNode = rememberMainLightNode(engine) { intensity = 100_000f },
24
24
  cameraManipulator = rememberCameraManipulator()
25
25
  ) {
26
- rememberModelInstance(modelLoader, "models/damaged_helmet.glb")?.let { instance ->
26
+ rememberModelInstance(modelLoader, "models/toy_car.glb")?.let { instance ->
27
27
  ModelNode(
28
28
  modelInstance = instance,
29
29
  scaleToUnits = 1.0f,
@@ -45,7 +45,7 @@ fun ModelViewerScreen() {
45
45
  fun ARModelViewerScreen() {
46
46
  val engine = rememberEngine()
47
47
  val modelLoader = rememberModelLoader(engine)
48
- val modelInstance = rememberModelInstance(modelLoader, "models/damaged_helmet.glb")
48
+ val modelInstance = rememberModelInstance(modelLoader, "models/toy_car.glb")
49
49
  var anchor by remember { mutableStateOf<Anchor?>(null) }
50
50
 
51
51
  ARSceneView(
@@ -291,7 +291,7 @@ fun CameraManipulatorScreen() {
291
291
  targetPosition = Position(0f)
292
292
  )
293
293
  ) {
294
- rememberModelInstance(modelLoader, "models/damaged_helmet.glb")?.let { instance ->
294
+ rememberModelInstance(modelLoader, "models/toy_car.glb")?.let { instance ->
295
295
  ModelNode(modelInstance = instance, scaleToUnits = 1.0f)
296
296
  }
297
297
  }
@@ -345,7 +345,7 @@ fun CameraAnimationScreen() {
345
345
  },
346
346
  mainLightNode = rememberMainLightNode(engine) { intensity = 100_000f }
347
347
  ) {
348
- rememberModelInstance(modelLoader, "models/damaged_helmet.glb")?.let { instance ->
348
+ rememberModelInstance(modelLoader, "models/toy_car.glb")?.let { instance ->
349
349
  ModelNode(modelInstance = instance, scaleToUnits = 1.0f)
350
350
  }
351
351
  }
@@ -795,7 +795,7 @@ fun PostProcessingScreen() {
795
795
  modelLoader = modelLoader,
796
796
  view = view
797
797
  ) {
798
- rememberModelInstance(modelLoader, "models/damaged_helmet.glb")?.let { instance ->
798
+ rememberModelInstance(modelLoader, "models/toy_car.glb")?.let { instance ->
799
799
  ModelNode(modelInstance = instance, scaleToUnits = 1.0f)
800
800
  }
801
801
  }
@@ -962,7 +962,7 @@ fun GestureInteractionScreen() {
962
962
  }
963
963
  )
964
964
  ) {
965
- rememberModelInstance(modelLoader, "models/damaged_helmet.glb")?.let { instance ->
965
+ rememberModelInstance(modelLoader, "models/toy_car.glb")?.let { instance ->
966
966
  ModelNode(
967
967
  modelInstance = instance,
968
968
  scaleToUnits = 1.0f,
@@ -1023,7 +1023,7 @@ fun EnvironmentLightingScreen() {
1023
1023
  PlaneNode(size = Size(10f, 10f), materialInstance = floorMat)
1024
1024
 
1025
1025
  // Model
1026
- rememberModelInstance(modelLoader, "models/damaged_helmet.glb")?.let { instance ->
1026
+ rememberModelInstance(modelLoader, "models/toy_car.glb")?.let { instance ->
1027
1027
  ModelNode(modelInstance = instance, scaleToUnits = 1.0f, position = Position(y = 0.5f))
1028
1028
  }
1029
1029
 
@@ -1154,7 +1154,7 @@ fun ComposeUI3DScreen() {
1154
1154
  viewNodeWindowManager = windowManager
1155
1155
  ) {
1156
1156
  // 3D model behind the UI
1157
- rememberModelInstance(modelLoader, "models/damaged_helmet.glb")?.let { instance ->
1157
+ rememberModelInstance(modelLoader, "models/toy_car.glb")?.let { instance ->
1158
1158
  ModelNode(modelInstance = instance, scaleToUnits = 1.0f, position = Position(z = -1f))
1159
1159
  }
1160
1160
 
@@ -1784,7 +1784,7 @@ fun BillboardSpriteScreen() {
1784
1784
  mainLightNode = rememberMainLightNode(engine) { intensity = 100_000f }
1785
1785
  ) {
1786
1786
  // A model with billboard markers above it
1787
- rememberModelInstance(modelLoader, "models/damaged_helmet.glb")?.let { instance ->
1787
+ rememberModelInstance(modelLoader, "models/toy_car.glb")?.let { instance ->
1788
1788
  ModelNode(modelInstance = instance, scaleToUnits = 1.0f)
1789
1789
  }
1790
1790
 
@@ -39,34 +39,11 @@ import { formatValidationReport, validateCode } from "../validator.js";
39
39
  import { WIDGET_3D_VIEWER_URI } from "../widgets.js";
40
40
  // ─── Legal disclaimer (identical to index.ts 4.0.0) ─────────────────────
41
41
  const DISCLAIMER = "\n\n---\n*Generated code suggestion. Review before use in production. See [TERMS.md](https://github.com/sceneview/sceneview/blob/main/mcp/TERMS.md).*";
42
- // ─── Sponsor CTA (shown every N tool calls, opt-out via env var) ────────────
43
- //
44
- // One line, every `SPONSOR_CTA_INTERVAL` tool calls, pointing at the donation
45
- // page. Disabled by setting `SCENEVIEW_SPONSOR_CTA=0`. The counter is
46
- // module-scoped (per MCP process lifetime), not persisted.
47
- //
48
- // One link only: an assistant's answer is a bad place for a menu, and Open
49
- // Collective is the channel that actually receives donations. GitHub Sponsors
50
- // stays listed in the README and on the site.
51
- const SPONSOR_CTA_INTERVAL = 10;
52
- const SPONSOR_CTA = "\n\n💙 *Building SceneView is a one-dev labor of love. If it saved you time, consider [supporting it on Open Collective](https://opencollective.com/sceneview).*";
53
- let toolCallCount = 0;
54
- /** Test-only: reset the module-scoped counter between test cases. */
55
- export function __resetSponsorCounter() {
56
- toolCallCount = 0;
57
- }
58
- function shouldShowSponsorCta() {
59
- if (process.env.SCENEVIEW_SPONSOR_CTA === "0")
60
- return false;
61
- toolCallCount += 1;
62
- return toolCallCount % SPONSOR_CTA_INTERVAL === 0;
63
- }
64
42
  function withDisclaimer(content) {
65
43
  if (content.length === 0)
66
44
  return content;
67
45
  const last = content[content.length - 1];
68
- const suffix = DISCLAIMER + (shouldShowSponsorCta() ? SPONSOR_CTA : "");
69
- return [...content.slice(0, -1), { ...last, text: last.text + suffix }];
46
+ return [...content.slice(0, -1), { ...last, text: last.text + DISCLAIMER }];
70
47
  }
71
48
  // ─── llms.txt-derived state ──────────────────────────────────────────────────
72
49
  /** Raw API docs markdown — exported for the `sceneview://api` resource. */
@@ -6,7 +6,7 @@
6
6
  * `handler.ts` directly.
7
7
  */
8
8
  export { TOOL_DEFINITIONS } from "./definitions.js";
9
- export { __resetSponsorCounter, API_DOCS, dispatchTool } from "./handler.js";
9
+ export { API_DOCS, dispatchTool } from "./handler.js";
10
10
  import { TOOL_DEFINITIONS } from "./definitions.js";
11
11
  /** Returns the full tool definition list (read-only copy). */
12
12
  export function getAllTools() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sceneview-mcp",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "mcpName": "io.github.sceneview/mcp",
5
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.",
6
6
  "keywords": [