@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
@@ -0,0 +1,86 @@
1
+ --!strict
2
+ --[[
3
+ Keeps a typed secret out of everything that remembers.
4
+
5
+ The panel is built to remember what you type. The line is echoed into the log
6
+ under "you", it goes into the up-arrow history, the log can be copied to the
7
+ clipboard with `copy`, and the whole widget ends up in screenshots -- which
8
+ this very server takes on request. Every one of those is correct behaviour
9
+ for `theme dark` and a disaster for an API key: a credential that can publish
10
+ assets under the user's name would sit in a scrollback that gets pasted into
11
+ a bug report.
12
+
13
+ So the one command that carries a secret is masked at every point where a
14
+ line is kept, and that masking lives here rather than in `Commands` because
15
+ two unrelated files -- the echo and the history -- both have to do it, and a
16
+ secret protected in one of two places is not protected.
17
+
18
+ Masking, not dropping. `cloud key ****` in the log still tells the user that
19
+ the command ran; a line that vanished would read as the panel ignoring them,
20
+ and the next thing a person does about that is type it again.
21
+ ]]
22
+
23
+ local Secret = {}
24
+
25
+ --[[
26
+ Commands whose arguments are secret, and from which word onwards.
27
+
28
+ Keyed by "command subcommand" so `cloud key <secret>` is covered and `cloud
29
+ test` -- which carries nothing -- is not masked into uselessness. The user id
30
+ is masked too. It is not a credential and it is on a public profile URL, but
31
+ it names the account the key belongs to, and a screenshot showing both is
32
+ worth more to somebody than a screenshot showing either.
33
+ ]]
34
+ --[[
35
+ Commands whose arguments are secret, and from which word onwards.
36
+
37
+ Keyed by "command subcommand" so `cloud key <secret>` is covered and `cloud
38
+ test` -- which carries nothing -- is not masked into uselessness.
39
+
40
+ ONLY the key. The user, group, universe and place ids were masked here too
41
+ at first, which was theatre: they are public -- a user id is in the profile
42
+ URL and a universe id is on the game's dashboard page -- and the reply that
43
+ confirms each one prints it back in full anyway, so the dots hid a value
44
+ from the same log line that then showed it. Masking something that is about
45
+ to be displayed teaches a reader that the dots mean nothing, which is
46
+ exactly the wrong lesson for the one line where they do.
47
+ ]]
48
+ local SECRET_FROM: { [string]: number } = {
49
+ ["cloud key"] = 3,
50
+ }
51
+
52
+ --[[
53
+ Returns the line as it is safe to display, and whether anything was hidden.
54
+
55
+ The caller gets the flag because "this was masked" is worth saying once, next
56
+ to the echoed line -- otherwise a user who sees dots where they typed a key
57
+ cannot tell whether the panel hid it or mangled it.
58
+ ]]
59
+ function Secret.mask(line: string): (string, boolean)
60
+ local words: { string } = {}
61
+ for word in string.gmatch(line, "%S+") do
62
+ table.insert(words, word)
63
+ end
64
+ if #words < 2 then
65
+ return line, false
66
+ end
67
+
68
+ local from = SECRET_FROM[string.lower(words[1]) .. " " .. string.lower(words[2])]
69
+ if from == nil or #words < from then
70
+ return line, false
71
+ end
72
+
73
+ --[[
74
+ One fixed marker for everything from `from` on, not one per character
75
+ and not one per word.
76
+
77
+ Length is information: eight dots against thirty says which of two things
78
+ was typed, and for a key it narrows a guess. Every masked value looks
79
+ identical, whatever was actually there.
80
+ ]]
81
+ local masked = table.move(words, 1, from - 1, 1, {} :: { string })
82
+ table.insert(masked, "••••••••")
83
+ return table.concat(masked, " "), true
84
+ end
85
+
86
+ return Secret