WIP simplifying load/startup
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from functools import cache
|
||||
from importlib.resources import files
|
||||
from pathlib import Path
|
||||
from typing import Literal
|
||||
|
||||
@@ -13,17 +12,8 @@ DEFAULT_ENV_FILE = Path(".env").resolve()
|
||||
_REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
|
||||
|
||||
@cache
|
||||
def _package_docs_dir() -> Path:
|
||||
docs_dir = files("personal_mcp").joinpath("docs")
|
||||
if not isinstance(docs_dir, Path):
|
||||
raise TypeError("personal_mcp docs must be installed as a filesystem directory")
|
||||
return docs_dir
|
||||
|
||||
|
||||
class Mounts(BaseModel):
|
||||
docs: str = "/docs"
|
||||
docs_dir: DirectoryPath = Field(default_factory=_package_docs_dir)
|
||||
mcp: str = "/mcp"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user