feat: Implement Today's Workflow and Agent Huddle enhancements
This commit is contained in:
@@ -46,4 +46,27 @@ class DailyWorkflowTask(Base):
|
||||
plan = relationship("DailyWorkflowPlan", back_populates="tasks")
|
||||
|
||||
|
||||
class TaskHistory(Base):
|
||||
"""
|
||||
Tracks historical tasks for self-learning.
|
||||
Used by TaskMemoryService to prevent redundant suggestions and learn from rejections.
|
||||
"""
|
||||
__tablename__ = "task_history"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
user_id = Column(String(255), nullable=False, index=True)
|
||||
task_hash = Column(String(64), nullable=False, index=True) # Hash of title + description
|
||||
title = Column(String(255), nullable=False)
|
||||
description = Column(Text, nullable=False)
|
||||
pillar_id = Column(String(30), nullable=False)
|
||||
status = Column(String(30), nullable=False) # completed, dismissed, rejected
|
||||
source_agent = Column(String(50), nullable=True)
|
||||
feedback_score = Column(Integer, nullable=True) # -1 (bad), 0 (neutral), 1 (good)
|
||||
feedback_text = Column(Text, nullable=True)
|
||||
created_at = Column(DateTime, default=datetime.utcnow, index=True)
|
||||
|
||||
# Metadata for vector index linking
|
||||
vector_id = Column(String(36), nullable=True)
|
||||
|
||||
Index("ix_daily_workflow_plans_user_date", DailyWorkflowPlan.user_id, DailyWorkflowPlan.date, unique=True)
|
||||
Index("ix_task_history_user_hash", TaskHistory.user_id, TaskHistory.task_hash)
|
||||
|
||||
Reference in New Issue
Block a user