rbxstudio-mcp 1.12.1 → 1.12.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.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/studio-plugin/plugin.luau +14 -72
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -111,7 +111,7 @@ local screenGui = plugin:CreateDockWidgetPluginGuiAsync(
|
|
|
111
111
|
"MCPServerInterface",
|
|
112
112
|
DockWidgetPluginGuiInfo.new(Enum.InitialDockState.Float, false, false, 400, 500, 350, 450)
|
|
113
113
|
)
|
|
114
|
-
screenGui.Title = "MCP Server v1.12.
|
|
114
|
+
screenGui.Title = "MCP Server v1.12.2"
|
|
115
115
|
|
|
116
116
|
local mainFrame = Instance.new("Frame")
|
|
117
117
|
mainFrame.Size = UDim2.new(1, 0, 1, 0)
|
|
@@ -164,7 +164,7 @@ local versionLabel = Instance.new("TextLabel")
|
|
|
164
164
|
versionLabel.Size = UDim2.new(1, 0, 0, 16)
|
|
165
165
|
versionLabel.Position = UDim2.new(0, 0, 0, 32)
|
|
166
166
|
versionLabel.BackgroundTransparency = 1
|
|
167
|
-
versionLabel.Text = "AI Integration • v1.12.
|
|
167
|
+
versionLabel.Text = "AI Integration • v1.12.2"
|
|
168
168
|
versionLabel.TextColor3 = Color3.fromRGB(191, 219, 254)
|
|
169
169
|
versionLabel.TextScaled = false
|
|
170
170
|
versionLabel.TextSize = 12
|
|
@@ -2837,83 +2837,25 @@ local function countOccurrences(source, searchStr)
|
|
|
2837
2837
|
return count
|
|
2838
2838
|
end
|
|
2839
2839
|
|
|
2840
|
-
-- Helper:
|
|
2840
|
+
-- Helper: Real Lua syntax validation using loadstring (same as validate_script)
|
|
2841
2841
|
local function validateLuaSyntax(source)
|
|
2842
|
-
local
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
local openBlocks = 0
|
|
2847
|
-
local repeatBlocks = 0
|
|
2848
|
-
|
|
2849
|
-
-- Simple pattern-based checking for common errors
|
|
2850
|
-
for line in string.gmatch(source .. "\n", "([^\n]*)\n") do
|
|
2851
|
-
-- Count block starters
|
|
2852
|
-
if string.match(line, "^%s*function%s") or string.match(line, "=%s*function%s*%(") or string.match(line, "^%s*local%s+function%s") then
|
|
2853
|
-
openBlocks = openBlocks + 1
|
|
2854
|
-
end
|
|
2855
|
-
if string.match(line, "^%s*if%s") and not string.match(line, "%sthen%s+.+%send%s*$") then
|
|
2856
|
-
openBlocks = openBlocks + 1
|
|
2857
|
-
end
|
|
2858
|
-
if string.match(line, "^%s*for%s") and string.match(line, "%sdo%s*$") then
|
|
2859
|
-
openBlocks = openBlocks + 1
|
|
2860
|
-
end
|
|
2861
|
-
if string.match(line, "^%s*while%s") and string.match(line, "%sdo%s*$") then
|
|
2862
|
-
openBlocks = openBlocks + 1
|
|
2863
|
-
end
|
|
2864
|
-
if string.match(line, "^%s*repeat%s*$") then
|
|
2865
|
-
repeatBlocks = repeatBlocks + 1
|
|
2842
|
+
local success, result = pcall(function()
|
|
2843
|
+
local fn, err = loadstring(source)
|
|
2844
|
+
if err then
|
|
2845
|
+
return { valid = false, error = err }
|
|
2866
2846
|
end
|
|
2847
|
+
return { valid = true }
|
|
2848
|
+
end)
|
|
2867
2849
|
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
if not string.match(line, "^%s*%-%-") then -- Not a comment
|
|
2871
|
-
openBlocks = openBlocks - 1
|
|
2872
|
-
end
|
|
2873
|
-
end
|
|
2874
|
-
if string.match(line, "^%s*until%s") then
|
|
2875
|
-
repeatBlocks = repeatBlocks - 1
|
|
2876
|
-
end
|
|
2850
|
+
if not success then
|
|
2851
|
+
return false, { "Failed to validate: " .. tostring(result) }
|
|
2877
2852
|
end
|
|
2878
2853
|
|
|
2879
|
-
if
|
|
2880
|
-
|
|
2881
|
-
elseif openBlocks < 0 then
|
|
2882
|
-
table.insert(errors, "Extra " .. math.abs(openBlocks) .. " 'end' statement(s) - you have more 'end' keywords than block openers")
|
|
2883
|
-
end
|
|
2884
|
-
|
|
2885
|
-
if repeatBlocks > 0 then
|
|
2886
|
-
table.insert(errors, "Missing " .. repeatBlocks .. " 'until' statement(s) for repeat blocks")
|
|
2887
|
-
elseif repeatBlocks < 0 then
|
|
2888
|
-
table.insert(errors, "Extra " .. math.abs(repeatBlocks) .. " 'until' statement(s)")
|
|
2889
|
-
end
|
|
2890
|
-
|
|
2891
|
-
-- Check for unclosed strings (simple check)
|
|
2892
|
-
local inString = false
|
|
2893
|
-
local stringChar = nil
|
|
2894
|
-
local lineNum = 0
|
|
2895
|
-
for line in string.gmatch(source .. "\n", "([^\n]*)\n") do
|
|
2896
|
-
lineNum = lineNum + 1
|
|
2897
|
-
-- Skip long strings and comments for now
|
|
2898
|
-
if not string.match(line, "%[%[") and not string.match(line, "%-%-") then
|
|
2899
|
-
for i = 1, #line do
|
|
2900
|
-
local char = string.sub(line, i, i)
|
|
2901
|
-
if not inString then
|
|
2902
|
-
if char == '"' or char == "'" then
|
|
2903
|
-
inString = true
|
|
2904
|
-
stringChar = char
|
|
2905
|
-
end
|
|
2906
|
-
else
|
|
2907
|
-
if char == stringChar and string.sub(line, i-1, i-1) ~= "\\" then
|
|
2908
|
-
inString = false
|
|
2909
|
-
stringChar = nil
|
|
2910
|
-
end
|
|
2911
|
-
end
|
|
2912
|
-
end
|
|
2913
|
-
end
|
|
2854
|
+
if result.error then
|
|
2855
|
+
return false, { result.error }
|
|
2914
2856
|
end
|
|
2915
2857
|
|
|
2916
|
-
return
|
|
2858
|
+
return true, {}
|
|
2917
2859
|
end
|
|
2918
2860
|
|
|
2919
2861
|
-- edit_script: String-based editing like Claude Code's Edit tool
|