feat: 重构 memory 系统,支持 user memory 和 work memory 分离

This commit is contained in:
qzl
2026-03-23 14:25:47 +08:00
parent 3aacc756db
commit 6be616f108
70 changed files with 7031 additions and 431 deletions
+4
View File
@@ -32,6 +32,10 @@ class AutomationJob(TimestampMixin, SoftDeleteMixin, Base):
UUID(as_uuid=True),
nullable=False,
)
bootstrap_key: Mapped[str | None] = mapped_column(
String(64),
nullable=True,
)
title: Mapped[str] = mapped_column(
String(255),
nullable=False,
-11
View File
@@ -16,12 +16,6 @@ class MemoryType(str, Enum):
WORK = "work"
class MemorySource(str, Enum):
MANUAL = "manual"
AGENT = "agent"
IMPORTED = "imported"
class MemoryStatus(str, Enum):
ACTIVE = "active"
DISABLED = "disabled"
@@ -46,15 +40,10 @@ class Memory(TimestampMixin, Base):
String(20),
nullable=False,
)
title: Mapped[str | None] = mapped_column(String(255), nullable=True)
content: Mapped[dict] = mapped_column(
json_jsonb,
nullable=False,
)
source: Mapped[MemorySource] = mapped_column(
String(20),
nullable=False,
)
status: Mapped[MemoryStatus] = mapped_column(
String(20),
nullable=False,