/** Resolve the current platform. Defaults to `process.platform`. */ export declare function getPlatform(): string; /** Test-only seam. Pass `undefined` to restore the real platform. */ export declare function setPlatformForTest(platform: string | undefined): void; export declare function getOpencodeConfigDir(): string; export declare function getOpencodeConfigPath(): string; export declare function getOpencodeSkillsDir(): string; /** * Returns the rolebox data directory. * Precedence: ROLEBOX_DATA_DIR env override, then XDG_DATA_HOME/rolebox (all platforms), * then %LOCALAPPDATA%/rolebox on Windows, then ~/.local/share/rolebox on Unix. */ export declare function getDataDir(): string; /** * Returns the rolebox config directory. * Precedence: ROLEBOX_CONFIG_DIR env override, then XDG_CONFIG_HOME/rolebox (all platforms), * then %APPDATA%/rolebox on Windows, then ~/.config/rolebox on Unix. */ export declare function getConfigDir(): string; /** * Returns the roles storage directory: {dataDir}/roles */ export declare function getRolesDir(): string; /** * Returns the sync target directory for a given tool. * Delegates to the PlatformPaths registry for directory resolution: * - `"opencode"` → `{~/.config/opencode}/rolebox` * - `"pi"` → `{$PI_CODING_AGENT_DIR or ~/.pi/agent}/rolebox` * - `"dsh"` → `{$DSH_HOME or ~/.dsh}/rolebox` * - `"codex"` → `{$CODEX_HOME or ~/.codex}/rolebox` * * Each path matches where the corresponding runtime entry point resolves * its `roleboxDir` (see `resolveRoleboxDirectories` in platform/factory.ts). */ export declare function getSyncTarget(target: string): string; /** * Returns the config (home) directory for a given sync target — the directory * whose presence indicates the tool is installed on this machine. * - `opencode` → `~/.config/opencode` * - `pi` → `$PI_CODING_AGENT_DIR` or `~/.pi/agent` * - `dsh` → `$DSH_HOME` or `~/.dsh` * - `codex` → `$CODEX_HOME` or `~/.codex` */ export declare function getTargetConfigDir(target: string): string; /** * Returns the skills directory for a given sync target — where rolebox skill * symlinks are deployed for that tool's skill discovery. * - `opencode` → `{~/.config/opencode}/skills` * - `pi` → `{~/.pi/agent}/skills` * - `dsh` → `{~/.dsh}/skills` * - `codex` → `{$CODEX_HOME or ~/.codex}/skills` */ export declare function getTargetSkillsDir(target: string): string; /** * Returns the path for a specific role installation. * Format: {rolesDir}/{registry}/{roleId}@{version} * * `registry` and `roleId` are validated before being used as path components so * that a crafted value can never escape `{rolesDir}` or reach `rmSync` (the * arbitrary-delete vector). Invalid inputs are rejected with an actionable * error rather than silently mangled. */ export declare function getRolePath(registry: string, roleId: string, version: string): string; /** * Validate that a single path segment (registry name, roleId, or version) is safe * to use verbatim as a directory/file component. Throws an actionable error * (naming the offending segment and its value) instead of silently mangling it. */ export declare function assertSafePathSegment(value: string, label: string): void; /** `~/.pi/agent` — delegates to `piPlatformPaths().configDir` */ export declare function getPiConfigDir(): string; /** `~/.pi/agent/skills` — delegates to `piPlatformPaths().skillsDir` */ export declare function getPiSkillsDir(): string; /** `~/.pi/agent/sessions` — delegates to `piPlatformPaths().sessionsDir` */ export declare function getPiSessionsDir(): string; /** `~/.pi/agent/extensions` — delegates to `piPlatformPaths().extensionsDir` */ export declare function getPiExtensionsDir(): string; //# sourceMappingURL=paths.d.ts.map