export interface StatusCompressionAggregate { events: number; original_tokens: number; compressed_tokens: number; savings_tokens: number; } export interface StatusCompression { project: StatusCompressionAggregate; session: StatusCompressionAggregate; } /** * Human health categories from the status snapshot. Each category is optional: * a missing value was not proven, so renderers must omit it instead of treating * absence as a clean zero. */ export interface StatusBar { errors?: number; warnings?: number; dead_code?: number; unused_exports?: number; duplicates?: number; todos?: number; tier2_stale?: boolean; } export interface AftStatusSnapshot { version: string; project_root: string | null; canonical_root: string | null; cache_role: string; /** * True when at least one heavy AFT subsystem has been auto-disabled for * the current project root. `degraded_reasons` enumerates why (e.g. * `["home_root"]`, `["search_too_many_files:20000"]`). The sidebar / TUI * dialog surface this so users know `aft_search`, `aft_callgraph` etc. * won't return results from this session and can choose to open a * project subdirectory instead. */ degraded: boolean; /** Machine-readable degraded-mode reasons. Empty when `degraded === false`. */ degraded_reasons: string[]; features: { format_on_edit: boolean; validate_on_edit: string; restrict_to_project_root: boolean; search_index: boolean; semantic_search: boolean; }; search_index: { status: string; files: number | null; trigrams: number | null; }; semantic_index: { status: string; backend?: string | null; model?: string | null; stage?: string | null; files?: number | null; entries_done?: number | null; entries_total?: number | null; refreshing_count: number; entries: number | null; dimension: number | null; error?: string | null; }; disk: { storage_dir: string | null; trigram_disk_bytes: number; semantic_disk_bytes: number; }; lsp_servers: number; runtime: { live_watchers: number; live_actor_roots: number; open_routes: number; }; symbol_cache: { local_entries: number; warm_entries: number; }; storage_dir: string | null; /** Total checkpoints across all sessions sharing this bridge. */ checkpoints_total: number; /** Current session's own slice of undo/checkpoint state. */ session: { id: string; tracked_files: number; checkpoints: number; }; /** Compression aggregate passthrough; rendering is added separately. */ compression?: StatusCompression; /** Human health counts. Each unproven category stays absent rather than zero. */ status_bar?: StatusBar; /** * Human-readable explanation for a synthetic snapshot (e.g. * `cache_role === "not_initialized"`). When the plugin returns a placeholder * because no bridge has been spawned yet, this message tells the user what * to expect; the TUI dialog renders it instead of an empty grid of zeros. * Empty string when the snapshot is real bridge data. */ message: string; } /** Neutral label for cache_role. Worktree/read_only borrow the shared repo index; they are not a failure. */ export declare function formatCacheRoleLabel(role: string): string; /** One-liner for the sidebar. Worktree mode only; other roles stay silent. */ export declare function worktreeCacheRoleNote(role: string | undefined): string | null; export declare function formatSemanticIndexStatus(status: string, stage?: string | null): string; export declare function formatSemanticRefreshing(refreshingCount: number): string | null; export declare function formatBytes(bytes: number): string; export declare function coerceAftStatus(response: Record): AftStatusSnapshot; /** * Plain-text status renderer used by the Desktop `sendIgnoredMessage` path, * which can only show a plain string. The TUI dialog uses a custom JSX * component in `tui/index.tsx` (see `StatusDialog`) so it can render with * themed colors, proper flex columns, and right-aligned values instead of * monospace padding. */ export declare function formatStatusDialogMessage(status: AftStatusSnapshot): string; export declare function formatStatusMarkdown(status: AftStatusSnapshot): string; //# sourceMappingURL=status.d.ts.map