Spaces:
Runtime error
Runtime error
Download dev-agent/app/db/models.py from BeastGokul/MVP: direct link, hf CLI and curl.
- Browser
- Download file 2.33 kB
-
https://huggingface.co/spaces/BeastGokul/MVP/resolve/main/dev-agent/app/db/models.py
- Command line
-
hf download hf://spaces/BeastGokul/MVP/dev-agent/app/db/models.py
-
curl -L -o models.py https://huggingface.co/spaces/BeastGokul/MVP/resolve/main/dev-agent/app/db/models.py
2.33 kB
| from sqlalchemy import Column, Integer, String, DateTime, Text, JSON, Boolean | |
| from sqlalchemy.sql import func | |
| from .database import Base | |
| class AgentSpecModel(Base): | |
| __tablename__ = "agent_specs" | |
| id = Column(Integer, primary_key=True, index=True) | |
| name = Column(String, nullable=False) | |
| description = Column(Text) | |
| version = Column(String, nullable=False) | |
| spec_json = Column(JSON, nullable=False) | |
| status = Column(String, default="draft") | |
| created_at = Column(DateTime(timezone=True), server_default=func.now()) | |
| updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now()) | |
| class AgentVersionModel(Base): | |
| __tablename__ = "agent_versions" | |
| id = Column(Integer, primary_key=True, index=True) | |
| agent_id = Column(Integer, nullable=False) | |
| version = Column(String, nullable=False) | |
| spec_json = Column(JSON, nullable=False) | |
| change_summary = Column(Text) | |
| created_at = Column(DateTime(timezone=True), server_default=func.now()) | |
| class DevSessionModel(Base): | |
| __tablename__ = "dev_sessions" | |
| id = Column(String, primary_key=True) | |
| status = Column(String, default="collecting_requirements") | |
| extracted_requirements = Column(JSON, default=dict) | |
| missing_information = Column(JSON, default=list) | |
| clarification_questions = Column(JSON, default=list) | |
| draft_spec = Column(JSON, nullable=True) | |
| validation_result = Column(JSON, nullable=True) | |
| created_at = Column(DateTime(timezone=True), server_default=func.now()) | |
| updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now()) | |
| class ConversationMessageModel(Base): | |
| __tablename__ = "conversation_messages" | |
| id = Column(Integer, primary_key=True, index=True) | |
| session_id = Column(String, nullable=False) | |
| role = Column(String, nullable=False) | |
| content = Column(Text, nullable=False) | |
| created_at = Column(DateTime(timezone=True), server_default=func.now()) | |
| class ValidationResultModel(Base): | |
| __tablename__ = "validation_results" | |
| id = Column(Integer, primary_key=True, index=True) | |
| agent_id = Column(Integer, nullable=True) | |
| valid = Column(Boolean, nullable=False, default=False) | |
| errors = Column(JSON) | |
| warnings = Column(JSON) | |
| created_at = Column(DateTime(timezone=True), server_default=func.now()) | |