mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-21 00:22:45 +00:00
- Add file_graph import to component registry - Register FILE_GRAPH enum in ComponentEnum - Implement BaseFileGraph integration in LinkedFileParser - Replace FileEdge with FileLink for better semantic clarity - Add lazy resolution of file_graph from app_context - Update file watcher logging to reflect links instead of edges refactor: streamline MCP transport layer architecture - Remove redundant step shells from reme2/mcp/steps/ - Consolidate all @R.register components to reme2.memory package - Update server.py to import reme2.memory directly - Revise README.md to document new architecture - Simplify module dependencies and import structure
23 lines
679 B
Python
23 lines
679 B
Python
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
from .file_link import FileLink
|
|
|
|
|
|
class FileFrontMatter(BaseModel):
|
|
model_config = ConfigDict(extra="allow")
|
|
|
|
title: str = Field(default="")
|
|
description: str = Field(default="")
|
|
tags: list[str] | None = Field(default=None)
|
|
|
|
@property
|
|
def metadata(self) -> dict:
|
|
return dict(self.__pydantic_extra__ or {})
|
|
|
|
|
|
class FileNode(BaseModel):
|
|
path: str = Field(default=...)
|
|
st_mtime: float = Field(default=...)
|
|
links: list[FileLink] = Field(default_factory=list)
|
|
chunk_ids: list[str] = Field(default_factory=list)
|
|
front_matter: FileFrontMatter = Field(default_factory=FileFrontMatter)
|