mcpforunityserver 9.4.0b20260203025228__py3-none-any.whl
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.
- cli/__init__.py +3 -0
- cli/commands/__init__.py +3 -0
- cli/commands/animation.py +84 -0
- cli/commands/asset.py +280 -0
- cli/commands/audio.py +125 -0
- cli/commands/batch.py +171 -0
- cli/commands/code.py +182 -0
- cli/commands/component.py +190 -0
- cli/commands/editor.py +447 -0
- cli/commands/gameobject.py +487 -0
- cli/commands/instance.py +93 -0
- cli/commands/lighting.py +123 -0
- cli/commands/material.py +239 -0
- cli/commands/prefab.py +248 -0
- cli/commands/scene.py +231 -0
- cli/commands/script.py +222 -0
- cli/commands/shader.py +226 -0
- cli/commands/texture.py +540 -0
- cli/commands/tool.py +58 -0
- cli/commands/ui.py +258 -0
- cli/commands/vfx.py +421 -0
- cli/main.py +281 -0
- cli/utils/__init__.py +31 -0
- cli/utils/config.py +58 -0
- cli/utils/confirmation.py +37 -0
- cli/utils/connection.py +254 -0
- cli/utils/constants.py +23 -0
- cli/utils/output.py +195 -0
- cli/utils/parsers.py +112 -0
- cli/utils/suggestions.py +34 -0
- core/__init__.py +0 -0
- core/config.py +67 -0
- core/constants.py +4 -0
- core/logging_decorator.py +37 -0
- core/telemetry.py +551 -0
- core/telemetry_decorator.py +164 -0
- main.py +845 -0
- mcpforunityserver-9.4.0b20260203025228.dist-info/METADATA +328 -0
- mcpforunityserver-9.4.0b20260203025228.dist-info/RECORD +105 -0
- mcpforunityserver-9.4.0b20260203025228.dist-info/WHEEL +5 -0
- mcpforunityserver-9.4.0b20260203025228.dist-info/entry_points.txt +3 -0
- mcpforunityserver-9.4.0b20260203025228.dist-info/licenses/LICENSE +21 -0
- mcpforunityserver-9.4.0b20260203025228.dist-info/top_level.txt +7 -0
- models/__init__.py +4 -0
- models/models.py +56 -0
- models/unity_response.py +70 -0
- services/__init__.py +0 -0
- services/api_key_service.py +235 -0
- services/custom_tool_service.py +499 -0
- services/registry/__init__.py +22 -0
- services/registry/resource_registry.py +53 -0
- services/registry/tool_registry.py +51 -0
- services/resources/__init__.py +86 -0
- services/resources/active_tool.py +48 -0
- services/resources/custom_tools.py +57 -0
- services/resources/editor_state.py +304 -0
- services/resources/gameobject.py +243 -0
- services/resources/layers.py +30 -0
- services/resources/menu_items.py +35 -0
- services/resources/prefab.py +191 -0
- services/resources/prefab_stage.py +40 -0
- services/resources/project_info.py +40 -0
- services/resources/selection.py +56 -0
- services/resources/tags.py +31 -0
- services/resources/tests.py +88 -0
- services/resources/unity_instances.py +125 -0
- services/resources/windows.py +48 -0
- services/state/external_changes_scanner.py +245 -0
- services/tools/__init__.py +83 -0
- services/tools/batch_execute.py +93 -0
- services/tools/debug_request_context.py +86 -0
- services/tools/execute_custom_tool.py +43 -0
- services/tools/execute_menu_item.py +32 -0
- services/tools/find_gameobjects.py +110 -0
- services/tools/find_in_file.py +181 -0
- services/tools/manage_asset.py +119 -0
- services/tools/manage_components.py +131 -0
- services/tools/manage_editor.py +64 -0
- services/tools/manage_gameobject.py +260 -0
- services/tools/manage_material.py +111 -0
- services/tools/manage_prefabs.py +209 -0
- services/tools/manage_scene.py +111 -0
- services/tools/manage_script.py +645 -0
- services/tools/manage_scriptable_object.py +87 -0
- services/tools/manage_shader.py +71 -0
- services/tools/manage_texture.py +581 -0
- services/tools/manage_vfx.py +120 -0
- services/tools/preflight.py +110 -0
- services/tools/read_console.py +151 -0
- services/tools/refresh_unity.py +153 -0
- services/tools/run_tests.py +317 -0
- services/tools/script_apply_edits.py +1006 -0
- services/tools/set_active_instance.py +120 -0
- services/tools/utils.py +348 -0
- transport/__init__.py +0 -0
- transport/legacy/port_discovery.py +329 -0
- transport/legacy/stdio_port_registry.py +65 -0
- transport/legacy/unity_connection.py +910 -0
- transport/models.py +68 -0
- transport/plugin_hub.py +787 -0
- transport/plugin_registry.py +182 -0
- transport/unity_instance_middleware.py +262 -0
- transport/unity_transport.py +94 -0
- utils/focus_nudge.py +589 -0
- utils/module_discovery.py +55 -0
transport/models.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
from pydantic import BaseModel, Field
|
|
3
|
+
from models.models import ToolDefinitionModel
|
|
4
|
+
|
|
5
|
+
# Outgoing (Server -> Plugin)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class WelcomeMessage(BaseModel):
|
|
9
|
+
type: str = "welcome"
|
|
10
|
+
serverTimeout: int
|
|
11
|
+
keepAliveInterval: int
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class RegisteredMessage(BaseModel):
|
|
15
|
+
type: str = "registered"
|
|
16
|
+
session_id: str
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ExecuteCommandMessage(BaseModel):
|
|
20
|
+
type: str = "execute"
|
|
21
|
+
id: str
|
|
22
|
+
name: str
|
|
23
|
+
params: dict[str, Any]
|
|
24
|
+
timeout: float
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class PingMessage(BaseModel):
|
|
28
|
+
"""Server-initiated ping to detect dead connections."""
|
|
29
|
+
type: str = "ping"
|
|
30
|
+
|
|
31
|
+
# Incoming (Plugin -> Server)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class RegisterMessage(BaseModel):
|
|
35
|
+
type: str = "register"
|
|
36
|
+
project_name: str = "Unknown Project"
|
|
37
|
+
project_hash: str
|
|
38
|
+
unity_version: str = "Unknown"
|
|
39
|
+
project_path: str | None = None # Full path to project root (for focus nudging)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class RegisterToolsMessage(BaseModel):
|
|
43
|
+
type: str = "register_tools"
|
|
44
|
+
tools: list[ToolDefinitionModel]
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class PongMessage(BaseModel):
|
|
48
|
+
type: str = "pong"
|
|
49
|
+
session_id: str | None = None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class CommandResultMessage(BaseModel):
|
|
53
|
+
type: str = "command_result"
|
|
54
|
+
id: str
|
|
55
|
+
result: dict[str, Any] = Field(default_factory=dict)
|
|
56
|
+
|
|
57
|
+
# Session Info (API response)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class SessionDetails(BaseModel):
|
|
61
|
+
project: str
|
|
62
|
+
hash: str
|
|
63
|
+
unity_version: str
|
|
64
|
+
connected_at: str
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class SessionList(BaseModel):
|
|
68
|
+
sessions: dict[str, SessionDetails]
|