context turnstile

type Gate = enum { Locked, Unlocked }

agent Turnstile {
  key id: String

  store gate: Cell[Gate] = Locked

  on call unlock() -> Effect[Result[(), String]] {
    gate := Unlocked
    Ok(())
  }
}
