Spaces:
Paused
Paused
Download src/models/supervisor_plan.py from arimatch1/crewhub-api-2: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/spaces/arimatch1/crewhub-api-2/resolve/main/src/models/supervisor_plan.py
- Command line
-
hf download hf://spaces/arimatch1/crewhub-api-2/src/models/supervisor_plan.py
-
curl -L -o supervisor_plan.py https://huggingface.co/spaces/arimatch1/crewhub-api-2/resolve/main/src/models/supervisor_plan.py
1.11 kB
| # Copyright (c) 2026 CrewHub. All rights reserved. | |
| # Proprietary and confidential. See LICENSE for details. | |
| """SupervisorPlan model — LLM-generated orchestration plans.""" | |
| import uuid | |
| from datetime import datetime | |
| from typing import Optional | |
| from sqlalchemy import DateTime, ForeignKey, JSON, String, Uuid, func | |
| from sqlalchemy.orm import Mapped, mapped_column | |
| from src.database import Base | |
| class SupervisorPlan(Base): | |
| __tablename__ = "supervisor_plans" | |
| id: Mapped[uuid.UUID] = mapped_column(Uuid, primary_key=True, default=uuid.uuid4) | |
| user_id: Mapped[uuid.UUID] = mapped_column( | |
| Uuid, ForeignKey("users.id", ondelete="CASCADE"), nullable=False | |
| ) | |
| goal: Mapped[str] = mapped_column(String, nullable=False) | |
| plan_data: Mapped[dict] = mapped_column(JSON, nullable=False) | |
| llm_provider: Mapped[Optional[str]] = mapped_column(String, nullable=True) | |
| status: Mapped[str] = mapped_column(String, default="draft") | |
| created_at: Mapped[datetime] = mapped_column(DateTime, default=func.now()) | |
| expires_at: Mapped[datetime] = mapped_column(DateTime, nullable=False) | |