// Path resolution for the sandbox model. // // The sandbox shares the host filesystem at identity paths (bwrap binds real // paths; sandbox-exec doesn't virtualize the filesystem at all), so a path is // the same inside and outside — no host<->guest translation. This just resolves // a model-supplied path to an absolute host path against the working directory. import path from "node:path"; function stripAtPrefix(value: string): string { return value.startsWith("@") ? value.slice(1) : value; } /** Resolve a model-supplied path (relative or absolute) to an absolute host path. */ export function resolveInputPath(cwd: string, inputPath: string): string { const trimmed = stripAtPrefix(inputPath.trim()); if (!trimmed) return cwd; return path.resolve(cwd, trimmed); }