CREATE TABLE IF NOT EXISTS file_index_path (
  cwd_hash TEXT NOT NULL,
  path TEXT NOT NULL,
  PRIMARY KEY (cwd_hash, path)
);
CREATE INDEX IF NOT EXISTS idx_file_index_path_cwd ON file_index_path(cwd_hash);

CREATE TABLE IF NOT EXISTS agent_session (
  session_key TEXT NOT NULL PRIMARY KEY,
  acp_session_id TEXT,
  backend_agent_type TEXT,
  config_options_json TEXT,
  updated_at TEXT NOT NULL
);

CREATE TABLE IF NOT EXISTS prompt_queue (
  queue_key TEXT NOT NULL PRIMARY KEY,
  updated_at TEXT NOT NULL,
  turns_json TEXT NOT NULL
);
