mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-08-28 05:25:04 +00:00
* docs: rename vault_dir to workspace_dir in documentation and examples * refactor(extract): format long method call across multiple lines * refactor(extract): format system prompt parameters for better readability
16 lines
728 B
Python
16 lines
728 B
Python
"""File node — a file's metadata, links, and chunk references in the graph."""
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
from .file_front_matter import FileFrontMatter
|
|
from .file_link import FileLink
|
|
|
|
|
|
class FileNode(BaseModel):
|
|
"""A workspace file as a graph node."""
|
|
|
|
path: str = Field(default=..., description="Path relative to the workspace")
|
|
st_mtime: float = Field(default=..., description="Filesystem mtime (seconds)")
|
|
links: list[FileLink] = Field(default_factory=list, description="Outgoing wikilinks")
|
|
chunk_ids: list[str] = Field(default_factory=list, description="Owned FileChunk ids")
|
|
front_matter: FileFrontMatter = Field(default_factory=FileFrontMatter, description="Parsed front matter")
|