feat: add adapter read-only MCP boundary
This commit is contained in:
parent
1943c36ef3
commit
f1e31487c0
17 changed files with 209 additions and 45 deletions
|
|
@ -9,8 +9,8 @@ from pathlib import Path
|
|||
from typing import Any
|
||||
|
||||
from .errors import DocForgeError
|
||||
from .models import Node
|
||||
from .project import Project, project_root_fingerprint
|
||||
from .models import Node, ProjectService
|
||||
from .project import project_root_fingerprint
|
||||
|
||||
ID_PATTERN = re.compile(r"[a-z0-9][a-z0-9._-]{1,127}")
|
||||
HASH_PATTERN = re.compile(r"[0-9a-f]{64}")
|
||||
|
|
@ -171,7 +171,7 @@ def normalize_operation(operation: dict[str, Any], *, sequence: int) -> dict[str
|
|||
}
|
||||
|
||||
|
||||
def validate_document(project: Project, document: Any, *, path: Path) -> dict[str, Any]:
|
||||
def validate_document(project: ProjectService, document: Any, *, path: Path) -> dict[str, Any]:
|
||||
if not isinstance(document, dict) or set(document) != CHANGESET_KEYS:
|
||||
raise DocForgeError(
|
||||
"invalid_changeset", "Changeset has missing or unknown fields", path=path.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue