robloxstudio-mcp 2.7.0-next.1 → 2.7.0-next.3

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 CHANGED
@@ -1118,7 +1118,7 @@ var OpenCloudClient = class {
1118
1118
  throw new Error(`Unknown error: ${String(error)}`);
1119
1119
  }
1120
1120
  }
1121
- async pollOperation(operationPath, maxAttempts = 15, intervalMs = 2e3) {
1121
+ async pollOperation(operationPath, maxAttempts = 30, intervalMs = 2e3) {
1122
1122
  const operationId = operationPath.replace("operations/", "");
1123
1123
  for (let i = 0; i < maxAttempts; i++) {
1124
1124
  const result = await this.request(`/assets/v1/operations/${operationId}`);
@@ -2502,49 +2502,46 @@ ${code}`
2502
2502
  }
2503
2503
  const fileContent = fs.readFileSync(filePath);
2504
2504
  const fileName = path.basename(filePath);
2505
+ const resolvedGroupId = groupId || process.env.ROBLOX_CREATOR_GROUP_ID;
2506
+ const resolvedUserId = userId || process.env.ROBLOX_CREATOR_USER_ID;
2507
+ if (this.openCloudClient.hasApiKey() && (resolvedUserId || resolvedGroupId)) {
2508
+ const creator = {};
2509
+ if (resolvedGroupId) {
2510
+ creator.groupId = resolvedGroupId;
2511
+ } else {
2512
+ creator.userId = resolvedUserId;
2513
+ }
2514
+ const result = await this.openCloudClient.createAsset({
2515
+ assetType: "Decal",
2516
+ displayName,
2517
+ description: description || "",
2518
+ creationContext: { creator }
2519
+ }, fileContent, fileName);
2520
+ return {
2521
+ content: [{
2522
+ type: "text",
2523
+ text: JSON.stringify(result)
2524
+ }]
2525
+ };
2526
+ }
2505
2527
  if (this.cookieClient.hasCookie()) {
2506
- const result2 = await this.cookieClient.uploadDecal(fileContent, displayName, description || "");
2528
+ const result = await this.cookieClient.uploadDecal(fileContent, displayName, description || "");
2507
2529
  return {
2508
2530
  content: [{
2509
2531
  type: "text",
2510
2532
  text: JSON.stringify({
2511
2533
  done: true,
2512
2534
  response: {
2513
- assetId: String(result2.assetId),
2535
+ assetId: String(result.assetId),
2514
2536
  displayName,
2515
2537
  assetType: "Decal",
2516
- backingAssetId: String(result2.backingAssetId)
2538
+ backingAssetId: String(result.backingAssetId)
2517
2539
  }
2518
2540
  })
2519
2541
  }]
2520
2542
  };
2521
2543
  }
2522
- if (!this.openCloudClient.hasApiKey()) {
2523
- throw new Error("No auth configured for asset upload. Set ROBLOSECURITY env var (recommended) or ROBLOX_OPEN_CLOUD_API_KEY.");
2524
- }
2525
- const resolvedGroupId = groupId || process.env.ROBLOX_CREATOR_GROUP_ID;
2526
- const resolvedUserId = userId || process.env.ROBLOX_CREATOR_USER_ID;
2527
- if (!resolvedUserId && !resolvedGroupId) {
2528
- throw new Error("Creator identity required for Open Cloud upload. Set ROBLOX_CREATOR_USER_ID or ROBLOX_CREATOR_GROUP_ID, or pass userId/groupId as parameters. Alternatively, set ROBLOSECURITY to use cookie auth instead.");
2529
- }
2530
- const creator = {};
2531
- if (resolvedGroupId) {
2532
- creator.groupId = resolvedGroupId;
2533
- } else {
2534
- creator.userId = resolvedUserId;
2535
- }
2536
- const result = await this.openCloudClient.createAsset({
2537
- assetType: "Decal",
2538
- displayName,
2539
- description: description || "",
2540
- creationContext: { creator }
2541
- }, fileContent, fileName);
2542
- return {
2543
- content: [{
2544
- type: "text",
2545
- text: JSON.stringify(result)
2546
- }]
2547
- };
2544
+ throw new Error("No auth configured for asset upload. Set ROBLOX_OPEN_CLOUD_API_KEY + ROBLOX_CREATOR_USER_ID (recommended) or ROBLOSECURITY env var.");
2548
2545
  }
2549
2546
  async uploadAsset(filePath, assetType, displayName, description, userId, groupId) {
2550
2547
  if (!fs.existsSync(filePath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robloxstudio-mcp",
3
- "version": "2.7.0-next.1",
3
+ "version": "2.7.0-next.3",
4
4
  "description": "MCP Server for Roblox Studio Integration - Access Studio data, scripts, and objects through AI tools",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -5273,7 +5273,7 @@ return {
5273
5273
  <Properties>
5274
5274
  <string name="Name">State</string>
5275
5275
  <string name="Source"><![CDATA[-- Compiled with roblox-ts v3.0.0
5276
- local CURRENT_VERSION = "2.7.0-next.1"
5276
+ local CURRENT_VERSION = "2.7.0-next.2"
5277
5277
  local MAX_CONNECTIONS = 5
5278
5278
  local BASE_PORT = 58741
5279
5279
  local activeTabIndex = 0