             nil)
         (car/return (view-model session-id))))
     nil))
+
+(def CreateArg
+  "Session-creation args"
+  {(s/optional-key :browser-name) s/Str
+   (s/optional-key :capabilities) Capabilities
+   (s/optional-key :node-id) s/Str})
 
 (defn create-session
   [{:keys [browser-name

   :reserved false})
(s/validate OldGetOrCreateArg get-or-create-defaults)

(defn get-or-create-session [arg]
  (let [arg (s/validate OldGetOrCreateArg (merge get-or-create-defaults arg))]
    (with-car*

(defn is-ip? [s]
  (re-matches #"(?:\d{1,3}\.){3}\d{1,3}" s))

(def Capabilities {s/Any s/Any})

(def SessionInRedis
  "A session, as represented in redis."
  {:id                            s/Str
   (s/optional-key :tags)        [s/Str]
   (s/optional-key :reserved)     s/Bool
   (s/optional-key :current-url)  s/Str
   (s/optional-key :browser-name) s/Str
   (s/optional-key :node-id)      s/Str})

(def SessionView
  "A session, as presented to library users."
  {:id                            s/Str
   (s/optional-key :tags)        [s/Str]
   (s/optional-key :reserved)     s/Bool
