VibeBlocksMCP_Companion.rbxm•27.6 kB
<roblox!��
INST � Folder INST � Script PROP* ( � Name VibeBlocksMCP_CompanionPROP � Name PluginPROP�j �. �< Source�. --[[ Plugin Main Script ]]
local HttpService = game:Get '(" #")3 ?Run2 1 ?Log1 �") -- Added � �SERVER_URL = "http://� �host:8000/p� �_command" -- TODO: Make configurable� �0POLLING_INTERVAL = 2 -- Seconds
-- --- NEW: Result Reporting CQ Ation( #--Y � � RESULT_ENDPOINT� r\ !_rj � �Endpoint for sending ds back� ?END� 3 � OLogg� ?LOG� �receive_studio_logs� Elogs2(ND��1.5 -- Minimum s�� between log� s to avoid spamM �MAX_LOG_BATCH_SIZE = 50Q aax log8 �send in one batchm�
logsToSend = {} -- Buffer�? 1wai�to be sent| 2isS��Logs = false -- Fla/ �prevent concurrent� @ Alast��ndTime = 0���
D EPollA �
print("Vibe Blocks MCP Companion'�Loaded")
t �Helper:
�Back to Server -&{ AfuncBsend0 "To) �(requestId,��Data)
if not � then
� �� : Error - CannoEX � without aU � ID.")
return
end
Bq payloa�# � T_id =@ 1Id, =g ADatae� his should be a table (will be JSON encoded)
}y �success, P� dpcall(N(� �a:JSONEY (� )� 5)
Wd U�Failed to� � 04for!� ID " .. �Id .. ": �tostring(� )�
Q is e��message here} ��� � 2 to� �)�TpostS�Bpost���-- Use PostAsyncA�non-block�n7
n:1 (� 2�, Enum.HttpContentType.ApplicationJson� !&DPOSThsto serv*�K):�"Maybe implement retry logic later if needed
else4��fully posted� #
:D
end?End� findObjectFromPath(pathSq)
-- S� �! path traversal (game, workspace, or starts with� / )�Qrts =O f �:split("."% �� : �firstPartLower = �q.lower(X Q[1])
� �Check if thel � �explicitly� 6 or� M
ifl �= "game"� � �
1
ar.remove� 1, 1MR � 'game' from � 4 toUe-~ I� "