@chrrxs/robloxstudio-mcp-inspector 3.4.3 → 3.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrrxs/robloxstudio-mcp-inspector",
3
- "version": "3.4.3",
3
+ "version": "3.5.0",
4
4
  "description": "DataModel read-only MCP server for inspecting and debugging Roblox Studio from AI coding tools",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -2560,9 +2560,9 @@ local function computeBridgeStamp()
2560
2560
  for i = 1, #combined do
2561
2561
  h = (h * 33 + (string.byte(combined, i))) % 2147483647
2562
2562
  end
2563
- -- "3.4.3" is replaced with the package version at package time
2563
+ -- "3.5.0" is replaced with the package version at package time
2564
2564
  -- (scripts/build-plugin.mjs injectVersion), so a release bump also restamps.
2565
- return `{tostring(h)}-3.4.3`
2565
+ return `{tostring(h)}-3.5.0`
2566
2566
  end
2567
2567
  local BRIDGE_STAMP = computeBridgeStamp()
2568
2568
  local function setSource(scriptInst, source)
@@ -9365,7 +9365,13 @@ local StopPlayMonitor = TS.import(script, script.Parent.Parent, "StopPlayMonitor
9365
9365
  local PluginSession = TS.import(script, script.Parent.Parent, "PluginSession")
9366
9366
  local PeerRole = TS.import(script, script.Parent.Parent, "PeerRole")
9367
9367
  local StudioTestService = game:GetService("StudioTestService")
9368
+ local TestService = game:GetService("TestService")
9368
9369
  local testRunning = false
9370
+ -- Outcome of the latest solo Execute*Async call. MCP polls it so a start Studio
9371
+ -- refuses is reported with Studio's own error instead of a readiness timeout.
9372
+ local soloState = {
9373
+ phase = "idle",
9374
+ }
9369
9375
  local multiplayerState = {
9370
9376
  phase = "idle",
9371
9377
  }
@@ -9406,6 +9412,30 @@ local function cloneMultiplayerState()
9406
9412
  error = multiplayerState.error,
9407
9413
  }
9408
9414
  end
9415
+ local function cloneSoloState()
9416
+ return {
9417
+ phase = soloState.phase,
9418
+ testId = soloState.testId,
9419
+ mode = soloState.mode,
9420
+ startedAt = soloState.startedAt,
9421
+ completedAt = soloState.completedAt,
9422
+ error = soloState.error,
9423
+ }
9424
+ end
9425
+ -- With ExecuteWithStudioRun and NumberOfPlayers > 0, Run opens a separate server
9426
+ -- and NumberOfPlayers client windows instead of a solo run session.
9427
+ local function runModeClientCount()
9428
+ local ok, settings = pcall(function()
9429
+ return {
9430
+ executeWithStudioRun = TestService.ExecuteWithStudioRun,
9431
+ numberOfPlayers = TestService.NumberOfPlayers,
9432
+ }
9433
+ end)
9434
+ if not ok or not settings.executeWithStudioRun or settings.numberOfPlayers <= 0 then
9435
+ return nil
9436
+ end
9437
+ return settings.numberOfPlayers
9438
+ end
9409
9439
  local function normalizeNumPlayers(value)
9410
9440
  local _value = value
9411
9441
  if not (type(_value) == "number") then
@@ -9430,6 +9460,17 @@ local function startPlaytest(requestData)
9430
9460
  error = "start_playtest is single-player only. Use multiplayer_test_start for multi-client StudioTestService sessions.",
9431
9461
  }
9432
9462
  end
9463
+ if mode == "run" then
9464
+ local clientCount = runModeClientCount()
9465
+ if clientCount ~= nil then
9466
+ return {
9467
+ success = false,
9468
+ error = "run_opens_multiplayer_session",
9469
+ message = `TestService.ExecuteWithStudioRun is true and TestService.NumberOfPlayers is {clientCount}, ` .. `so Run would open a separate server and {clientCount} client window(s) that solo_playtest cannot track or stop. ` .. "Ending that session by hand can leave Studio refusing new tests until the place is reopened. " .. 'For a multi-client test use multiplayer_playtest action="start"; for a solo Run set ' .. "TestService.NumberOfPlayers to 0 or TestService.ExecuteWithStudioRun to false.",
9470
+ numberOfPlayers = clientCount,
9471
+ }
9472
+ end
9473
+ end
9433
9474
  -- Peer teardown and ExecutePlayModeAsync completion can precede native edit
9434
9475
  -- readiness. Do not acknowledge a new start that the engine cannot execute.
9435
9476
  if not StudioTestService.EditModeActive then
@@ -9456,6 +9497,13 @@ local function startPlaytest(requestData)
9456
9497
  end
9457
9498
  testRunning = true
9458
9499
  local preparedTest = PluginSession.prepareSoloTest()
9500
+ local testId = HttpService:GenerateGUID(false)
9501
+ soloState = {
9502
+ phase = "running",
9503
+ testId = testId,
9504
+ mode = mode,
9505
+ startedAt = tick(),
9506
+ }
9459
9507
  task.spawn(function()
9460
9508
  local ok, result = pcall(function()
9461
9509
  if mode == "play" then
@@ -9467,11 +9515,17 @@ local function startPlaytest(requestData)
9467
9515
  if not ok then
9468
9516
  warn(`[robloxstudio-mcp] Playtest ended with error: {result}`)
9469
9517
  end
9518
+ if soloState.testId == testId then
9519
+ soloState.completedAt = tick()
9520
+ soloState.phase = if ok then "completed" else "failed"
9521
+ soloState.error = if ok then nil else tostring(result)
9522
+ end
9470
9523
  testRunning = false
9471
9524
  end)
9472
9525
  local response = {
9473
9526
  success = true,
9474
9527
  message = `Playtest started in {mode} mode.`,
9528
+ testId = testId,
9475
9529
  }
9476
9530
  return response
9477
9531
  end
@@ -9621,6 +9675,7 @@ local function multiplayerTestState(_requestData)
9621
9675
  }
9622
9676
  if peer == "edit" then
9623
9677
  response.session = cloneMultiplayerState()
9678
+ response.soloSession = cloneSoloState()
9624
9679
  return response
9625
9680
  end
9626
9681
  local argsOk, args = pcall(function()
@@ -13472,7 +13527,7 @@ return {
13472
13527
  <Properties>
13473
13528
  <string name="Name">State</string>
13474
13529
  <string name="Source"><![CDATA[-- Compiled with roblox-ts v3.0.0
13475
- local CURRENT_VERSION = "3.4.3"
13530
+ local CURRENT_VERSION = "3.5.0"
13476
13531
  local PLUGIN_VARIANT = "inspector"
13477
13532
  local BASE_PORT = 58741
13478
13533
  local SENSITIVE_DIAGNOSTIC_TERMS = { "token", "authorization", "bearer", "password", "cookie", "secret" }