File size: 2,636 Bytes
d4e46e2
 
3139f8e
d4e46e2
79a030f
022df3f
 
 
 
3139f8e
 
 
 
 
79a030f
 
 
6cef122
79a030f
022df3f
3139f8e
d4e46e2
b752c9c
 
 
d4e46e2
 
3139f8e
6cef122
3139f8e
d4e46e2
 
 
 
6cef122
3139f8e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d4e46e2
3139f8e
d4e46e2
 
 
b752c9c
 
 
 
 
 
 
 
 
d4e46e2
3139f8e
79a030f
d4e46e2
 
 
 
3139f8e
d4e46e2
 
 
 
 
 
79a030f
 
 
 
d4e46e2
 
 
 
 
6cef122
 
 
 
 
3139f8e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
from pydantic import BaseModel, Field
from typing import List, Dict, Optional, Union, Literal
from enum import Enum

# --- 0. ORCHESTRATION MODELS ---
class UserGoal(BaseModel):
    user_id: str
    project_id: str
    goal_text: str
    image_base64: Optional[str] = None

class RecallRequest(BaseModel):
    project_id: str
    user_feedback: Optional[str] = "What is the next step?"

class ResetRequest(BaseModel):
    junior_instance_id: str
    supervisor_instance_id: str
    reason: str

# --- 1. THE MATTER FORMAT (Physical World) ---
class Vector3(BaseModel):
    x: float = 0.0
    y: float = 0.0
    z: float = 0.0

class MatterObject(BaseModel):
    """Represents a primitive part or mesh."""
    id: str
    class_name: str = "Part" # Part, MeshPart, TrussPart, WedgePart
    position: Vector3
    rotation: Vector3
    size: Vector3
    color_hex: str = "#A3A2A5"
    anchored: bool = True
    transparency: float = 0.0
    material: str = "Plastic"
    mesh_id: Optional[str] = None # For custom meshes
    texture_id: Optional[str] = None # rbxassetid://...

class ToolboxAsset(BaseModel):
    """Represents a pre-made model from Roblox Toolbox."""
    id: str
    asset_id: str # The numeric Roblox Asset ID (e.g. "123456")
    position: Vector3
    rotation: Vector3
    scale: float = 1.0

class RiggingCommand(BaseModel):
    """Instructions to rig/connect parts."""
    part0_id: str
    part1_id: str
    joint_type: Literal["Weld", "Motor6D", "HingeConstraint", "BallSocketConstraint"]
    position: Vector3 # World position where the joint sits

# --- 2. THE PROJECT FLOW FORMAT ---
class TaskNode(BaseModel):
    task_id: str
    title: str
    role_required: Literal[
        "PROJECT_MANAGER", 
        "SUPERVISOR_WORLD", 
        "SUPERVISOR_SCRIPT", 
        "3D_ARTIST", 
        "CONCEPT_ARTIST", 
        "SCRIPTING_ENGINEER", 
        "ERRANDS"
    ]
    instruction: str
    status: Literal["PENDING", "IN_PROGRESS", "COMPLETED", "FAILED"] = "PENDING"
    assigned_instance_id: Optional[str] = None
    subtasks: List['TaskNode'] = [] 

class ProjectFlow(BaseModel):
    project_id: str
    game_concept_summary: str
    root_tasks: List[TaskNode]

# --- 3. COMMUNICATION PROTOCOLS ---
class AgentMessage(BaseModel):
    id: str
    from_agent: str
    to_agents: List[str]
    role: str
    content: str
    image_base64: Optional[str] = None

class GenerationRequest(BaseModel):
    agent_type: str
    agent_instance_id: str
    conversation_partner_id: str 
    prompt: str
    image_base64: Optional[str] = None

class ImageGenerationRequest(BaseModel):
    agent_instance_id: str
    prompt: str