fix 文档管理模块 & 法规对话模块

This commit is contained in:
2026-05-20 23:34:08 +08:00
parent c22b03dc07
commit b065d55c86
39 changed files with 1671 additions and 540 deletions

View File

@@ -31,6 +31,11 @@ class DocumentRepository(ABC):
"""Handle list for the Document Repository instance."""
pass
@abstractmethod
def delete(self, doc_id: str) -> bool:
"""Delete a document record. Returns True if deleted, False if not found."""
pass
@abstractmethod
def update_status(
self,
@@ -94,3 +99,32 @@ class ChunkBuilder(ABC):
) -> list[Chunk]:
"""Handle build for the Chunk Builder instance."""
pass
class ParseArtifactStore(ABC):
"""Persist parse artifacts (structure nodes and semantic blocks) for relational queries."""
@abstractmethod
def save(
self,
doc_id: str,
structure_nodes: list[dict],
semantic_blocks: list[dict],
) -> None:
"""Persist structure nodes and semantic blocks for a document."""
pass
@abstractmethod
def delete(self, doc_id: str) -> None:
"""Remove all parse artifacts for a document."""
pass
@abstractmethod
def get_semantic_blocks(self, doc_id: str) -> list[dict]:
"""Return all semantic blocks for a document."""
pass
@abstractmethod
def get_structure_nodes(self, doc_id: str) -> list[dict]:
"""Return all structure nodes for a document."""
pass