@el4cteo/rbx-studio-mcp 0.6.8 → 0.7.0
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/README.md +2 -2
- package/dist/bridge/harness.js +39 -12
- package/dist/bridge/harness.js.map +1 -1
- package/dist/bridge/rpc.js +26 -6
- package/dist/bridge/rpc.js.map +1 -1
- package/dist/bridge/server.js +12 -4
- package/dist/bridge/server.js.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/tools/exec.js +5 -4
- package/dist/tools/exec.js.map +1 -1
- package/dist/tools/scripts.js +4 -2
- package/dist/tools/scripts.js.map +1 -1
- package/dist/tools/world.js +11 -3
- package/dist/tools/world.js.map +1 -1
- package/package.json +74 -74
- package/plugin/src/Config.luau +65 -65
- package/plugin/src/Serialize.luau +10 -0
- package/plugin/src/TextEdit.luau +6 -6
- package/plugin/src/handlers/Discover.luau +690 -685
- package/plugin/src/handlers/Exec.luau +5 -1
- package/plugin/src/handlers/Scripts.luau +677 -673
- package/plugin/src/handlers/Terrain.luau +371 -371
- package/scripts/test-bridge.mjs +328 -267
- package/scripts/test-console.mjs +592 -560
- package/scripts/test-server.mjs +60 -0
package/plugin/src/TextEdit.luau
CHANGED
|
@@ -98,7 +98,7 @@ function TextEdit.validate(edit: Edit, position: number)
|
|
|
98
98
|
if typeof(edit.path) ~= "string" or edit.path == "" then
|
|
99
99
|
Dispatch.fail(
|
|
100
100
|
"BAD_PARAMS",
|
|
101
|
-
string.format("edits[%d] has no `path`.", position),
|
|
101
|
+
string.format("edits[%d] has no `path`.", position - 1),
|
|
102
102
|
'Every edit needs the path of the script to change, e.g. "ServerScriptService.Main".'
|
|
103
103
|
)
|
|
104
104
|
end
|
|
@@ -117,7 +117,7 @@ function TextEdit.validate(edit: Edit, position: number)
|
|
|
117
117
|
if modes == 0 then
|
|
118
118
|
Dispatch.fail(
|
|
119
119
|
"BAD_PARAMS",
|
|
120
|
-
string.format("edits[%d] (%s) says what to edit but not how.", position, edit.path),
|
|
120
|
+
string.format("edits[%d] (%s) says what to edit but not how.", position - 1, edit.path),
|
|
121
121
|
"Give exactly one of: `find` + `replace`, `startLine` (+ `endLine`) + "
|
|
122
122
|
.. "`replacement`, or `source` to replace the whole script."
|
|
123
123
|
)
|
|
@@ -125,7 +125,7 @@ function TextEdit.validate(edit: Edit, position: number)
|
|
|
125
125
|
if modes > 1 then
|
|
126
126
|
Dispatch.fail(
|
|
127
127
|
"BAD_PARAMS",
|
|
128
|
-
string.format("edits[%d] (%s) combines more than one edit mode.", position, edit.path),
|
|
128
|
+
string.format("edits[%d] (%s) combines more than one edit mode.", position - 1, edit.path),
|
|
129
129
|
"Use `find`, `startLine` or `source` -- one per edit. Send several entries "
|
|
130
130
|
.. "in the array if you need several changes."
|
|
131
131
|
)
|
|
@@ -135,13 +135,13 @@ function TextEdit.validate(edit: Edit, position: number)
|
|
|
135
135
|
if edit.find == "" then
|
|
136
136
|
Dispatch.fail(
|
|
137
137
|
"BAD_PARAMS",
|
|
138
|
-
string.format("edits[%d] (%s) has an empty `find`.", position, edit.path)
|
|
138
|
+
string.format("edits[%d] (%s) has an empty `find`.", position - 1, edit.path)
|
|
139
139
|
)
|
|
140
140
|
end
|
|
141
141
|
if typeof(edit.replace) ~= "string" then
|
|
142
142
|
Dispatch.fail(
|
|
143
143
|
"BAD_PARAMS",
|
|
144
|
-
string.format("edits[%d] (%s) has `find` but no `replace`.", position, edit.path),
|
|
144
|
+
string.format("edits[%d] (%s) has `find` but no `replace`.", position - 1, edit.path),
|
|
145
145
|
"Pass an empty `replace` to delete the matched text."
|
|
146
146
|
)
|
|
147
147
|
end
|
|
@@ -149,7 +149,7 @@ function TextEdit.validate(edit: Edit, position: number)
|
|
|
149
149
|
if typeof(edit.replacement) ~= "string" then
|
|
150
150
|
Dispatch.fail(
|
|
151
151
|
"BAD_PARAMS",
|
|
152
|
-
string.format("edits[%d] (%s) has `startLine` but no `replacement`.", position, edit.path),
|
|
152
|
+
string.format("edits[%d] (%s) has `startLine` but no `replacement`.", position - 1, edit.path),
|
|
153
153
|
"Pass an empty `replacement` to delete those lines."
|
|
154
154
|
)
|
|
155
155
|
end
|