/** * Shared filesystem helpers for connector infrastructure. * * @docLink packages/connectors/api-reference#fs-utils */ import type { Logger } from "@skaile/workspaces/types"; /** * mkdir(recursive) + chmod 0o770 in one call. The post-mkdir `chmod` is the * load-bearing piece: `mkdir(mode:)` is ANDed with the process umask * (typically 022 → effective mode 0o750), which strips the group-write bit * expected by shared workspace mounts. Explicit `chmod` is umask-immune. * * EPERM on `chmod` is swallowed: when a foreign uid pre-created the * directory (a stray uid-1000 process inside the container or a host-side * platform process writing through the project bind-mount), the runner * cannot chmod it. The platform's agent container entrypoint runs as root * and heals the subtree on the next restart — see * `platform/docker/agent/entrypoint.sh` `_skaile_heal_ownership`. A debug * line is emitted when a logger is supplied so the rare-but-real heal * trigger is observable in session logs without adding noise on the happy * path. * * The chmod is *idempotent* (the syscall always fires, but a no-op when * the mode is already 0o770), not a no-op — kernel behaviour for chmod is * "set", not "set-if-different". * * @param dir Absolute or relative path to ensure exists at mode 0o770. * @param log Optional logger. When provided, EPERM-on-chmod emits a * `debug`-level entry under whatever taxonomy the caller's logger uses. */ export declare function ensureDirMode(dir: string, log?: Logger): Promise; //# sourceMappingURL=fs-utils.d.ts.map