Initial upload: Agentic Codebase Memory Manager v0.1.0
Some checks failed
CI / build (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
2026-03-22 16:00:56 +00:00
parent 19f0d4b8b9
commit 5d886c86db

View File

@@ -0,0 +1,69 @@
"""Pydantic schemas for API."""
from datetime import datetime
from typing import List, Optional
from pydantic import BaseModel, Field
class MemoryEntryCreate(BaseModel):
title: str = Field(..., min_length=1, max_length=255)
content: str = Field(..., min_length=1)
category: str = Field(...)
tags: List[str] = Field(default_factory=list)
agent_id: Optional[str] = Field(default="unknown")
project_path: Optional[str] = Field(default=".")
parent_id: Optional[int] = None
class MemoryEntryUpdate(BaseModel):
title: Optional[str] = Field(None, min_length=1, max_length=255)
content: Optional[str] = Field(None, min_length=1)
category: Optional[str] = None
tags: Optional[List[str]] = None
class MemoryEntryResponse(BaseModel):
id: int
title: str
content: str
category: str
tags: List[str]
agent_id: str
project_path: str
created_at: datetime
updated_at: datetime
parent_id: Optional[int] = None
class Config:
from_attributes = True
class CommitCreate(BaseModel):
message: str = Field(..., min_length=1)
agent_id: Optional[str] = Field(default="unknown")
project_path: Optional[str] = Field(default=".")
class CommitResponse(BaseModel):
id: int
hash: str
message: str
agent_id: str
project_path: str
created_at: datetime
class Config:
from_attributes = True
class DiffResponse(BaseModel):
hash1: str
hash2: str
added: List[dict]
removed: List[dict]
modified: List[dict]
class StatsResponse(BaseModel):
total_entries: int
total_commits: int
category_counts: dict