import { BUILD_ENV, BUILD_TIME, PKG_VERSION } from './build-info'; export declare const CLI_PACKAGE_NAME = "@redonvn/cli"; /** Version đồng bộ với `package.json` lúc build — KHÔNG hardcode. */ export declare const CLI_VERSION = "0.1.33"; /** Re-export build metadata cho status command. */ export { BUILD_ENV, BUILD_TIME, PKG_VERSION }; export declare const REDAI_CONFIG_DIR: string; export declare const REDAI_UI_DIR: string; export declare const REDAI_UI_DIST: string; export declare const REDAI_UI_PKG_NAME = "@redonvn/cli-ui"; export declare const REDAI_CONFIG_FILE: string; export declare const REDAI_CLIENT_ID_FILE: string; export declare const REDAI_LOG_FILE: string; export declare const REDAI_PLUGINS_FILE: string; export declare const REDAI_EXTENSION_BRIDGE_HOST = "127.0.0.1"; export declare const REDAI_EXTENSION_BRIDGE_PORT: number; export declare const REDAI_EXTENSION_BRIDGE_TOKEN_FILE: string; /** Mọi skill global (manual + install từ npm) — `~/.redai/skills//SKILL.md`. */ export declare const REDAI_SKILLS_DIR: string; /** Tên thư mục skill viết tay khi nằm trong project — `/.redai/skills/`. */ export declare const REDAI_PROJECT_DIR_NAME = ".redai"; /** Marker package npm là RedAI skill (dùng cho `redai skill install`). */ export declare const REDAI_SKILL_KEYWORD = "redai-skill"; export declare const REDAI_SESSIONS_DIR: string; export declare const REDAI_PROCESSES_DIR: string; export declare const REDAI_WORKSPACES_DIR: string; export declare const REDAI_SANDBOX_DIR: string; export declare const REDAI_DOWNLOADS_DIR: string; export declare const REDAI_SCRIPTS_DIR: string; export declare const REDAI_OUTPUTS_DIR: string; export declare const REDAI_WORKTREES_DIR: string; /** * Encode cwd thành tên thư mục an toàn — giống Claude Code (f--Redon-DuAn-project01). * "/", "\", ":" → "--", strip leading "--". */ export declare function encodeCwdPath(cwd: string): string; /** Trả về ~/.redai/workspaces/{encoded-cwd}/ cho một project cwd. */ export declare function getWorkspaceDir(cwd: string): string; /** * Environment presets — chọn bằng `--env` flag hoặc `REDAI_ENV`. * PROD có WS host tách riêng socket.redai.vn (khác API host). */ export type RedaiEnv = 'dev' | 'prod'; export interface RedaiEnvConfig { apiBaseUrl: string; wsBaseUrl: string; } export declare const REDAI_ENV_PRESETS: Record; /** * Resolve môi trường theo độ ưu tiên: * 1. arg flag `--env dev|prod` (caller truyền vào) * 2. ENV var REDAI_ENV * 3. BUILD_ENV — bake vào lúc build (`npm run build:prod` set 'prod', mặc định 'dev') */ export declare function resolveEnv(envFlag?: string): RedaiEnv; /** * Resolve API base URL theo độ ưu tiên: * 1. `--api-url` flag (caller truyền) * 2. ENV `REDAI_API_URL` * 3. Preset theo env (dev/prod) */ export declare function resolveApiBaseUrl(opts: { env: RedaiEnv; apiUrlOverride?: string; }): string; /** * Resolve WebSocket base URL — backend trả về sau khi verify, đây chỉ là fallback. * 1. `--ws-url` flag * 2. ENV `REDAI_WS_URL` * 3. Preset theo env (dev/prod) */ export declare function resolveWsBaseUrl(opts: { env: RedaiEnv; wsUrlOverride?: string; }): string; export declare const HEARTBEAT_INTERVAL_MS = 25000; export declare const RECONNECT_BASE_DELAY_MS = 2000; export declare const RECONNECT_MAX_DELAY_MS = 30000;