export interface SessionRow { id: number; started_at: string; ended_at: string | null; summary: string | null; agent_name: string; project_root: string; tags: string | null; parent_session_id: number | null; } export interface ChangeRow { id: number; session_id: number | null; timestamp: string; file_path: string; change_type: ChangeType; description: string; diff_summary: string | null; impact_scope: ImpactScope; } export interface DecisionRow { id: number; session_id: number | null; timestamp: string; decision: string; rationale: string | null; affected_files: string | null; tags: string | null; status: DecisionStatus; superseded_by: number | null; } export interface FileNoteRow { file_path: string; purpose: string | null; dependencies: string | null; dependents: string | null; layer: ArchLayer | null; last_reviewed: string | null; last_modified_session: number | null; notes: string | null; complexity: Complexity | null; file_mtime: number | null; content_hash: string | null; git_branch: string | null; executive_summary: string | null; } export type FileNoteConfidence = "high" | "medium" | "stale" | "unknown"; export interface FileNoteWithStaleness extends FileNoteRow { confidence: FileNoteConfidence; stale: boolean; staleness_hours?: number; } export interface ConventionRow { id: number; session_id: number | null; timestamp: string; category: ConventionCategory; rule: string; examples: string | null; enforced: boolean; summary: string | null; tags: string | null; } export interface TaskRow { id: number; session_id: number | null; created_at: string; updated_at: string; title: string; description: string | null; status: TaskStatus; priority: TaskPriority; assigned_files: string | null; tags: string | null; completed_at: string | null; blocked_by: string | null; claimed_by: string | null; claimed_at: number | null; } export interface AgentRow { id: string; name: string; last_seen: number; current_task_id: number | null; status: AgentStatus; specializations: string | null; } export interface BroadcastRow { id: number; from_agent: string; message: string; created_at: number; expires_at: number | null; read_by: string; } export interface SnapshotRow { key: string; value: string; updated_at: string; ttl_minutes: number | null; } export interface MilestoneRow { id: number; session_id: number | null; timestamp: string; title: string; description: string | null; version: string | null; tags: string | null; } export interface ScheduledEventRow { id: number; session_id: number | null; created_at: string; title: string; description: string | null; trigger_type: EventTriggerType; trigger_value: string | null; status: EventStatus; triggered_at: string | null; acknowledged_at: string | null; requires_approval: number; action_summary: string | null; action_data: string | null; priority: TaskPriority; tags: string | null; recurrence: EventRecurrence | null; } export interface ObservationRow { id: number; session_id: number | null; timestamp: string; content: string; category: ObservationCategory; file_path: string | null; tags: string | null; agent_name: string | null; } export type ChangeType = "created" | "modified" | "deleted" | "refactored" | "renamed" | "moved" | "config_changed"; export type ImpactScope = "local" | "module" | "cross_module" | "global"; export type DecisionStatus = "active" | "superseded" | "deprecated" | "experimental"; export type ArchLayer = "ui" | "viewmodel" | "domain" | "data" | "network" | "database" | "di" | "util" | "test" | "config" | "build" | "other"; export type Complexity = "trivial" | "simple" | "moderate" | "complex" | "critical"; export type ConventionCategory = "naming" | "architecture" | "styling" | "testing" | "git" | "documentation" | "error_handling" | "performance" | "security" | "other"; export type ObservationCategory = "finding" | "pattern" | "concern" | "idea" | "friction" | "behavior" | "other"; export type TaskStatus = "backlog" | "in_progress" | "blocked" | "review" | "done" | "cancelled"; export type TaskPriority = "critical" | "high" | "medium" | "low"; export type AgentStatus = "idle" | "working" | "done" | "stale"; export type EventTriggerType = "next_session" | "datetime" | "task_complete" | "manual"; export type EventStatus = "pending" | "triggered" | "acknowledged" | "executed" | "cancelled" | "snoozed"; export type EventRecurrence = "once" | "every_session" | "daily" | "weekly"; export interface SessionFocusInfo { query: string; decisions_returned: number; tasks_returned: number; changes_returned: number; note: string; } export interface SessionContext { session_id: number; previous_session: { id: number; summary: string | null; ended_at: string | null; agent: string; } | null; changes_since_last: { recorded: ChangeRow[]; git_log: string; }; active_decisions: DecisionRow[]; active_conventions: ConventionRow[]; open_tasks: TaskRow[]; project_snapshot_age_minutes: number | null; focus?: SessionFocusInfo; message: string; } export interface ProjectSnapshot { project_root: string; file_tree: string[]; total_files: number; file_notes: FileNoteRow[]; recent_decisions: DecisionRow[]; active_conventions: ConventionRow[]; layer_distribution: Record; generated_at: string; } export interface MemoryStats { total_sessions: number; total_changes: number; total_decisions: number; total_file_notes: number; total_conventions: number; total_tasks: number; total_milestones: number; oldest_session: string | null; newest_session: string | null; most_changed_files: Array<{ file_path: string; change_count: number; }>; database_size_kb: number; } export interface CompactionResult { sessions_compacted: number; changes_summarized: number; storage_freed_kb: number; } export interface ConfigRow { key: string; value: string; updated_at: string; } export interface BackupInfo { path: string; size_kb: number; created_at: string; database_version: number; } export type SharingMode = "none" | "read" | "full"; export interface InstanceStats { sessions: number; decisions: number; file_notes: number; tasks: number; conventions: number; changes: number; db_size_kb: number; } export interface InstanceEntry { instance_id: string; label: string; project_root: string; db_path: string; schema_version: number; server_version: string; sharing_mode: SharingMode; sharing_types: string[]; stats: InstanceStats; last_heartbeat: string; status: "active" | "stale" | "stopped"; pid: number | null; machine_id: string; /** Whether this instance is permanently enrolled for dashboard discovery. Defaults to false. */ visible?: boolean; } /** * Minimal permanent record for a visibility=true instance. * Persists in `enrolled` map even when the instance is offline. * Only label, project path, and last-seen are stored — no sensitive stats. */ export interface EnrolledEntry { instance_id: string; label: string; project_root: string; db_path: string; enrolled_at: string; last_seen: string; } export interface InstanceRegistry { schema_version: number; machine_id: string; last_updated: string; instances: Record; /** Permanent enrollment map — populated only for instances where visible=true. */ enrolled?: Record; } export interface SensitiveAccessRequest { id: number; requester_instance_id: string; requester_label: string | null; target_type: string; target_ids: string; reason: string | null; status: "pending" | "approved" | "denied"; requested_at: string; resolved_at: string | null; resolved_by: string | null; } export interface CrossInstanceSearchResult { source_instance_id: string; source_label: string; source_project: string; type: string; results: Record[]; total: number; } //# sourceMappingURL=types.d.ts.map