ue-mcp 0.4.0-alpha

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 (141) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +89 -0
  3. package/dist/bridge.d.ts +25 -0
  4. package/dist/bridge.js +124 -0
  5. package/dist/bridge.js.map +1 -0
  6. package/dist/deployer.d.ts +18 -0
  7. package/dist/deployer.js +175 -0
  8. package/dist/deployer.js.map +1 -0
  9. package/dist/editor-control.d.ts +15 -0
  10. package/dist/editor-control.js +181 -0
  11. package/dist/editor-control.js.map +1 -0
  12. package/dist/github-app.d.ts +4 -0
  13. package/dist/github-app.js +94 -0
  14. package/dist/github-app.js.map +1 -0
  15. package/dist/index.d.ts +2 -0
  16. package/dist/index.js +125 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/init.d.ts +2 -0
  19. package/dist/init.js +290 -0
  20. package/dist/init.js.map +1 -0
  21. package/dist/instructions.d.ts +1 -0
  22. package/dist/instructions.js +150 -0
  23. package/dist/instructions.js.map +1 -0
  24. package/dist/project.d.ts +32 -0
  25. package/dist/project.js +175 -0
  26. package/dist/project.js.map +1 -0
  27. package/dist/tools/animation.d.ts +2 -0
  28. package/dist/tools/animation.js +62 -0
  29. package/dist/tools/animation.js.map +1 -0
  30. package/dist/tools/asset.d.ts +2 -0
  31. package/dist/tools/asset.js +128 -0
  32. package/dist/tools/asset.js.map +1 -0
  33. package/dist/tools/audio.d.ts +2 -0
  34. package/dist/tools/audio.js +24 -0
  35. package/dist/tools/audio.js.map +1 -0
  36. package/dist/tools/blueprint.d.ts +2 -0
  37. package/dist/tools/blueprint.js +64 -0
  38. package/dist/tools/blueprint.js.map +1 -0
  39. package/dist/tools/demo.d.ts +2 -0
  40. package/dist/tools/demo.js +10 -0
  41. package/dist/tools/demo.js.map +1 -0
  42. package/dist/tools/editor.d.ts +2 -0
  43. package/dist/tools/editor.js +133 -0
  44. package/dist/tools/editor.js.map +1 -0
  45. package/dist/tools/feedback.d.ts +2 -0
  46. package/dist/tools/feedback.js +44 -0
  47. package/dist/tools/feedback.js.map +1 -0
  48. package/dist/tools/foliage.d.ts +2 -0
  49. package/dist/tools/foliage.js +29 -0
  50. package/dist/tools/foliage.js.map +1 -0
  51. package/dist/tools/gameplay.d.ts +2 -0
  52. package/dist/tools/gameplay.js +101 -0
  53. package/dist/tools/gameplay.js.map +1 -0
  54. package/dist/tools/gas.d.ts +2 -0
  55. package/dist/tools/gas.js +43 -0
  56. package/dist/tools/gas.js.map +1 -0
  57. package/dist/tools/landscape.d.ts +2 -0
  58. package/dist/tools/landscape.js +32 -0
  59. package/dist/tools/landscape.js.map +1 -0
  60. package/dist/tools/level.d.ts +2 -0
  61. package/dist/tools/level.js +66 -0
  62. package/dist/tools/level.js.map +1 -0
  63. package/dist/tools/material.d.ts +2 -0
  64. package/dist/tools/material.js +59 -0
  65. package/dist/tools/material.js.map +1 -0
  66. package/dist/tools/networking.d.ts +2 -0
  67. package/dist/tools/networking.js +42 -0
  68. package/dist/tools/networking.js.map +1 -0
  69. package/dist/tools/niagara.d.ts +2 -0
  70. package/dist/tools/niagara.js +42 -0
  71. package/dist/tools/niagara.js.map +1 -0
  72. package/dist/tools/pcg.d.ts +2 -0
  73. package/dist/tools/pcg.js +39 -0
  74. package/dist/tools/pcg.js.map +1 -0
  75. package/dist/tools/project.d.ts +2 -0
  76. package/dist/tools/project.js +282 -0
  77. package/dist/tools/project.js.map +1 -0
  78. package/dist/tools/reflection.d.ts +2 -0
  79. package/dist/tools/reflection.js +26 -0
  80. package/dist/tools/reflection.js.map +1 -0
  81. package/dist/tools/widget.d.ts +2 -0
  82. package/dist/tools/widget.js +34 -0
  83. package/dist/tools/widget.js.map +1 -0
  84. package/dist/types.d.ts +21 -0
  85. package/dist/types.js +38 -0
  86. package/dist/types.js.map +1 -0
  87. package/package.json +76 -0
  88. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/BridgeServer.cpp +746 -0
  89. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/BridgeServer.h +81 -0
  90. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/GameThreadExecutor.cpp +49 -0
  91. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/GameThreadExecutor.h +37 -0
  92. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/HandlerRegistry.cpp +75 -0
  93. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/HandlerRegistry.h +50 -0
  94. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/AnimationHandlers.cpp +1418 -0
  95. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/AnimationHandlers.h +43 -0
  96. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/AssetHandlers.cpp +1773 -0
  97. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/AssetHandlers.h +48 -0
  98. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/AudioHandlers.cpp +289 -0
  99. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/AudioHandlers.h +18 -0
  100. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/BlueprintHandlers.cpp +1982 -0
  101. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/BlueprintHandlers.h +44 -0
  102. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/DemoHandlers.cpp +1217 -0
  103. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/DemoHandlers.h +71 -0
  104. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/DialogHandlers.cpp +465 -0
  105. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/DialogHandlers.h +49 -0
  106. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/EditorHandlers.cpp +1676 -0
  107. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/EditorHandlers.h +53 -0
  108. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/FoliageHandlers.cpp +876 -0
  109. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/FoliageHandlers.h +22 -0
  110. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/GameplayHandlers.cpp +2222 -0
  111. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/GameplayHandlers.h +54 -0
  112. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/GasHandlers.cpp +783 -0
  113. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/GasHandlers.h +24 -0
  114. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/LandscapeHandlers.cpp +898 -0
  115. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/LandscapeHandlers.h +24 -0
  116. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/LevelHandlers.cpp +1270 -0
  117. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/LevelHandlers.h +34 -0
  118. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/MaterialHandlers.cpp +2190 -0
  119. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/MaterialHandlers.h +53 -0
  120. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/NetworkingHandlers.cpp +554 -0
  121. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/NetworkingHandlers.h +29 -0
  122. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/NiagaraHandlers.cpp +601 -0
  123. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/NiagaraHandlers.h +25 -0
  124. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/PCGHandlers.cpp +1024 -0
  125. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/PCGHandlers.h +25 -0
  126. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/PhysicsHandlers.cpp +370 -0
  127. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/PhysicsHandlers.h +19 -0
  128. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/ReflectionHandlers.cpp +499 -0
  129. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/ReflectionHandlers.h +27 -0
  130. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/SequencerHandlers.cpp +426 -0
  131. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/SequencerHandlers.h +19 -0
  132. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/SplineHandlers.cpp +303 -0
  133. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/SplineHandlers.h +18 -0
  134. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/WidgetHandlers.cpp +985 -0
  135. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/WidgetHandlers.h +27 -0
  136. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/JsonSerializer.cpp +181 -0
  137. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/JsonSerializer.h +42 -0
  138. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/UE_MCP_Bridge.cpp +39 -0
  139. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Public/UE_MCP_BridgeModule.h +14 -0
  140. package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/UE_MCP_Bridge.Build.cs +87 -0
  141. package/plugin/ue_mcp_bridge/UE_MCP_Bridge.uplugin +55 -0
@@ -0,0 +1,150 @@
1
+ export const SERVER_INSTRUCTIONS = `UE-MCP: Unreal Engine editor bridge (C++ plugin) — 19 category tools covering 300+ actions.
2
+
3
+ Every tool takes an "action" parameter that selects the operation. Call project(action="get_status") first.
4
+
5
+ ═══ QUICK START ═══
6
+ 1. project(action="get_status") — check if the editor is connected
7
+ 2. If not connected: editor(action="start_editor") to launch UE
8
+ 3. level(action="get_outliner") — see what's in the current level
9
+ 4. asset(action="list") — browse project assets
10
+ 5. reflection(action="reflect_class", className="StaticMeshActor") — understand any UE class
11
+ 6. demo(action="step", stepIndex=1) through 19 — run the Neon Shrine demo to see the bridge in action
12
+ 7. demo(action="cleanup") — clean up after the demo
13
+
14
+ ═══ TOOLS & ACTIONS ═══
15
+
16
+ project — Project status, config INI, C++ source
17
+ get_status, set_project, get_info, read_config, search_config, list_config_tags,
18
+ set_config, read_cpp_header, read_module, list_modules, search_cpp
19
+
20
+ asset — Assets: list, search, CRUD, import, datatables, textures
21
+ list, search, read, read_properties, duplicate, rename, move, delete, save,
22
+ import_static_mesh, import_skeletal_mesh, import_animation, import_texture,
23
+ read_datatable, create_datatable, reimport_datatable, list_textures,
24
+ get_texture_info, set_texture_settings
25
+
26
+ blueprint — Blueprint reading, authoring, compilation
27
+ read, list_variables, list_functions, read_graph, create, add_variable,
28
+ set_variable_properties, create_function, delete_function, rename_function,
29
+ add_node, delete_node, set_node_property, connect_pins, add_component,
30
+ compile, list_node_types, search_node_types, create_interface, add_interface,
31
+ add_event_dispatcher
32
+
33
+ level — Level actors, selection, components, volumes, lights, splines
34
+ get_outliner, place_actor, delete_actor, get_actor_details, move_actor,
35
+ select, get_selected, add_component, set_component_property,
36
+ get_current, load, save, list, create,
37
+ spawn_volume, list_volumes, set_volume_properties,
38
+ spawn_light, set_light_properties, build_lighting,
39
+ get_spline_info, set_spline_points
40
+
41
+ material — Materials, shading, and graph authoring
42
+ read, list_parameters, set_parameter, create_instance, create,
43
+ set_shading_model, set_base_color, connect_texture,
44
+ add_expression, connect_expressions, connect_to_property,
45
+ list_expressions, delete_expression, list_expression_types, recompile
46
+
47
+ animation — Anim assets, skeletons, montages, blendspaces
48
+ read_anim_blueprint, read_montage, read_sequence, read_blendspace, list,
49
+ create_montage, create_anim_blueprint, create_blendspace, add_notify,
50
+ get_skeleton_info, list_sockets, list_skeletal_meshes, get_physics_asset
51
+
52
+ landscape — Terrain sculpting, painting, layers
53
+ get_info, list_layers, sample, list_splines, get_component,
54
+ sculpt, paint_layer, set_material, add_layer_info, import_heightmap
55
+
56
+ pcg — Procedural Content Generation graphs
57
+ list_graphs, read_graph, read_node_settings, get_components,
58
+ get_component_details, create_graph, add_node, connect_nodes,
59
+ set_node_settings, remove_node, execute, add_volume
60
+
61
+ foliage — Foliage painting and types
62
+ list_types, get_settings, sample, paint, erase, create_type, set_settings
63
+
64
+ niagara — VFX systems and graph authoring
65
+ list, get_info, spawn, set_parameter, create,
66
+ create_emitter, add_emitter, list_emitters, set_emitter_property,
67
+ list_modules, get_emitter_info
68
+
69
+ audio — Sound assets and playback
70
+ list, play_at_location, spawn_ambient, create_cue, create_metasound
71
+
72
+ widget — UMG widgets and editor utilities
73
+ read_tree, get_details, set_property, list, read_animations, create,
74
+ create_utility_widget, run_utility_widget,
75
+ create_utility_blueprint, run_utility_blueprint
76
+
77
+ editor — Console, Python, PIE, viewport, sequencer, perf, build pipeline, logs
78
+ execute_command, execute_python, set_property, play_in_editor,
79
+ get_runtime_value, hot_reload, undo, redo,
80
+ get_perf_stats, run_stat, set_scalability, capture_screenshot,
81
+ get_viewport, set_viewport, focus_on_actor,
82
+ create_sequence, get_sequence_info, add_sequence_track, play_sequence,
83
+ build_all, build_geometry, build_hlod, validate_assets,
84
+ get_build_status, cook_content,
85
+ get_log, search_log, get_message_log,
86
+ set_dialog_policy, clear_dialog_policy, get_dialog_policy,
87
+ list_dialogs, respond_to_dialog
88
+
89
+ reflection — UE class/struct/enum reflection, gameplay tags
90
+ reflect_class, reflect_struct, reflect_enum, list_classes,
91
+ list_tags, create_tag
92
+
93
+ gameplay — Physics, collision, navigation, input, behavior trees, AI, game framework
94
+ set_collision_profile, set_simulate_physics, set_collision_enabled,
95
+ set_physics_properties, rebuild_navigation, get_navmesh_info,
96
+ project_to_nav, spawn_nav_modifier,
97
+ create_input_action, create_input_mapping, list_input_assets,
98
+ list_behavior_trees, get_behavior_tree_info,
99
+ create_blackboard, create_behavior_tree,
100
+ create_eqs_query, list_eqs_queries,
101
+ add_perception, configure_sense,
102
+ create_state_tree, list_state_trees, add_state_tree_component,
103
+ create_smart_object_def, add_smart_object_component,
104
+ create_game_mode, create_game_state, create_player_controller,
105
+ create_player_state, create_hud, set_world_game_mode, get_framework_info
106
+
107
+ gas — Gameplay Ability System
108
+ add_asc, create_attribute_set, add_attribute,
109
+ create_ability, set_ability_tags,
110
+ create_effect, set_effect_modifier,
111
+ create_cue, get_info
112
+
113
+ networking — Replication and networking
114
+ set_replicates, set_property_replicated, configure_net_frequency,
115
+ set_dormancy, set_net_load_on_client, set_always_relevant,
116
+ set_only_relevant_to_owner, configure_cull_distance,
117
+ set_priority, set_replicate_movement, get_info
118
+
119
+ demo — Neon Shrine demo scene
120
+ step, cleanup
121
+
122
+ feedback — Agent feedback submission
123
+ submit
124
+
125
+ ═══ TIPS ═══
126
+ • Start with level(action="get_outliner") or asset(action="list") to discover what's in the project.
127
+ • Use reflection(action="reflect_class") to understand any UE class's properties.
128
+ • asset(action="search", query="/Game/Characters/*") accepts wildcards.
129
+ • For BP scripting: blueprint(action="search_node_types") → blueprint(action="add_node") → blueprint(action="connect_pins").
130
+ • editor(action="execute_python") is the escape hatch for any Unreal Python API call.
131
+ • Animation tools need a skeleton path — use animation(action="list_skeletal_meshes") to find it.
132
+ • Editor lifecycle: editor(action="stop_editor") / editor(action="start_editor") / editor(action="restart_editor") manage the UE process.
133
+ • editor(action="hot_reload") triggers Live Coding compilation without restarting the editor.
134
+ • editor(action="focus_on_actor", actorLabel="MyActor") snaps the viewport to any actor.
135
+ • Log output: editor(action="get_log", category="LogMCPBridge") to see bridge-specific logs.
136
+
137
+ ═══ FEEDBACK ═══
138
+ If you had to use editor(action="execute_python") as a workaround because a native tool
139
+ couldn't handle the task, keep a mental note of what you did and why. When your task is
140
+ complete, tell the user:
141
+ "I had to use custom Python scripts to [describe what]. Would you like to submit
142
+ feedback to help improve ue-mcp?"
143
+ If the user agrees, call feedback(action="submit") with:
144
+ • title — short, generic description of the gap (no project-specific details)
145
+ • summary — what was attempted and why the native tool fell short
146
+ • pythonWorkaround — the Python code that was used
147
+ • idealTool — what tool/action should handle this natively
148
+ This creates a GitHub issue so the maintainers can add proper support.
149
+ `;
150
+ //# sourceMappingURL=instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoJlC,CAAC"}
@@ -0,0 +1,32 @@
1
+ export interface PluginInfo {
2
+ name: string;
3
+ contentDir: string;
4
+ mountPoint: string;
5
+ }
6
+ export interface UeMcpConfig {
7
+ /** Content roots to search by default (e.g. ["/Game/", "/GASP/", "/MyPlugin/"]) */
8
+ contentRoots?: string[];
9
+ /** Tool categories to disable (e.g. ["gas", "networking", "pcg"]) */
10
+ disable?: string[];
11
+ }
12
+ export declare class ProjectContext {
13
+ projectPath: string | null;
14
+ projectName: string | null;
15
+ contentDir: string | null;
16
+ engineAssociation: string | null;
17
+ config: UeMcpConfig;
18
+ get isLoaded(): boolean;
19
+ setProject(inputPath: string): void;
20
+ ensureLoaded(): void;
21
+ resolveContentPath(assetPath: string): string;
22
+ resolveContentDir(dirPath: string): string;
23
+ getRelativeContentPath(absolutePath: string): string;
24
+ get projectDir(): string | null;
25
+ get configDir(): string | null;
26
+ get pluginsDir(): string | null;
27
+ discoverPlugins(): PluginInfo[];
28
+ resolvePluginPath(mountPath: string): string | null;
29
+ getRelativePluginPath(absolutePath: string): string | null;
30
+ private parseUProject;
31
+ private loadConfig;
32
+ }
@@ -0,0 +1,175 @@
1
+ import * as fs from "node:fs";
2
+ import * as path from "node:path";
3
+ export class ProjectContext {
4
+ projectPath = null;
5
+ projectName = null;
6
+ contentDir = null;
7
+ engineAssociation = null;
8
+ config = {};
9
+ get isLoaded() {
10
+ return this.projectPath !== null;
11
+ }
12
+ setProject(inputPath) {
13
+ if (inputPath.endsWith(".uproject")) {
14
+ this.projectPath = path.resolve(inputPath);
15
+ }
16
+ else {
17
+ const files = fs
18
+ .readdirSync(inputPath)
19
+ .filter((f) => f.endsWith(".uproject"));
20
+ if (files.length === 0) {
21
+ throw new Error(`No .uproject file found in ${inputPath}`);
22
+ }
23
+ this.projectPath = path.resolve(inputPath, files[0]);
24
+ }
25
+ this.projectName = path.basename(this.projectPath, ".uproject");
26
+ this.contentDir = path.join(path.dirname(this.projectPath), "Content");
27
+ this.parseUProject();
28
+ this.loadConfig();
29
+ }
30
+ ensureLoaded() {
31
+ if (!this.isLoaded) {
32
+ throw new Error('No project loaded. Pass the .uproject path as an argument in your MCP config, e.g. "args": ["C:/path/to/MyGame.uproject"]');
33
+ }
34
+ }
35
+ resolveContentPath(assetPath) {
36
+ this.ensureLoaded();
37
+ if (isGamePath(assetPath)) {
38
+ let stripped = stripGamePrefix(assetPath);
39
+ if (!stripped.endsWith(".uasset") && !stripped.endsWith(".umap")) {
40
+ stripped += ".uasset";
41
+ }
42
+ return path.join(this.contentDir, ...stripped.split("/"));
43
+ }
44
+ if (path.isAbsolute(assetPath))
45
+ return assetPath;
46
+ let normalized = assetPath.replace(/\\/g, "/");
47
+ if (!normalized.endsWith(".uasset") && !normalized.endsWith(".umap")) {
48
+ normalized += ".uasset";
49
+ }
50
+ return path.join(this.contentDir, ...normalized.split("/"));
51
+ }
52
+ resolveContentDir(dirPath) {
53
+ this.ensureLoaded();
54
+ if (isGamePath(dirPath)) {
55
+ const stripped = stripGamePrefix(dirPath).replace(/\/+$/, "");
56
+ return path.join(this.contentDir, ...stripped.split("/"));
57
+ }
58
+ const pluginResolved = this.resolvePluginPath(dirPath);
59
+ if (pluginResolved)
60
+ return pluginResolved;
61
+ if (path.isAbsolute(dirPath))
62
+ return dirPath;
63
+ return path.join(this.contentDir, ...dirPath.replace(/\\/g, "/").replace(/\/+$/, "").split("/"));
64
+ }
65
+ getRelativeContentPath(absolutePath) {
66
+ if (!this.contentDir)
67
+ return absolutePath;
68
+ const normalized = absolutePath.replace(/\\/g, "/");
69
+ const contentNorm = this.contentDir.replace(/\\/g, "/");
70
+ if (normalized.startsWith(contentNorm)) {
71
+ const relative = normalized.slice(contentNorm.length + 1).replace(".uasset", "");
72
+ return "/Game/" + relative;
73
+ }
74
+ const pluginPath = this.getRelativePluginPath(absolutePath);
75
+ if (pluginPath)
76
+ return pluginPath;
77
+ return absolutePath;
78
+ }
79
+ get projectDir() {
80
+ return this.projectPath ? path.dirname(this.projectPath) : null;
81
+ }
82
+ get configDir() {
83
+ return this.projectDir ? path.join(this.projectDir, "Config") : null;
84
+ }
85
+ get pluginsDir() {
86
+ return this.projectDir ? path.join(this.projectDir, "Plugins") : null;
87
+ }
88
+ discoverPlugins() {
89
+ if (!this.pluginsDir || !fs.existsSync(this.pluginsDir))
90
+ return [];
91
+ const plugins = [];
92
+ function scan(dir) {
93
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
94
+ if (!entry.isDirectory())
95
+ continue;
96
+ const full = path.join(dir, entry.name);
97
+ const contentDir = path.join(full, "Content");
98
+ const hasUplugin = fs.readdirSync(full).some((f) => f.endsWith(".uplugin"));
99
+ if (hasUplugin && fs.existsSync(contentDir)) {
100
+ plugins.push({
101
+ name: entry.name,
102
+ contentDir,
103
+ mountPoint: `/${entry.name}/`,
104
+ });
105
+ }
106
+ else if (!hasUplugin) {
107
+ scan(full);
108
+ }
109
+ }
110
+ }
111
+ scan(this.pluginsDir);
112
+ return plugins;
113
+ }
114
+ resolvePluginPath(mountPath) {
115
+ const plugins = this.discoverPlugins();
116
+ const normalized = mountPath.replace(/\\/g, "/");
117
+ for (const plugin of plugins) {
118
+ if (normalized.startsWith(plugin.mountPoint)) {
119
+ const rest = normalized.slice(plugin.mountPoint.length);
120
+ return path.join(plugin.contentDir, ...rest.split("/").filter(Boolean));
121
+ }
122
+ if (normalized === `/${plugin.name}` || normalized === `/${plugin.name}/`) {
123
+ return plugin.contentDir;
124
+ }
125
+ }
126
+ return null;
127
+ }
128
+ getRelativePluginPath(absolutePath) {
129
+ const normalized = absolutePath.replace(/\\/g, "/");
130
+ for (const plugin of this.discoverPlugins()) {
131
+ const contentNorm = plugin.contentDir.replace(/\\/g, "/");
132
+ if (normalized.startsWith(contentNorm)) {
133
+ const relative = normalized.slice(contentNorm.length + 1).replace(".uasset", "");
134
+ return plugin.mountPoint + relative;
135
+ }
136
+ }
137
+ return null;
138
+ }
139
+ parseUProject() {
140
+ if (!this.projectPath)
141
+ return;
142
+ try {
143
+ const json = JSON.parse(fs.readFileSync(this.projectPath, "utf-8"));
144
+ this.engineAssociation = json.EngineAssociation ?? null;
145
+ }
146
+ catch {
147
+ this.engineAssociation = null;
148
+ }
149
+ }
150
+ loadConfig() {
151
+ if (!this.projectDir)
152
+ return;
153
+ const configPath = path.join(this.projectDir, ".ue-mcp.json");
154
+ if (!fs.existsSync(configPath))
155
+ return;
156
+ try {
157
+ this.config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
158
+ console.error(`[ue-mcp] Loaded config from ${configPath}`);
159
+ }
160
+ catch (e) {
161
+ console.error(`[ue-mcp] Failed to parse .ue-mcp.json: ${e instanceof Error ? e.message : e}`);
162
+ }
163
+ }
164
+ }
165
+ function isGamePath(p) {
166
+ return (p.startsWith("/Game/") || p.toLowerCase() === "/game");
167
+ }
168
+ function stripGamePrefix(p) {
169
+ if (p.startsWith("/Game/"))
170
+ return p.slice(6);
171
+ if (p.toLowerCase() === "/game")
172
+ return "";
173
+ return p;
174
+ }
175
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAelC,MAAM,OAAO,cAAc;IACzB,WAAW,GAAkB,IAAI,CAAC;IAClC,WAAW,GAAkB,IAAI,CAAC;IAClC,UAAU,GAAkB,IAAI,CAAC;IACjC,iBAAiB,GAAkB,IAAI,CAAC;IACxC,MAAM,GAAgB,EAAE,CAAC;IAEzB,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC;IACnC,CAAC;IAED,UAAU,CAAC,SAAiB;QAC1B,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACpC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,GAAG,EAAE;iBACb,WAAW,CAAC,SAAS,CAAC;iBACtB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;YAC1C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,8BAA8B,SAAS,EAAE,CAAC,CAAC;YAC7D,CAAC;YACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACvD,CAAC;QAED,IAAI,CAAC,WAA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AE,CAAC,UAAU,CAAC,UAAU,CAAC;YAAE,OAAO;QACvC,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;YAC/D,OAAO,CAAC,KAAK,CAAC,+BAA+B,UAAU,EAAE,CAAC,CAAC;QAC7D,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAChG,CAAC;IACH,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CACL,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CACtD,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,CAAS;IAChC,IAAI,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC9C,IAAI,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO;QAAE,OAAO,EAAE,CAAC;IAC3C,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type ToolDef } from "../types.js";
2
+ export declare const animationTool: ToolDef;
@@ -0,0 +1,62 @@
1
+ import { z } from "zod";
2
+ import { categoryTool, bp } from "../types.js";
3
+ export const animationTool = categoryTool("animation", "Animation assets, skeletons, montages, blendspaces, anim blueprints, physics assets.", {
4
+ read_anim_blueprint: bp("read_anim_blueprint"),
5
+ read_montage: bp("read_anim_montage", (p) => ({ assetPath: p.assetPath })),
6
+ read_sequence: bp("read_anim_sequence", (p) => ({ assetPath: p.assetPath })),
7
+ read_blendspace: bp("read_blendspace", (p) => ({ assetPath: p.assetPath })),
8
+ list: bp("list_anim_assets"),
9
+ create_montage: bp("create_anim_montage"),
10
+ create_anim_blueprint: bp("create_anim_blueprint"),
11
+ create_blendspace: bp("create_blendspace"),
12
+ add_notify: bp("add_anim_notify"),
13
+ get_skeleton_info: bp("get_skeleton_info"),
14
+ list_sockets: bp("list_sockets"),
15
+ list_skeletal_meshes: bp("list_skeletal_meshes"),
16
+ get_physics_asset: bp("get_physics_asset_info"),
17
+ create_sequence: bp("create_sequence"),
18
+ set_bone_keyframes: bp("set_bone_keyframes"),
19
+ get_bone_transforms: bp("get_bone_transforms"),
20
+ set_montage_sequence: bp("set_montage_sequence"),
21
+ }, `- read_anim_blueprint: Read AnimBP structure. Params: assetPath
22
+ - read_montage: Read montage. Params: assetPath
23
+ - read_sequence: Read anim sequence. Params: assetPath
24
+ - read_blendspace: Read blendspace. Params: assetPath
25
+ - list: List anim assets. Params: directory?, recursive?
26
+ - create_montage: Create montage. Params: animSequencePath, name?, packagePath?
27
+ - create_anim_blueprint: Create AnimBP. Params: skeletonPath, name?, packagePath?
28
+ - create_blendspace: Create blendspace. Params: skeletonPath, name?, packagePath?, axisHorizontal?, axisVertical?
29
+ - add_notify: Add notify. Params: assetPath, notifyName, triggerTime, notifyClass?
30
+ - get_skeleton_info: Read skeleton. Params: assetPath
31
+ - list_sockets: List sockets. Params: assetPath
32
+ - list_skeletal_meshes: List skeletal meshes. Params: directory?, recursive?
33
+ - get_physics_asset: Read physics asset. Params: assetPath
34
+ - create_sequence: Create blank AnimSequence. Params: name, skeletonPath, packagePath?, numFrames?, frameRate?
35
+ - set_bone_keyframes: Set bone transform keyframes. Params: assetPath, boneName, keyframes (array of {frame, location?, rotation?, scale?})
36
+ - get_bone_transforms: Read reference pose transforms. Params: skeletonPath, boneNames? (array filter)
37
+ - set_montage_sequence: Replace animation sequence in a montage. Params: assetPath, animSequencePath, slotIndex?`, {
38
+ assetPath: z.string().optional(),
39
+ directory: z.string().optional(),
40
+ recursive: z.boolean().optional(),
41
+ animSequencePath: z.string().optional(),
42
+ skeletonPath: z.string().optional(),
43
+ name: z.string().optional(),
44
+ packagePath: z.string().optional(),
45
+ axisHorizontal: z.string().optional(),
46
+ axisVertical: z.string().optional(),
47
+ notifyName: z.string().optional(),
48
+ triggerTime: z.number().optional(),
49
+ notifyClass: z.string().optional(),
50
+ slotIndex: z.number().optional(),
51
+ numFrames: z.number().optional(),
52
+ frameRate: z.number().optional(),
53
+ boneName: z.string().optional(),
54
+ boneNames: z.array(z.string()).optional(),
55
+ keyframes: z.array(z.object({
56
+ frame: z.number(),
57
+ location: z.object({ x: z.number(), y: z.number(), z: z.number() }).optional(),
58
+ rotation: z.object({ x: z.number(), y: z.number(), z: z.number(), w: z.number() }).optional(),
59
+ scale: z.object({ x: z.number(), y: z.number(), z: z.number() }).optional(),
60
+ })).optional(),
61
+ });
62
+ //# sourceMappingURL=animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.js","sourceRoot":"","sources":["../../src/tools/animation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,EAAE,EAAgB,MAAM,aAAa,CAAC;AAE7D,MAAM,CAAC,MAAM,aAAa,GAAY,YAAY,CAChD,WAAW,EACX,sFAAsF,EACtF;IACE,mBAAmB,EAAG,EAAE,CAAC,qBAAqB,CAAC;IAC/C,YAAY,EAAU,EAAE,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;IAClF,aAAa,EAAS,EAAE,CAAC,oBAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;IACnF,eAAe,EAAO,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,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AC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;KAC5E,CAAC,CAAC,CAAC,QAAQ,EAAE;CACf,CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type ToolDef } from "../types.js";
2
+ export declare const assetTool: ToolDef;
@@ -0,0 +1,128 @@
1
+ import * as fs from "node:fs";
2
+ import * as path from "node:path";
3
+ import { z } from "zod";
4
+ import { categoryTool, bp } from "../types.js";
5
+ export const assetTool = categoryTool("asset", "Asset management: list, search, read, CRUD, import meshes/textures, datatables.", {
6
+ list: {
7
+ handler: async (ctx, p) => {
8
+ ctx.project.ensureLoaded();
9
+ const dir = p.directory ? ctx.project.resolveContentDir(p.directory) : ctx.project.contentDir;
10
+ const recursive = p.recursive !== false;
11
+ const typeFilter = p.typeFilter?.toLowerCase();
12
+ if (!fs.existsSync(dir))
13
+ throw new Error(`Directory not found: ${dir}`);
14
+ const assets = [];
15
+ function scan(d) {
16
+ for (const entry of fs.readdirSync(d, { withFileTypes: true })) {
17
+ const full = path.join(d, entry.name);
18
+ if (entry.isDirectory()) {
19
+ if (recursive)
20
+ scan(full);
21
+ }
22
+ else {
23
+ const ext = path.extname(entry.name).slice(1).toLowerCase();
24
+ if (ext !== "uasset" && ext !== "umap")
25
+ continue;
26
+ if (typeFilter && ext !== typeFilter)
27
+ continue;
28
+ assets.push({ path: ctx.project.getRelativeContentPath(full), name: path.basename(entry.name, path.extname(entry.name)), extension: ext, sizeKB: Math.round(fs.statSync(full).size / 1024) });
29
+ }
30
+ }
31
+ }
32
+ scan(dir);
33
+ const result = { directory: p.directory ?? "/Game/", recursive, assetCount: assets.length, assets: assets.slice(0, 2000) };
34
+ if (assets.length === 0) {
35
+ const plugins = ctx.project.discoverPlugins();
36
+ if (plugins.length > 0) {
37
+ result.suggestion = `No assets found in ${p.directory ?? "/Game/"}. This project has plugin content — try listing one of these: ${plugins.map((pl) => pl.mountPoint).join(", ")}`;
38
+ result.availablePlugins = plugins.map((pl) => ({ name: pl.name, mountPoint: pl.mountPoint }));
39
+ }
40
+ }
41
+ return result;
42
+ },
43
+ },
44
+ search: {
45
+ handler: async (ctx, p) => {
46
+ const { action: _, ...rest } = p;
47
+ const roots = ctx.project.config.contentRoots;
48
+ // If no directory specified and contentRoots configured, search each root and merge
49
+ if (!p.directory && roots && roots.length > 0) {
50
+ const maxResults = p.maxResults ?? 50;
51
+ const allResults = [];
52
+ for (const root of roots) {
53
+ const res = await ctx.bridge.call("search_assets", { ...rest, directory: root });
54
+ if (res.results && Array.isArray(res.results)) {
55
+ allResults.push(...res.results);
56
+ }
57
+ if (allResults.length >= maxResults)
58
+ break;
59
+ }
60
+ return {
61
+ query: p.query ?? "",
62
+ searchScope: roots,
63
+ resultCount: Math.min(allResults.length, maxResults),
64
+ results: allResults.slice(0, maxResults),
65
+ success: true,
66
+ };
67
+ }
68
+ return ctx.bridge.call("search_assets", rest);
69
+ },
70
+ },
71
+ read: bp("read_asset", (p) => ({ path: p.assetPath })),
72
+ read_properties: bp("read_asset_properties"),
73
+ duplicate: bp("duplicate_asset"),
74
+ rename: bp("rename_asset"),
75
+ move: bp("move_asset"),
76
+ delete: bp("delete_asset"),
77
+ save: bp("save_asset"),
78
+ set_mesh_material: bp("set_mesh_material"),
79
+ recenter_pivot: bp("recenter_pivot"),
80
+ import_static_mesh: bp("import_static_mesh"),
81
+ import_skeletal_mesh: bp("import_skeletal_mesh"),
82
+ import_animation: bp("import_animation"),
83
+ import_texture: bp("import_texture"),
84
+ read_datatable: bp("read_datatable", (p) => ({ path: p.assetPath, rowFilter: p.rowFilter })),
85
+ create_datatable: bp("create_datatable"),
86
+ reimport_datatable: bp("reimport_datatable", (p) => ({ path: p.assetPath, jsonPath: p.jsonPath, jsonString: p.jsonString })),
87
+ list_textures: bp("list_textures"),
88
+ get_texture_info: bp("get_texture_info"),
89
+ set_texture_settings: bp("set_texture_settings"),
90
+ }, `- list: List assets in directory. Params: directory?, typeFilter?, recursive?
91
+ - search: Search by name/class/path. Params: query, directory?, maxResults?, searchAll? (set searchAll=true to search all content roots including plugin paths like /GASP/, not just /Game/)
92
+ - read: Read asset via reflection. Params: assetPath
93
+ - read_properties: Read specific properties. Params: assetPath, exportName?, propertyName?
94
+ - duplicate: Duplicate asset. Params: sourcePath, destinationPath
95
+ - rename: Rename asset. Params: assetPath, newName
96
+ - move: Move asset. Params: sourcePath, destinationPath
97
+ - delete: Delete asset. Params: assetPath
98
+ - save: Save asset(s). Params: assetPath?
99
+ - set_mesh_material: Assign material to static mesh slot. Params: assetPath, materialPath, slotIndex?
100
+ - recenter_pivot: Move static mesh pivot to geometry center. Params: assetPath
101
+ - import_static_mesh: Import from FBX/OBJ. Params: filePath, name?, packagePath?
102
+ - import_skeletal_mesh: Import from FBX. Params: filePath, name?, packagePath?, skeletonPath?
103
+ - import_animation: Import anim from FBX. Params: filePath, name?, packagePath?, skeletonPath?
104
+ - import_texture: Import image. Params: filePath, name?, packagePath?
105
+ - read_datatable: Read DataTable rows. Params: assetPath, rowFilter?
106
+ - create_datatable: Create DataTable. Params: name, packagePath?, rowStruct
107
+ - reimport_datatable: Reimport from JSON. Params: assetPath, jsonPath?, jsonString?
108
+ - list_textures: List textures. Params: directory?, recursive?
109
+ - get_texture_info: Get texture details. Params: assetPath
110
+ - set_texture_settings: Set texture settings. Params: assetPath, settings`, {
111
+ assetPath: z.string().optional().describe("Asset path"),
112
+ directory: z.string().optional(), query: z.string().optional(),
113
+ maxResults: z.number().optional(), typeFilter: z.string().optional(),
114
+ searchAll: z.boolean().optional().describe("Search all content roots (plugins, engine content) not just /Game/"),
115
+ recursive: z.boolean().optional(),
116
+ sourcePath: z.string().optional(), destinationPath: z.string().optional(),
117
+ newName: z.string().optional(),
118
+ materialPath: z.string().optional().describe("Material asset path for set_mesh_material"),
119
+ slotIndex: z.number().optional().describe("Material slot index (default 0)"),
120
+ filePath: z.string().optional().describe("Absolute file path for imports"),
121
+ name: z.string().optional(), packagePath: z.string().optional(),
122
+ skeletonPath: z.string().optional(),
123
+ rowFilter: z.string().optional(), rowStruct: z.string().optional(),
124
+ jsonPath: z.string().optional(), jsonString: z.string().optional(),
125
+ exportName: z.string().optional(), propertyName: z.string().optional(),
126
+ settings: z.record(z.unknown()).optional(),
127
+ });
128
+ //# sourceMappingURL=asset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset.js","sourceRoot":"","sources":["../../src/tools/asset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,EAAE,EAAgB,MAAM,aAAa,CAAC;AAE7D,MAAM,CAAC,MAAM,SAAS,GAAY,YAAY,CAC5C,OAAO,EACP,iFAAiF,EACjF;IACE,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE;YACxB,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;YAC3B,MAAM,GAAG,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,UAAW,CAAC;YACzG,MAAM,SAAS,GAAG,CAAC,CAAC,SAAS,KAAK,KAAK,CAAC;YACxC,MAAM,UAAU,GAAI,CAAC,CAAC,UAAiC,EAAE,WAAW,EAAE,CAAC;YACvE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,EAAE,CAAC,CAAC;YACxE,MAAM,MAAM,GAA6E,EAAE,CAAC;YAC5F,SAAS,IAAI,CAAC,CAAS;gBACrB,KAAK,MAAM,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,aAAa,EAAE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AAM,EAAE,CAAC,QAAQ,EAAE;IACzE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IACzF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC5E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC1E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC3C,CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type ToolDef } from "../types.js";
2
+ export declare const audioTool: ToolDef;
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+ import { categoryTool, bp } from "../types.js";
3
+ export const audioTool = categoryTool("audio", "Audio: sound assets, playback, ambient sounds, SoundCues, MetaSounds.", {
4
+ list: bp("list_sound_assets"),
5
+ play_at_location: bp("play_sound_at_location"),
6
+ spawn_ambient: bp("spawn_ambient_sound"),
7
+ create_cue: bp("create_sound_cue"),
8
+ create_metasound: bp("create_metasound_source"),
9
+ }, `- list: List sound assets. Params: directory?, recursive?
10
+ - play_at_location: Play sound. Params: soundPath, location {x,y,z}, volumeMultiplier?, pitchMultiplier?
11
+ - spawn_ambient: Place ambient sound. Params: soundPath, location {x,y,z}, label?
12
+ - create_cue: Create SoundCue. Params: name, packagePath?, soundWavePath?
13
+ - create_metasound: Create MetaSoundSource. Params: name, packagePath?`, {
14
+ directory: z.string().optional(), recursive: z.boolean().optional(),
15
+ soundPath: z.string().optional(),
16
+ location: z.object({ x: z.number(), y: z.number(), z: z.number() }).optional(),
17
+ volumeMultiplier: z.number().optional(),
18
+ pitchMultiplier: z.number().optional(),
19
+ label: z.string().optional(),
20
+ name: z.string().optional(),
21
+ packagePath: z.string().optional(),
22
+ soundWavePath: z.string().optional(),
23
+ });
24
+ //# sourceMappingURL=audio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/tools/audio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,EAAE,EAAgB,MAAM,aAAa,CAAC;AAE7D,MAAM,CAAC,MAAM,SAAS,GAAY,YAAY,CAC5C,OAAO,EACP,uEAAuE,EACvE;IACE,IAAI,EAAe,EAAE,CAAC,mBAAmB,CAAC;IAC1C,gBAAgB,EAAG,EAAE,CAAC,wBAAwB,CAAC;IAC/C,aAAa,EAAM,EAAE,CAAC,qBAAqB,CAAC;IAC5C,UAAU,EAAS,EAAE,CAAC,kBAAkB,CAAC;IACzC,gBAAgB,EAAG,EAAE,CAAC,yBAAyB,CAAC;CACjD,EACD;;;;uEAIqE,EACrE;IACE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE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