# `Jidoka.Turn.Cursor`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/turn/cursor.ex#L1)

Pointer to the next safe phase boundary.

# `t`

```elixir
@type t() :: %Jidoka.Turn.Cursor{
  loop_index: integer(),
  metadata: map(),
  phase: (((:start | :after_prompt) | :before_effect) | :review) | :wait
}
```

# `after_prompt`

```elixir
@spec after_prompt() :: t()
```

Builds a cursor for the boundary after prompt assembly.

# `before_effect`

```elixir
@spec before_effect(Jidoka.Effect.Intent.t() | nil) :: t()
```

Builds a cursor for the boundary before one effect is interpreted.

# `new`

```elixir
@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}
```

Builds a turn cursor from keyword or map attributes.

# `new!`

```elixir
@spec new!(keyword() | map()) :: t()
```

Builds a turn cursor and raises if the attributes are invalid.

# `review`

```elixir
@spec review(Jidoka.Review.Interrupt.t()) :: t()
```

Builds a cursor for a pending human-review boundary.

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

Returns the Zoi schema for a turn cursor.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
