import type { InstallMethod, ReleaseChannel } from './types'; export { isNewerVersion, isValidVersion } from './utils/version'; /** * Get the global npm prefix path (e.g. /usr/local). * Result is cached after the first call. */ export declare function getGlobalNpmPrefix(): string; /** * Reset the cached global npm prefix (for testing). */ export declare function resetGlobalPrefixCache(): void; /** * Detect how the CLI was installed/started. * Priority: dev → npx → global → local */ export declare function detectInstallMethod(): InstallMethod; /** * バージョン文字列からリリースチャンネルを推定する。 * e.g. "0.0.4-beta.21" → "beta", "0.0.4-alpha.3" → "alpha", "0.0.4" → "latest" */ export declare function detectChannelFromVersion(version: string): ReleaseChannel; /** * Check if the current user has write permission to the npm global directory. * Returns true if writable, false otherwise. * On Windows, always returns true (sudo is not available). */ export declare function hasGlobalWritePermission(): boolean; /** * Check if sudo is available on the system. * Returns false on Windows or when the sudo binary is not found. */ export declare function isSudoAvailable(): boolean; /** * Run npm install command and return result. */ /** * Best-effort secret redaction for npm output. npm's verbose errors can echo * Bearer tokens, _authToken=..., basic-auth registry URLs, and X-Auth-Token * headers. We forward this string to agent.err.log → Sentry/heartbeat, so the * blast radius is wider than the local log file. */ export declare function redactSecrets(input: string): string; /** * Install a specific version of the CLI package. * Only global and npx methods are supported for automatic update. */ export declare function performUpdate(version: string, method?: InstallMethod, cacheScope?: string): Promise<{ success: boolean; error?: string; }>; /** * Re-exec the current process with the same arguments. * Preserves process.execArgv (Node.js runtime flags) and environment variables. * For npx installs, resolves the global binary path instead of the stale npx cache path. */ export declare function reExecProcess(method?: InstallMethod): void; //# sourceMappingURL=update-checker.d.ts.map