mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 04:40:45 +08:00
完成运行时与启动链路的全面相对路径整改,统一以仓库根为路径基准并移除 oclaw 双层硬编码。
同时补齐路径回归测试与开源自检文档,确保从非仓库 cwd 启动时 workspace 根、配置和 wiki 路径仍稳定可用。 Made-with: Cursor
This commit is contained in:
parent
dbbe3add6a
commit
9d2900db02
40 changed files with 223 additions and 82 deletions
|
|
@ -30,7 +30,7 @@ def _workspace_for_role(role: str) -> str:
|
|||
|
||||
|
||||
def _role_workspace_signature(role_id: str) -> tuple[Any, ...]:
|
||||
base = (PROJECT_ROOT / "oclaw" / "runtime" / "workspaces").resolve()
|
||||
base = (PROJECT_ROOT / "runtime" / "workspaces").resolve()
|
||||
role_root = (base / role_id).resolve()
|
||||
if not role_root.exists() or not role_root.is_dir():
|
||||
return ("missing", role_id, str(base))
|
||||
|
|
@ -85,7 +85,7 @@ def build_role_system_context(role: str, template_vars: dict[str, Any] | None =
|
|||
cached = _ROLE_CONTEXT_CACHE.get(cache_key)
|
||||
if isinstance(cached, str) and cached.strip():
|
||||
return cached
|
||||
base = (PROJECT_ROOT / "oclaw" / "runtime" / "workspaces").resolve()
|
||||
base = (PROJECT_ROOT / "runtime" / "workspaces").resolve()
|
||||
roots: list[Path] = []
|
||||
role_root = (base / role_id).resolve()
|
||||
if role_root.exists() and role_root.is_dir():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue