generated from coulomb/repo-seed
Add hub-core package, docs, and State Hub integration scaffold
Extract the first reusable slice (models, schemas, routers, MCP, migrations) from state-hub with INTENT/SCOPE, agent instructions, workplan, and aligned inter_hub capability registry index.
This commit is contained in:
13
hub_core/utils/paths.py
Normal file
13
hub_core/utils/paths.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import socket
|
||||
from typing import Protocol
|
||||
|
||||
|
||||
class RepoPathLike(Protocol):
|
||||
local_path: str | None
|
||||
host_paths: dict
|
||||
|
||||
|
||||
def resolve_repo_path(repo: RepoPathLike, host: str | None = None) -> str | None:
|
||||
selected_host = host or socket.gethostname()
|
||||
host_paths = repo.host_paths or {}
|
||||
return host_paths.get(selected_host) or repo.local_path
|
||||
Reference in New Issue
Block a user