@el4cteo/rbx-studio-mcp 0.6.5 → 0.6.8

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.
Files changed (46) hide show
  1. package/README.md +28 -2
  2. package/dist/bridge/console.js +182 -0
  3. package/dist/bridge/console.js.map +1 -1
  4. package/dist/index.js +4 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/cloudassets.js +233 -0
  7. package/dist/lib/cloudassets.js.map +1 -0
  8. package/dist/lib/credentials.js +180 -0
  9. package/dist/lib/credentials.js.map +1 -0
  10. package/dist/lib/livedata.js +325 -0
  11. package/dist/lib/livedata.js.map +1 -0
  12. package/dist/lib/liveluau.js +83 -0
  13. package/dist/lib/liveluau.js.map +1 -0
  14. package/dist/lib/liveops.js +358 -0
  15. package/dist/lib/liveops.js.map +1 -0
  16. package/dist/lib/opencloud.js +290 -0
  17. package/dist/lib/opencloud.js.map +1 -0
  18. package/dist/tools/audio.js +96 -0
  19. package/dist/tools/audio.js.map +1 -0
  20. package/dist/tools/data.js +133 -3
  21. package/dist/tools/data.js.map +1 -1
  22. package/dist/tools/exec.js +56 -1
  23. package/dist/tools/exec.js.map +1 -1
  24. package/dist/tools/scripts.js +124 -4
  25. package/dist/tools/scripts.js.map +1 -1
  26. package/dist/tools/spatial.js +135 -0
  27. package/dist/tools/spatial.js.map +1 -0
  28. package/dist/tools/universe.js +182 -0
  29. package/dist/tools/universe.js.map +1 -0
  30. package/dist/tools/upload.js +294 -0
  31. package/dist/tools/upload.js.map +1 -0
  32. package/dist/tools/world.js +361 -10
  33. package/dist/tools/world.js.map +1 -1
  34. package/package.json +74 -74
  35. package/plugin/src/Commands.luau +646 -622
  36. package/plugin/src/Config.luau +65 -65
  37. package/plugin/src/Phrase.luau +816 -766
  38. package/plugin/src/Prompt.luau +965 -961
  39. package/plugin/src/Secret.luau +86 -0
  40. package/plugin/src/Serialize.luau +759 -499
  41. package/plugin/src/handlers/Assets.luau +636 -587
  42. package/plugin/src/handlers/Audio.luau +411 -0
  43. package/plugin/src/handlers/Geometry.luau +722 -577
  44. package/plugin/src/handlers/Instances.luau +84 -4
  45. package/plugin/src/handlers/Spatial.luau +334 -0
  46. package/plugin/src/init.server.luau +883 -879
@@ -1,65 +1,65 @@
1
- --!strict
2
- --[[
3
- Connection settings for the Studio MCP plugin.
4
-
5
- The port must match the one the Node server was started with (`--port`, or
6
- the ROBLOX_STUDIO_MCP_PORT environment variable). It is stored as a plugin
7
- setting so a user running on a non-default port only has to set it once.
8
- ]]
9
-
10
- local Config = {}
11
-
12
- Config.PLUGIN_VERSION = "0.6.5"
13
-
14
- -- Fingerprint of plugin/src, stamped in by scripts/build-plugin.mjs. The server
15
- -- computes the same hash from its own copy of the sources and compares, so a
16
- -- plugin left running from an older build is reported rather than silently
17
- -- answering with stale handlers. Stays "dev" when the tree is loaded unbuilt.
18
- Config.BUILD_ID = "dev"
19
- Config.PROTOCOL_VERSION = 1
20
- Config.DEFAULT_PORT = 44755
21
-
22
- -- Header the bridge requires on every request. A web page cannot set it
23
- -- cross-origin without a preflight the bridge never answers, which is what
24
- -- keeps a malicious site from driving Studio through the loopback port.
25
- Config.CLIENT_HEADER = "x-roblox-studio-mcp"
26
-
27
- -- How long to wait before retrying after the stream drops. Studio closes SSE
28
- -- connections at the 30 minute mark, so reconnects are routine, not exceptional.
29
- Config.RECONNECT_DELAY = 1
30
- Config.MAX_RECONNECT_DELAY = 30
31
-
32
- -- How long a connection has to last before it counts as having worked, rather
33
- -- than as one more failure to back off from. Comfortably longer than a failed
34
- -- handshake against a dead port, which resolves in milliseconds, and far shorter
35
- -- than any connection that carried a single command.
36
- Config.HEALTHY_CONNECTION = 10
37
-
38
- -- How long a healthy long-poll session runs before standing aside so streaming
39
- -- can be tried again. Long enough that a Studio which genuinely cannot stream
40
- -- is not reconnecting constantly, short enough that a session downgraded by one
41
- -- unlucky attempt does not spend the rest of its life slower than it should be.
42
- Config.RESTREAM_INTERVAL = 60
43
-
44
- local port: number? = nil
45
-
46
- function Config.setPort(value: number)
47
- port = value
48
- end
49
-
50
- function Config.getPort(): number
51
- return port or Config.DEFAULT_PORT
52
- end
53
-
54
- function Config.baseUrl(): string
55
- return string.format("http://127.0.0.1:%d", Config.getPort())
56
- end
57
-
58
- function Config.headers(): { [string]: string }
59
- return {
60
- [Config.CLIENT_HEADER] = tostring(Config.PROTOCOL_VERSION),
61
- ["Content-Type"] = "application/json",
62
- }
63
- end
64
-
65
- return Config
1
+ --!strict
2
+ --[[
3
+ Connection settings for the Studio MCP plugin.
4
+
5
+ The port must match the one the Node server was started with (`--port`, or
6
+ the ROBLOX_STUDIO_MCP_PORT environment variable). It is stored as a plugin
7
+ setting so a user running on a non-default port only has to set it once.
8
+ ]]
9
+
10
+ local Config = {}
11
+
12
+ Config.PLUGIN_VERSION = "0.6.8"
13
+
14
+ -- Fingerprint of plugin/src, stamped in by scripts/build-plugin.mjs. The server
15
+ -- computes the same hash from its own copy of the sources and compares, so a
16
+ -- plugin left running from an older build is reported rather than silently
17
+ -- answering with stale handlers. Stays "dev" when the tree is loaded unbuilt.
18
+ Config.BUILD_ID = "dev"
19
+ Config.PROTOCOL_VERSION = 1
20
+ Config.DEFAULT_PORT = 44755
21
+
22
+ -- Header the bridge requires on every request. A web page cannot set it
23
+ -- cross-origin without a preflight the bridge never answers, which is what
24
+ -- keeps a malicious site from driving Studio through the loopback port.
25
+ Config.CLIENT_HEADER = "x-roblox-studio-mcp"
26
+
27
+ -- How long to wait before retrying after the stream drops. Studio closes SSE
28
+ -- connections at the 30 minute mark, so reconnects are routine, not exceptional.
29
+ Config.RECONNECT_DELAY = 1
30
+ Config.MAX_RECONNECT_DELAY = 30
31
+
32
+ -- How long a connection has to last before it counts as having worked, rather
33
+ -- than as one more failure to back off from. Comfortably longer than a failed
34
+ -- handshake against a dead port, which resolves in milliseconds, and far shorter
35
+ -- than any connection that carried a single command.
36
+ Config.HEALTHY_CONNECTION = 10
37
+
38
+ -- How long a healthy long-poll session runs before standing aside so streaming
39
+ -- can be tried again. Long enough that a Studio which genuinely cannot stream
40
+ -- is not reconnecting constantly, short enough that a session downgraded by one
41
+ -- unlucky attempt does not spend the rest of its life slower than it should be.
42
+ Config.RESTREAM_INTERVAL = 60
43
+
44
+ local port: number? = nil
45
+
46
+ function Config.setPort(value: number)
47
+ port = value
48
+ end
49
+
50
+ function Config.getPort(): number
51
+ return port or Config.DEFAULT_PORT
52
+ end
53
+
54
+ function Config.baseUrl(): string
55
+ return string.format("http://127.0.0.1:%d", Config.getPort())
56
+ end
57
+
58
+ function Config.headers(): { [string]: string }
59
+ return {
60
+ [Config.CLIENT_HEADER] = tostring(Config.PROTOCOL_VERSION),
61
+ ["Content-Type"] = "application/json",
62
+ }
63
+ end
64
+
65
+ return Config