export declare const CREATE_MCP_SERVER = "\n  INSERT INTO lt_mcp_servers\n    (name, description, transport_type, transport_config, auto_connect, metadata, tags, compile_hints, credential_providers)\n  VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)\n  RETURNING *";
export declare const GET_MCP_SERVER = "\n  SELECT * FROM lt_mcp_servers WHERE id = $1";
export declare const GET_MCP_SERVER_BY_NAME = "\n  SELECT * FROM lt_mcp_servers WHERE name = $1";
export declare const DELETE_MCP_SERVER = "\n  DELETE FROM lt_mcp_servers WHERE id = $1";
export declare const UPDATE_STATUS_CONNECTED = "\n  UPDATE lt_mcp_servers\n  SET status = $2, last_connected_at = NOW(), tool_manifest = $3\n  WHERE id = $1";
export declare const UPDATE_STATUS = "\n  UPDATE lt_mcp_servers SET status = $2 WHERE id = $1";
export declare const GET_AUTO_CONNECT_SERVERS = "\n  SELECT * FROM lt_mcp_servers\n  WHERE auto_connect = true\n  ORDER BY name";
export declare const HEALTH_TASK_COUNTS = "\n  SELECT status, COUNT(*)::int AS count\n  FROM lt_tasks GROUP BY status ORDER BY status";
export declare const HEALTH_ESCALATION_COUNTS = "\n  SELECT status, COUNT(*)::int AS count\n  FROM lt_escalations GROUP BY status ORDER BY status";
export declare const HEALTH_ACTIVE_WORKFLOW_TYPES = "\n  SELECT DISTINCT workflow_type FROM lt_tasks\n  WHERE status IN ('pending', 'in_progress')\n  ORDER BY workflow_type";
export declare const HEALTH_RECENT_ACTIVITY = "\n  SELECT\n    COUNT(*) FILTER (WHERE created_at > NOW() - INTERVAL '1 hour')::int AS tasks_created_1h,\n    COUNT(*) FILTER (WHERE completed_at > NOW() - INTERVAL '1 hour')::int AS tasks_completed_1h,\n    COUNT(*) FILTER (WHERE created_at > NOW() - INTERVAL '24 hours')::int AS tasks_created_24h,\n    COUNT(*) FILTER (WHERE completed_at > NOW() - INTERVAL '24 hours')::int AS tasks_completed_24h\n  FROM lt_tasks";
export declare const HEALTH_MCP_SERVERS = "\n  SELECT\n    COUNT(*)::int AS total,\n    COUNT(*) FILTER (WHERE status = 'connected')::int AS connected,\n    SUM(jsonb_array_length(COALESCE(tool_manifest::jsonb, '[]'::jsonb)))::int AS total_tools\n  FROM lt_mcp_servers";
export declare const HEALTH_MCP_SERVER_LIST = "\n  SELECT name, status, tags,\n    jsonb_array_length(COALESCE(tool_manifest::jsonb, '[]'::jsonb))::int AS tool_count\n  FROM lt_mcp_servers ORDER BY name";
export declare const HEALTH_COMPILED_WORKFLOWS = "\n  SELECT\n    COUNT(*)::int AS total,\n    COUNT(*) FILTER (WHERE status = 'active')::int AS active\n  FROM lt_yaml_workflows";
export declare const HEALTH_WORKFLOW_CONFIGS = "\n  SELECT workflow_type, task_queue, description\n  FROM lt_config_workflows ORDER BY workflow_type";
export declare const HEALTH_DURABLE_WORKFLOWS = "\n  SELECT\n    COALESCE(entity, '_internal') AS entity,\n    COUNT(*)::int AS total,\n    COUNT(*) FILTER (WHERE status = 0)::int AS active,\n    COUNT(*) FILTER (WHERE status = 1)::int AS completed\n  FROM durable.jobs\n  WHERE entity IS NOT NULL AND entity != ''\n  GROUP BY entity\n  ORDER BY entity";
export declare const DELETE_STALE_BUILTIN_SERVERS = "\n  DELETE FROM lt_mcp_servers\n  WHERE (metadata->>'builtin')::boolean = true\n    AND name != ALL($1)\n  RETURNING name";
/** Upsert — used by dashboard/API writes (overwrites intentionally). */
export declare const UPSERT_MCP_SERVER = "\n  INSERT INTO lt_mcp_servers\n    (name, description, transport_type, transport_config, auto_connect, status, tool_manifest, metadata, tags, compile_hints, credential_providers, last_connected_at)\n  VALUES ($1, $2, $3, $4, true, 'connected', $5, $6, $7, $8, $9, NOW())\n  ON CONFLICT (name) DO UPDATE SET\n    tool_manifest = EXCLUDED.tool_manifest,\n    metadata = EXCLUDED.metadata,\n    description = EXCLUDED.description,\n    tags = EXCLUDED.tags,\n    compile_hints = EXCLUDED.compile_hints,\n    credential_providers = EXCLUDED.credential_providers,\n    status = 'connected',\n    last_connected_at = NOW()";
/** Seed — insert-if-absent. DB is source of truth after first boot. */
export declare const SEED_MCP_SERVER = "\n  INSERT INTO lt_mcp_servers\n    (name, description, transport_type, transport_config, auto_connect, status, tool_manifest, metadata, tags, compile_hints, credential_providers, category, last_connected_at)\n  VALUES ($1, $2, $3, $4, true, 'connected', $5, $6, $7, $8, $9, $10, NOW())\n  ON CONFLICT (name) DO NOTHING";
