import { type StorageMode } from "./storage/paths.js"; export { getDexHome, type StorageMode } from "./storage/paths.js"; /** * Base auto-sync configuration for all integrations. */ export interface IntegrationSyncAuto { /** Sync immediately on mutations (default: true) */ on_change?: boolean; /** Max age before sync is considered stale (e.g., "1h", "30m", "1d") */ max_age?: string; } /** * Base sync configuration for all integrations. */ export interface IntegrationSyncConfig { /** Enable automatic sync on task create/update (default: false) */ enabled?: boolean; /** Auto-sync settings */ auto?: IntegrationSyncAuto; } /** * GitHub sync configuration. * Note: owner/repo are always inferred from git remote, not configured. */ export interface GitHubSyncConfig extends IntegrationSyncConfig { /** Environment variable containing GitHub token (default: "GITHUB_TOKEN") */ token_env?: string; /** Label prefix for dex tasks (default: "dex") */ label_prefix?: string; } /** * Shortcut sync configuration. */ export interface ShortcutSyncConfig extends IntegrationSyncConfig { /** Environment variable containing Shortcut API token (default: "SHORTCUT_API_TOKEN") */ token_env?: string; /** Shortcut workspace slug (inferred from API if not set) */ workspace?: string; /** Team ID or mention name for story creation (required for auto-sync) */ team?: string; /** Workflow ID to use (uses team default if not set) */ workflow?: number; /** Label name for dex stories (default: "dex") */ label?: string; } /** * Sync configuration */ export interface SyncConfig { /** GitHub sync settings */ github?: GitHubSyncConfig; /** Shortcut sync settings */ shortcut?: ShortcutSyncConfig; } /** * Archive configuration */ export interface ArchiveConfig { /** Enable automatic archiving (default: false) */ auto?: boolean; /** Minimum age in days before auto-archiving (default: 90) */ age_days?: number; /** Number of recent completed tasks to keep (default: 50) */ keep_recent?: number; } /** * Storage engine configuration */ export interface StorageConfig { /** Storage engine type */ engine: "file"; /** File storage settings */ file?: { /** Path to storage directory */ path?: string; /** Storage mode: "in-repo" (default) or "centralized" */ mode?: StorageMode; }; } /** * Dex configuration */ export interface Config { /** Storage configuration */ storage: StorageConfig; /** Sync configuration */ sync?: SyncConfig; /** Archive configuration */ archive?: ArchiveConfig; } /** * Get the global config file path * @returns Path to config file (~/.config/dex/dex.toml) */ export declare function getConfigPath(): string; /** * Get the per-project config file path in the current git repository. * Always looks in .dex/ at the git root, regardless of storage path configuration. * @returns Path to project config file (.dex/config.toml) or null if not in a git repo */ export declare function getProjectConfigPath(): string | null; /** * Options for loading configuration */ export interface LoadConfigOptions { /** Storage path for per-project config */ storagePath?: string; /** Custom config file path (overrides global config) */ configPath?: string; } /** * Load configuration with precedence: per-project > global/custom > defaults * @param options Optional configuration loading options * @returns Merged configuration object */ export declare function loadConfig(options?: LoadConfigOptions): Config; //# sourceMappingURL=config.d.ts.map