/** * Scoring weights for task prioritization. */ export interface ScoringWeights { dependency: number; priority: number; workload: number; } /** * Scoring biases for task prioritization. * Biases add/subtract from the weighted score (-50 to +50 range recommended). */ export interface ScoringBiases { plans?: Record; personas?: { coder?: number; reviewer?: number; pm?: number; customer?: number; }; statuses?: { GAP?: number; WIP?: number; BLOCKED?: number; }; } export type ScoringPreset = 'default' | 'quick-wins' | 'dependency-chain' | 'newest-first' | 'code-then-review'; /** * Tool filtering configuration. * Allowlist takes precedence over denylist when both are provided. */ export interface ToolFilteringConfig { allowlist?: string[]; denylist?: string[]; } /** * Staleness detection configuration. */ export interface StalenessConfig { warningDays: number; criticalDays: number; wipWarningDays: number; gapWarningDays: number; planCriticalDays: number; excludeStatuses: string[]; } /** * Retrieval configuration for hybrid search. */ export interface RetrievalConfig { /** Default recipe name (e.g. "HYBRID_BALANCED") */ defaultRecipe?: string; /** Default graph expansion parameters */ graphConfig?: { maxDepth?: number; hopDecay?: number; }; /** Default similarity threshold for semantic filtering */ similarityThreshold?: number; } export interface HealthConfig { staleness?: Partial; drift?: { codebasePath?: string; }; /** Proposal types allowed for auto-apply (e.g. ["frontmatter"]). If unset, all auto-applyable are applied. */ proposals?: { autoApply?: string[]; }; } /** * Rate limiting configuration. */ export interface RateLimitConfig { maxRequests: number; windowMs: number; } /** * HTTP server configuration. */ export interface HttpServerConfig { port: number; host: string; maxBodySize?: number; maxSessions?: number; corsOrigin?: string; rateLimit?: RateLimitConfig; sessionTimeoutMs?: number; } /** * Default HTTP server configuration. */ export declare const DEFAULT_HTTP_SERVER_CONFIG: HttpServerConfig; /** * Server configuration interface. */ export interface ServerConfig { configVersion?: number; plansPath: string; docsPaths?: string[]; fileExtensions?: string[]; dataPath: string; maxFileSize?: number; maxDepth?: number; scoring: { preset?: ScoringPreset; weights: Partial; biases: Partial; }; tools?: ToolFilteringConfig; retrieval?: RetrievalConfig; server?: Partial; health?: HealthConfig; extensions?: string[]; } /** * Current config schema version. * Increment when making breaking changes that require migration. */ export declare const CURRENT_CONFIG_VERSION = 1; export type ConfigMigrationStep = (config: Record) => void; /** * Default maximum file size in bytes (1 MB). * Files larger than this are skipped during indexing and rejected on write. */ export declare const DEFAULT_MAX_FILE_SIZE = 1048576; /** * Default maximum directory recursion depth for indexing and watching. */ export declare const DEFAULT_MAX_DEPTH = 10; /** * Default scoring weights for task prioritization (initial config values). */ export declare const DEFAULT_SCORING_WEIGHTS: ScoringWeights; /** * Get scoring weights from config. * * @param config - Server configuration * @returns Scoring weights */ export declare function getScoringWeights(config: ServerConfig): ScoringWeights; /** * Default scoring biases (initial config values). */ export declare const DEFAULT_SCORING_BIASES: ScoringBiases; /** * Default retrieval configuration. */ export declare const DEFAULT_RETRIEVAL_CONFIG: RetrievalConfig; /** * Get retrieval configuration from config. */ export declare function getRetrievalConfig(config: ServerConfig): RetrievalConfig; /** * Default staleness configuration. */ export declare const DEFAULT_STALENESS_CONFIG: StalenessConfig; /** * Get staleness configuration from config. */ export declare function getStalenessConfig(config: ServerConfig): StalenessConfig; export declare const SCORING_PRESETS: Record; /** * Get scoring biases from config. * * @param config - Server configuration * @returns Scoring biases */ export declare function getScoringBiases(config: ServerConfig): ScoringBiases; /** * Default debounce delay for file watching (ms). * Hardcoded - not user-configurable. */ export declare const DEFAULT_DEBOUNCE_DELAY = 200; /** * Expand tilde (~) to home directory in a path. * * @param path - Path that may contain ~ prefix * @returns Path with ~ expanded to home directory */ export declare function expandTilde(path: string): string; /** * Load configuration from file. * Paths are resolved relative to the config file location. * Removes deprecated coordination.json if found in config or data dir. * * @param configPath - Path to config.json file * @returns Server configuration * @throws Error if config file does not exist */ export declare function loadConfig(configPath: string): ServerConfig; /** * Validate configuration object. * Uses type checking to ensure all required fields are present and correct types. * * @param config - Configuration object to validate * @returns true if valid, false otherwise */ export declare function validateConfig(config: unknown): config is ServerConfig; /** * Get all documentation paths to index. * Combines plansPath with any additional docsPaths, deduplicating. * * @param config - Server configuration * @returns Array of unique paths to index */ export declare function getAllDocsPaths(config: ServerConfig): string[]; /** * Get file extensions to index. * Returns configured extensions or default ['.md']. * * @param config - Server configuration * @returns Array of file extensions (e.g., ['.md', '.jsx', '.tsx']) */ export declare function getFileExtensions(config: ServerConfig): string[]; /** * Get maximum file size from config. * Returns configured value or default (1 MB). */ export declare function getMaxFileSize(config: ServerConfig): number; /** * Get maximum directory recursion depth from config. * Returns configured value or default (10). */ export declare function getMaxDepth(config: ServerConfig): number; /** * Get HTTP server configuration from config. * Returns configured values merged with defaults. * Validates host format to prevent binding issues. * * @param config - Server configuration * @returns Validated HTTP server configuration * @throws Error if host format is invalid */ export declare function getHttpServerConfig(config: ServerConfig): HttpServerConfig; //# sourceMappingURL=config.d.ts.map