resolveWorkspace
View as Markdownfunction resolveWorkspace(requested, cfg): Promise<string>;Defined in: core/src/workspace.ts:13
Canonicalises requested (default cfg.default) with realpath — so symlinks are followed —
and requires the result to be an existing directory inside one of the realpath’d roots.
Path checks are not a sandbox; they only keep sessions inside the configured roots.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
requested |
string | undefined |
cfg |
{ allowedRoots: string[]; default: string; } |
cfg.allowedRoots |
string[] |
cfg.default |
string |
Returns
Section titled “Returns”Promise<string>