@builder.io/dev-tools
Version:
Builder.io Visual CMS Devtools
19 lines (18 loc) • 786 B
TypeScript
export { expandTildePath } from "#vcp-common/path-canonicalize";
/**
* Resolve an agent-supplied path to an absolute, canonicalized filesystem path.
*
* Accepts:
* - Tilde paths (`~/.builder/...`)
* - Absolute paths
* - Relative paths (resolved against `workingDirectory` if provided)
*
* Always canonicalizes `..` segments via `path.resolve` so a path like
* `~/.builder/../../etc/passwd` cannot sneak past a `~/.builder/**` allow rule.
*/
export declare function resolveAgentPath(filePath: string, workingDirectory?: string, home?: string): string;
/**
* Default user-level roots that the agent's file tools should be allowed to read by default.
* Plugin/skill files live under these roots.
*/
export declare function defaultUserBuilderRoots(home?: string): string[];