Files
FusionAGI/fusionagi/maa/layers/process_authority.py
defiQUG c052b07662
Some checks failed
Tests / test (3.10) (push) Has been cancelled
Tests / test (3.11) (push) Has been cancelled
Tests / test (3.12) (push) Has been cancelled
Tests / lint (push) Has been cancelled
Tests / docker (push) Has been cancelled
Initial commit: add .gitignore and README
2026-02-09 21:51:42 -08:00

33 lines
1.1 KiB
Python

"""Layer 5 — Manufacturing Process Authority."""
from typing import Any
from pydantic import BaseModel, Field
class ProcessEligibilityResult(BaseModel):
eligible: bool = Field(...)
process_type: str = Field(...)
reason: str | None = Field(default=None)
class ProcessAuthority:
"""Evaluates eligibility for additive, subtractive, hybrid."""
def process_eligible(
self,
design_ref: str,
process_type: str,
context: dict[str, Any] | None = None,
) -> ProcessEligibilityResult:
if not design_ref or not process_type:
return ProcessEligibilityResult(
eligible=False,
process_type=process_type or "unknown",
reason="design_ref and process_type required",
)
pt = process_type.lower()
if pt not in ("additive", "subtractive", "hybrid"):
return ProcessEligibilityResult(eligible=False, process_type=process_type, reason="Unknown process_type")
return ProcessEligibilityResult(eligible=True, process_type=pt, reason=None)