context demo.agt

type Id = opaque Int where NonNegative

agent Counter {
  key id: Id

  store count: Cell[Int]
  store label: Cell[String]

  on call describe() -> Effect[String] {
    Effect.pure(label)
  }

  on call value() -> Effect[Int] {
    Effect.pure(count)
  }
}
