resolve • AI Agent SDK
resolve: Resolve a path against the workspace root with security checks.
resolve
Method
</div>
This is a method of the Workspace class in the workspace module.
Resolve a path against the workspace root with security checks.
Signature
def resolve(path: str | Path) -> PathParameters
ParamField
str \| PathRelative or absolute path to resolve
Returns
ResponseField
PathAbsolute path within workspace
Exceptions
ValueError
If path escapes workspace or contains traversal attempts
Uses
Pathhas_traversal_componentValueErrorpath.is_absolutepath.resolveresolveresolved.relative_to
Used By
Source
View on GitHubpraisonaiagents/workspace/__init__.py at line 68