             [com.stuartsierra.component :as component]
             [io.aviso.ansi :refer [bold-red bold-green bold-blue]]
             [shale.logging :as logging]
-            [shale.nodes :as nodes :refer [NodeView]]
+            [shale.nodes :as nodes]
             [shale.utils :refer :all]
             [shale.redis :as redis]
             [shale.selenium :as selenium]

  "Modification to a session"
  (any-pair
    :change-tag TagChange
    :go-to-url s/Str
    :reserve s/Bool))

(s/defn ^:always-validate save-session-tags-to-redis
  [pool :- SessionPool


(s/defschema SessionView
  "A session, as presented to library users."
  {:id             s/Str
   :webdriver-id   s/Str
   :tags         #{s/Str}
   :reserved       s/Bool
   :current-url   (s/maybe s/Str)
   :browser-name   s/Str
   :node           nodes/NodeView
   :capabilities   {s/Keyword s/Any}})

(s/defschema TagChange
  "Add/remove a session/node tag"
  {:action (s/enum :add :remove)
   :tag    s/Str})

(s/defschema Requirement
  "A schema for a session requirement."
