flockbay 0.10.15

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.
Files changed (80) hide show
  1. package/README.md +56 -0
  2. package/bin/flockbay-mcp.mjs +56 -0
  3. package/bin/flockbay.mjs +78 -0
  4. package/dist/codex/flockbayMcpStdioBridge.cjs +383 -0
  5. package/dist/codex/flockbayMcpStdioBridge.d.cts +2 -0
  6. package/dist/codex/flockbayMcpStdioBridge.d.mts +2 -0
  7. package/dist/codex/flockbayMcpStdioBridge.mjs +381 -0
  8. package/dist/flockbayScreenshotGate-DJX3Is5d.mjs +136 -0
  9. package/dist/flockbayScreenshotGate-DkxU24cR.cjs +138 -0
  10. package/dist/index--o4BPz5o.cjs +10311 -0
  11. package/dist/index-CUp3juDS.mjs +10268 -0
  12. package/dist/index.cjs +43 -0
  13. package/dist/index.d.cts +1 -0
  14. package/dist/index.d.mts +1 -0
  15. package/dist/index.mjs +40 -0
  16. package/dist/lib.cjs +33 -0
  17. package/dist/lib.d.cts +957 -0
  18. package/dist/lib.d.mts +957 -0
  19. package/dist/lib.mjs +23 -0
  20. package/dist/runCodex-D3eT-TvB.cjs +3449 -0
  21. package/dist/runCodex-o6PCbHQ7.mjs +3446 -0
  22. package/dist/runGemini-Bt0oEj_g.mjs +3183 -0
  23. package/dist/runGemini-CBxZp6I7.cjs +3185 -0
  24. package/dist/types-C-jnUdn_.cjs +4498 -0
  25. package/dist/types-DGd6ea2Z.mjs +4450 -0
  26. package/kits/kit.open_world/kit.json +59 -0
  27. package/package.json +130 -0
  28. package/scripts/claude_local_launcher.cjs +73 -0
  29. package/scripts/claude_remote_launcher.cjs +16 -0
  30. package/scripts/claude_version_utils.cjs +391 -0
  31. package/scripts/ripgrep_launcher.cjs +33 -0
  32. package/scripts/session_hook_forwarder.cjs +49 -0
  33. package/scripts/test-codex-abort-history.mjs +77 -0
  34. package/scripts/unpack-tools.cjs +222 -0
  35. package/tools/licenses/difftastic-LICENSE +21 -0
  36. package/tools/licenses/ripgrep-LICENSE +3 -0
  37. package/tools/unreal-mcp/UPSTREAM_VERSION.md +8 -0
  38. package/tools/unreal-mcp/upstream/Docs/README.md +8 -0
  39. package/tools/unreal-mcp/upstream/Docs/Tools/README.md +7 -0
  40. package/tools/unreal-mcp/upstream/Docs/Tools/actor_tools.md +184 -0
  41. package/tools/unreal-mcp/upstream/Docs/Tools/blueprint_tools.md +268 -0
  42. package/tools/unreal-mcp/upstream/Docs/Tools/editor_tools.md +104 -0
  43. package/tools/unreal-mcp/upstream/Docs/Tools/node_tools.md +274 -0
  44. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Config/FilterPlugin.ini +8 -0
  45. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Private/Commands/UnrealMCPBlueprintCommands.cpp +1160 -0
  46. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Private/Commands/UnrealMCPBlueprintNodeCommands.cpp +924 -0
  47. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Private/Commands/UnrealMCPCommonUtils.cpp +709 -0
  48. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Private/Commands/UnrealMCPEditorCommands.cpp +896 -0
  49. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Private/Commands/UnrealMCPProjectCommands.cpp +72 -0
  50. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Private/Commands/UnrealMCPUMGCommands.cpp +544 -0
  51. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Private/MCPServerRunnable.cpp +321 -0
  52. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Private/UnrealMCPBridge.cpp +419 -0
  53. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Private/UnrealMCPModule.cpp +21 -0
  54. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Public/Commands/UnrealMCPBlueprintCommands.h +34 -0
  55. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Public/Commands/UnrealMCPBlueprintNodeCommands.h +27 -0
  56. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Public/Commands/UnrealMCPCommonUtils.h +59 -0
  57. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Public/Commands/UnrealMCPEditorCommands.h +40 -0
  58. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Public/Commands/UnrealMCPProjectCommands.h +20 -0
  59. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Public/Commands/UnrealMCPUMGCommands.h +82 -0
  60. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Public/MCPServerRunnable.h +34 -0
  61. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Public/UnrealMCPBridge.h +64 -0
  62. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/Public/UnrealMCPModule.h +22 -0
  63. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/Source/UnrealMCP/UnrealMCP.Build.cs +78 -0
  64. package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/UnrealMCP/UnrealMCP.uplugin +36 -0
  65. package/tools/unreal-mcp/upstream/Python/README.md +40 -0
  66. package/tools/unreal-mcp/upstream/Python/pyproject.toml +22 -0
  67. package/tools/unreal-mcp/upstream/Python/scripts/actors/test_cube.py +203 -0
  68. package/tools/unreal-mcp/upstream/Python/scripts/blueprints/test_create_and_spawn_blueprints_with_different_components.py +497 -0
  69. package/tools/unreal-mcp/upstream/Python/scripts/blueprints/test_create_and_spawn_cube_blueprint.py +194 -0
  70. package/tools/unreal-mcp/upstream/Python/scripts/node/test_component_reference.py +267 -0
  71. package/tools/unreal-mcp/upstream/Python/scripts/node/test_create_bird_blueprint_with_input_and_camera.py +618 -0
  72. package/tools/unreal-mcp/upstream/Python/scripts/node/test_input_mapping.py +366 -0
  73. package/tools/unreal-mcp/upstream/Python/scripts/node/test_physics_variables.py +390 -0
  74. package/tools/unreal-mcp/upstream/Python/tools/blueprint_tools.py +420 -0
  75. package/tools/unreal-mcp/upstream/Python/tools/editor_tools.py +369 -0
  76. package/tools/unreal-mcp/upstream/Python/tools/node_tools.py +430 -0
  77. package/tools/unreal-mcp/upstream/Python/tools/project_tools.py +64 -0
  78. package/tools/unreal-mcp/upstream/Python/tools/umg_tools.py +333 -0
  79. package/tools/unreal-mcp/upstream/Python/unreal_mcp_server.py +398 -0
  80. package/tools/unreal-mcp/upstream/Python/uv.lock +521 -0
@@ -0,0 +1,333 @@
1
+ """
2
+ UMG Tools for Unreal MCP.
3
+
4
+ This module provides tools for creating and manipulating UMG Widget Blueprints in Unreal Engine.
5
+ """
6
+
7
+ import logging
8
+ from typing import Dict, List, Any
9
+ from mcp.server.fastmcp import FastMCP, Context
10
+
11
+ # Get logger
12
+ logger = logging.getLogger("UnrealMCP")
13
+
14
+ def register_umg_tools(mcp: FastMCP):
15
+ """Register UMG tools with the MCP server."""
16
+
17
+ @mcp.tool()
18
+ def create_umg_widget_blueprint(
19
+ ctx: Context,
20
+ widget_name: str,
21
+ parent_class: str = "UserWidget",
22
+ path: str = "/Game/UI"
23
+ ) -> Dict[str, Any]:
24
+ """
25
+ Create a new UMG Widget Blueprint.
26
+
27
+ Args:
28
+ widget_name: Name of the widget blueprint to create
29
+ parent_class: Parent class for the widget (default: UserWidget)
30
+ path: Content browser path where the widget should be created
31
+
32
+ Returns:
33
+ Dict containing success status and widget path
34
+ """
35
+ from unreal_mcp_server import get_unreal_connection
36
+
37
+ try:
38
+ unreal = get_unreal_connection()
39
+ if not unreal:
40
+ logger.error("Failed to connect to Unreal Engine")
41
+ return {"success": False, "message": "Failed to connect to Unreal Engine"}
42
+
43
+ params = {
44
+ "widget_name": widget_name,
45
+ "parent_class": parent_class,
46
+ "path": path
47
+ }
48
+
49
+ logger.info(f"Creating UMG Widget Blueprint with params: {params}")
50
+ response = unreal.send_command("create_umg_widget_blueprint", params)
51
+
52
+ if not response:
53
+ logger.error("No response from Unreal Engine")
54
+ return {"success": False, "message": "No response from Unreal Engine"}
55
+
56
+ logger.info(f"Create UMG Widget Blueprint response: {response}")
57
+ return response
58
+
59
+ except Exception as e:
60
+ error_msg = f"Error creating UMG Widget Blueprint: {e}"
61
+ logger.error(error_msg)
62
+ return {"success": False, "message": error_msg}
63
+
64
+ @mcp.tool()
65
+ def add_text_block_to_widget(
66
+ ctx: Context,
67
+ widget_name: str,
68
+ text_block_name: str,
69
+ text: str = "",
70
+ position: List[float] = [0.0, 0.0],
71
+ size: List[float] = [200.0, 50.0],
72
+ font_size: int = 12,
73
+ color: List[float] = [1.0, 1.0, 1.0, 1.0]
74
+ ) -> Dict[str, Any]:
75
+ """
76
+ Add a Text Block widget to a UMG Widget Blueprint.
77
+
78
+ Args:
79
+ widget_name: Name of the target Widget Blueprint
80
+ text_block_name: Name to give the new Text Block
81
+ text: Initial text content
82
+ position: [X, Y] position in the canvas panel
83
+ size: [Width, Height] of the text block
84
+ font_size: Font size in points
85
+ color: [R, G, B, A] color values (0.0 to 1.0)
86
+
87
+ Returns:
88
+ Dict containing success status and text block properties
89
+ """
90
+ from unreal_mcp_server import get_unreal_connection
91
+
92
+ try:
93
+ unreal = get_unreal_connection()
94
+ if not unreal:
95
+ logger.error("Failed to connect to Unreal Engine")
96
+ return {"success": False, "message": "Failed to connect to Unreal Engine"}
97
+
98
+ params = {
99
+ "widget_name": widget_name,
100
+ "text_block_name": text_block_name,
101
+ "text": text,
102
+ "position": position,
103
+ "size": size,
104
+ "font_size": font_size,
105
+ "color": color
106
+ }
107
+
108
+ logger.info(f"Adding Text Block to widget with params: {params}")
109
+ response = unreal.send_command("add_text_block_to_widget", params)
110
+
111
+ if not response:
112
+ logger.error("No response from Unreal Engine")
113
+ return {"success": False, "message": "No response from Unreal Engine"}
114
+
115
+ logger.info(f"Add Text Block response: {response}")
116
+ return response
117
+
118
+ except Exception as e:
119
+ error_msg = f"Error adding Text Block to widget: {e}"
120
+ logger.error(error_msg)
121
+ return {"success": False, "message": error_msg}
122
+
123
+ @mcp.tool()
124
+ def add_button_to_widget(
125
+ ctx: Context,
126
+ widget_name: str,
127
+ button_name: str,
128
+ text: str = "",
129
+ position: List[float] = [0.0, 0.0],
130
+ size: List[float] = [200.0, 50.0],
131
+ font_size: int = 12,
132
+ color: List[float] = [1.0, 1.0, 1.0, 1.0],
133
+ background_color: List[float] = [0.1, 0.1, 0.1, 1.0]
134
+ ) -> Dict[str, Any]:
135
+ """
136
+ Add a Button widget to a UMG Widget Blueprint.
137
+
138
+ Args:
139
+ widget_name: Name of the target Widget Blueprint
140
+ button_name: Name to give the new Button
141
+ text: Text to display on the button
142
+ position: [X, Y] position in the canvas panel
143
+ size: [Width, Height] of the button
144
+ font_size: Font size for button text
145
+ color: [R, G, B, A] text color values (0.0 to 1.0)
146
+ background_color: [R, G, B, A] button background color values (0.0 to 1.0)
147
+
148
+ Returns:
149
+ Dict containing success status and button properties
150
+ """
151
+ from unreal_mcp_server import get_unreal_connection
152
+
153
+ try:
154
+ unreal = get_unreal_connection()
155
+ if not unreal:
156
+ logger.error("Failed to connect to Unreal Engine")
157
+ return {"success": False, "message": "Failed to connect to Unreal Engine"}
158
+
159
+ params = {
160
+ "widget_name": widget_name,
161
+ "button_name": button_name,
162
+ "text": text,
163
+ "position": position,
164
+ "size": size,
165
+ "font_size": font_size,
166
+ "color": color,
167
+ "background_color": background_color
168
+ }
169
+
170
+ logger.info(f"Adding Button to widget with params: {params}")
171
+ response = unreal.send_command("add_button_to_widget", params)
172
+
173
+ if not response:
174
+ logger.error("No response from Unreal Engine")
175
+ return {"success": False, "message": "No response from Unreal Engine"}
176
+
177
+ logger.info(f"Add Button response: {response}")
178
+ return response
179
+
180
+ except Exception as e:
181
+ error_msg = f"Error adding Button to widget: {e}"
182
+ logger.error(error_msg)
183
+ return {"success": False, "message": error_msg}
184
+
185
+ @mcp.tool()
186
+ def bind_widget_event(
187
+ ctx: Context,
188
+ widget_name: str,
189
+ widget_component_name: str,
190
+ event_name: str,
191
+ function_name: str = ""
192
+ ) -> Dict[str, Any]:
193
+ """
194
+ Bind an event on a widget component to a function.
195
+
196
+ Args:
197
+ widget_name: Name of the target Widget Blueprint
198
+ widget_component_name: Name of the widget component (button, etc.)
199
+ event_name: Name of the event to bind (OnClicked, etc.)
200
+ function_name: Name of the function to create/bind to (defaults to f"{widget_component_name}_{event_name}")
201
+
202
+ Returns:
203
+ Dict containing success status and binding information
204
+ """
205
+ from unreal_mcp_server import get_unreal_connection
206
+
207
+ try:
208
+ unreal = get_unreal_connection()
209
+ if not unreal:
210
+ logger.error("Failed to connect to Unreal Engine")
211
+ return {"success": False, "message": "Failed to connect to Unreal Engine"}
212
+
213
+ # If no function name provided, create one from component and event names
214
+ if not function_name:
215
+ function_name = f"{widget_component_name}_{event_name}"
216
+
217
+ params = {
218
+ "widget_name": widget_name,
219
+ "widget_component_name": widget_component_name,
220
+ "event_name": event_name,
221
+ "function_name": function_name
222
+ }
223
+
224
+ logger.info(f"Binding widget event with params: {params}")
225
+ response = unreal.send_command("bind_widget_event", params)
226
+
227
+ if not response:
228
+ logger.error("No response from Unreal Engine")
229
+ return {"success": False, "message": "No response from Unreal Engine"}
230
+
231
+ logger.info(f"Bind widget event response: {response}")
232
+ return response
233
+
234
+ except Exception as e:
235
+ error_msg = f"Error binding widget event: {e}"
236
+ logger.error(error_msg)
237
+ return {"success": False, "message": error_msg}
238
+
239
+ @mcp.tool()
240
+ def add_widget_to_viewport(
241
+ ctx: Context,
242
+ widget_name: str,
243
+ z_order: int = 0
244
+ ) -> Dict[str, Any]:
245
+ """
246
+ Add a Widget Blueprint instance to the viewport.
247
+
248
+ Args:
249
+ widget_name: Name of the Widget Blueprint to add
250
+ z_order: Z-order for the widget (higher numbers appear on top)
251
+
252
+ Returns:
253
+ Dict containing success status and widget instance information
254
+ """
255
+ from unreal_mcp_server import get_unreal_connection
256
+
257
+ try:
258
+ unreal = get_unreal_connection()
259
+ if not unreal:
260
+ logger.error("Failed to connect to Unreal Engine")
261
+ return {"success": False, "message": "Failed to connect to Unreal Engine"}
262
+
263
+ params = {
264
+ "widget_name": widget_name,
265
+ "z_order": z_order
266
+ }
267
+
268
+ logger.info(f"Adding widget to viewport with params: {params}")
269
+ response = unreal.send_command("add_widget_to_viewport", params)
270
+
271
+ if not response:
272
+ logger.error("No response from Unreal Engine")
273
+ return {"success": False, "message": "No response from Unreal Engine"}
274
+
275
+ logger.info(f"Add widget to viewport response: {response}")
276
+ return response
277
+
278
+ except Exception as e:
279
+ error_msg = f"Error adding widget to viewport: {e}"
280
+ logger.error(error_msg)
281
+ return {"success": False, "message": error_msg}
282
+
283
+ @mcp.tool()
284
+ def set_text_block_binding(
285
+ ctx: Context,
286
+ widget_name: str,
287
+ text_block_name: str,
288
+ binding_property: str,
289
+ binding_type: str = "Text"
290
+ ) -> Dict[str, Any]:
291
+ """
292
+ Set up a property binding for a Text Block widget.
293
+
294
+ Args:
295
+ widget_name: Name of the target Widget Blueprint
296
+ text_block_name: Name of the Text Block to bind
297
+ binding_property: Name of the property to bind to
298
+ binding_type: Type of binding (Text, Visibility, etc.)
299
+
300
+ Returns:
301
+ Dict containing success status and binding information
302
+ """
303
+ from unreal_mcp_server import get_unreal_connection
304
+
305
+ try:
306
+ unreal = get_unreal_connection()
307
+ if not unreal:
308
+ logger.error("Failed to connect to Unreal Engine")
309
+ return {"success": False, "message": "Failed to connect to Unreal Engine"}
310
+
311
+ params = {
312
+ "widget_name": widget_name,
313
+ "text_block_name": text_block_name,
314
+ "binding_property": binding_property,
315
+ "binding_type": binding_type
316
+ }
317
+
318
+ logger.info(f"Setting text block binding with params: {params}")
319
+ response = unreal.send_command("set_text_block_binding", params)
320
+
321
+ if not response:
322
+ logger.error("No response from Unreal Engine")
323
+ return {"success": False, "message": "No response from Unreal Engine"}
324
+
325
+ logger.info(f"Set text block binding response: {response}")
326
+ return response
327
+
328
+ except Exception as e:
329
+ error_msg = f"Error setting text block binding: {e}"
330
+ logger.error(error_msg)
331
+ return {"success": False, "message": error_msg}
332
+
333
+ logger.info("UMG tools registered successfully")