@chrrxs/robloxstudio-mcp 3.0.0 → 3.0.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 +9401 -9047
- package/package.json +2 -2
- package/studio-plugin/MCPPlugin.rbxmx +400 -97
- package/studio-plugin/.Carbon.rbxm.lock +0 -0
- package/studio-plugin/Carbon.rbxm +0 -0
- package/studio-plugin/INSTALLATION.md +0 -170
- package/studio-plugin/MCPInspectorPlugin.rbxmx +0 -169759
- package/studio-plugin/default.project.json +0 -19
- package/studio-plugin/dev.project.json +0 -23
- package/studio-plugin/include/LibMP.lua +0 -156378
- package/studio-plugin/inspector-icon.png +0 -0
- package/studio-plugin/package-lock.json +0 -706
- package/studio-plugin/package.json +0 -19
- package/studio-plugin/plugin.json +0 -10
- package/studio-plugin/src/modules/AssetSanitizationPolicy.ts +0 -127
- package/studio-plugin/src/modules/ClientBroker.ts +0 -450
- package/studio-plugin/src/modules/Communication.ts +0 -601
- package/studio-plugin/src/modules/EvalBridges.ts +0 -255
- package/studio-plugin/src/modules/HttpDiagnostics.ts +0 -50
- package/studio-plugin/src/modules/LuauExec.ts +0 -403
- package/studio-plugin/src/modules/Recording.ts +0 -28
- package/studio-plugin/src/modules/RenderMonitor.ts +0 -60
- package/studio-plugin/src/modules/RuntimeLogBuffer.ts +0 -210
- package/studio-plugin/src/modules/ServerUrlSettings.ts +0 -117
- package/studio-plugin/src/modules/State.ts +0 -39
- package/studio-plugin/src/modules/StopPlayMonitor.ts +0 -267
- package/studio-plugin/src/modules/UI.ts +0 -597
- package/studio-plugin/src/modules/Utils.ts +0 -527
- package/studio-plugin/src/modules/handlers/AssetHandlers.ts +0 -391
- package/studio-plugin/src/modules/handlers/BreakpointHandlers.ts +0 -460
- package/studio-plugin/src/modules/handlers/CaptureHandlers.ts +0 -170
- package/studio-plugin/src/modules/handlers/EvalRuntimeHandlers.ts +0 -149
- package/studio-plugin/src/modules/handlers/GenerateModelHandlers.ts +0 -168
- package/studio-plugin/src/modules/handlers/InputHandlers.ts +0 -163
- package/studio-plugin/src/modules/handlers/LogHandlers.ts +0 -14
- package/studio-plugin/src/modules/handlers/MemoryHandlers.ts +0 -44
- package/studio-plugin/src/modules/handlers/MetadataHandlers.ts +0 -96
- package/studio-plugin/src/modules/handlers/MicroProfilerHandlers.ts +0 -1263
- package/studio-plugin/src/modules/handlers/PropertyHandlers.ts +0 -62
- package/studio-plugin/src/modules/handlers/QueryHandlers.ts +0 -716
- package/studio-plugin/src/modules/handlers/SceneAnalysisHandlers.ts +0 -216
- package/studio-plugin/src/modules/handlers/ScriptHandlers.ts +0 -531
- package/studio-plugin/src/modules/handlers/ScriptProfilerHandlers.ts +0 -386
- package/studio-plugin/src/modules/handlers/SerializationHandlers.ts +0 -172
- package/studio-plugin/src/modules/handlers/TestHandlers.ts +0 -350
- package/studio-plugin/src/server/index.server.ts +0 -135
- package/studio-plugin/src/types/index.d.ts +0 -57
- package/studio-plugin/tsconfig.json +0 -20
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import Utils from "../Utils";
|
|
2
|
-
import Recording from "../Recording";
|
|
3
|
-
|
|
4
|
-
const { getInstanceByPath, convertPropertyValue } = Utils;
|
|
5
|
-
const { beginRecording, finishRecording } = Recording;
|
|
6
|
-
|
|
7
|
-
function setProperties(requestData: Record<string, unknown>) {
|
|
8
|
-
const instancePath = requestData.instancePath as string;
|
|
9
|
-
const properties = requestData.properties as Record<string, unknown>;
|
|
10
|
-
|
|
11
|
-
if (!instancePath || !properties || !typeIs(properties, "table")) {
|
|
12
|
-
return { error: "Instance path and properties object are required" };
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const instance = getInstanceByPath(instancePath);
|
|
16
|
-
if (!instance) return { error: `Instance not found: ${instancePath}` };
|
|
17
|
-
|
|
18
|
-
const recordingId = beginRecording("Set multiple properties");
|
|
19
|
-
const inst = instance as unknown as Record<string, unknown>;
|
|
20
|
-
const results: Record<string, unknown>[] = [];
|
|
21
|
-
let successCount = 0;
|
|
22
|
-
let failureCount = 0;
|
|
23
|
-
|
|
24
|
-
for (const [propName, propValue] of pairs(properties)) {
|
|
25
|
-
const [success, err] = pcall(() => {
|
|
26
|
-
if (propName === "Parent" || propName === "PrimaryPart") {
|
|
27
|
-
if (typeIs(propValue, "string")) {
|
|
28
|
-
const refInstance = getInstanceByPath(propValue as string);
|
|
29
|
-
if (!refInstance) error(`${propName} reference not found: ${propValue}`);
|
|
30
|
-
inst[propName as string] = refInstance;
|
|
31
|
-
}
|
|
32
|
-
} else if (propName === "Name") {
|
|
33
|
-
instance.Name = tostring(propValue);
|
|
34
|
-
} else if (propName === "Source" && instance.IsA("LuaSourceContainer")) {
|
|
35
|
-
(instance as unknown as { Source: string }).Source = tostring(propValue);
|
|
36
|
-
} else {
|
|
37
|
-
const converted = convertPropertyValue(instance, propName as string, propValue);
|
|
38
|
-
inst[propName as string] = converted !== undefined ? converted : propValue;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
if (success) {
|
|
43
|
-
successCount++;
|
|
44
|
-
results.push({ property: propName, success: true });
|
|
45
|
-
} else {
|
|
46
|
-
failureCount++;
|
|
47
|
-
results.push({ property: propName, success: false, error: tostring(err) });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
finishRecording(recordingId, successCount > 0);
|
|
52
|
-
|
|
53
|
-
return {
|
|
54
|
-
instancePath,
|
|
55
|
-
summary: { total: successCount + failureCount, succeeded: successCount, failed: failureCount },
|
|
56
|
-
results,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export = {
|
|
61
|
-
setProperties,
|
|
62
|
-
};
|