MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / _write_allowed_roots

Function _write_allowed_roots

astrbot/core/tools/computer_tools/fs.py:131–138  ·  view source on GitHub ↗

Non-admin users cannot modify plugin-provided Skills.

(umo: str)

Source from the content-addressed store, hash-verified

129
130
131def _write_allowed_roots(umo: str) -> tuple[Path, ...]:
132 """Non-admin users cannot modify plugin-provided Skills."""
133 return (
134 Path(get_astrbot_skills_path()).resolve(strict=False),
135 _workspace_root(umo),
136 Path(get_astrbot_system_tmp_path()).resolve(strict=False),
137 Path(get_astrbot_temp_path()).resolve(strict=False),
138 )
139
140
141def _is_restricted_env(context: ContextWrapper[AstrAgentContext]) -> bool:

Callers 1

_normalize_rw_pathFunction · 0.85

Calls 4

get_astrbot_skills_pathFunction · 0.90
get_astrbot_temp_pathFunction · 0.90
_workspace_rootFunction · 0.85

Tested by

no test coverage detected