Initial commit: add .gitignore and README
This commit is contained in:
38
fusionagi/maa/schemas/intent.py
Normal file
38
fusionagi/maa/schemas/intent.py
Normal file
@@ -0,0 +1,38 @@
|
||||
"""Intent formalization schema: intent graph, requirement types, load cases."""
|
||||
|
||||
from enum import Enum
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class RequirementType(str, Enum):
|
||||
DIMENSIONAL = "dimensional"
|
||||
LOAD = "load"
|
||||
ENVIRONMENTAL = "environmental"
|
||||
PROCESS = "process"
|
||||
OTHER = "other"
|
||||
|
||||
|
||||
class IntentNode(BaseModel):
|
||||
node_id: str = Field(..., description="Unique intent node id")
|
||||
requirement_type: RequirementType = Field(...)
|
||||
description: str = Field(...)
|
||||
bounds_ref: str | None = Field(default=None)
|
||||
load_case_ids: list[str] = Field(default_factory=list)
|
||||
metadata: dict[str, Any] = Field(default_factory=dict)
|
||||
|
||||
|
||||
class LoadCase(BaseModel):
|
||||
load_case_id: str = Field(...)
|
||||
description: str = Field(...)
|
||||
boundary_conditions_ref: str | None = Field(default=None)
|
||||
metadata: dict[str, Any] = Field(default_factory=dict)
|
||||
|
||||
|
||||
class EngineeringIntentGraph(BaseModel):
|
||||
intent_id: str = Field(...)
|
||||
nodes: list[IntentNode] = Field(default_factory=list)
|
||||
load_cases: list[LoadCase] = Field(default_factory=list)
|
||||
environmental_bounds: dict[str, Any] = Field(default_factory=dict)
|
||||
metadata: dict[str, Any] = Field(default_factory=dict)
|
||||
Reference in New Issue
Block a user