# `Parlora.Status`
[🔗](https://github.com/hfiguera/parlora/blob/v0.1.0/lib/parlora/status.ex#L1)

Public map returned by `Parlora.status/1`; this module defines types only.

Optional fields are absent until observed, not inferred. Monotonic timestamps
are signed microseconds on this VM and cannot be compared across VM restarts.
`:settled` interpretation does not mean jobs finished. A submitted or uncertain
job may still be running. Delivery acceptance is not playback confirmation.
A submitted job reserves capacity while its adapter command may still be
pending. `admission` tracks that callback: pending, dispatched (`:started`), or
replied (`:settled`). These labels do not establish that backend work started;
`started_at_us` and `:request_started` report that separate observation.

Status omits transcript history, full task inputs and backend results. Retained
clarification data can contain question text and application-defined input.
Treat it as application data, not automatically safe public telemetry.

# `delegation`

```elixir
@type delegation() :: %{
  :status =&gt; :pending | :claimed | :cancelled,
  :received_at_us =&gt; integer(),
  optional(:task_id) =&gt; String.t(),
  optional(:task_revision) =&gt; pos_integer(),
  optional(:context_wait) =&gt; Parlora.ContextSnapshot.context_wait(),
  optional(:clarification) =&gt; Parlora.ContextSnapshot.policy_clarification()
}
```

# `delivery`

```elixir
@type delivery() ::
  :awaiting_interpretation
  | :awaiting_provider
  | :accepted
  | :unconfirmed
  | :rejected
  | :unknown
  | :stale
  | :not_applicable
```

# `interpretation`

```elixir
@type interpretation() :: :running | :settled | :unresolved
```

# `job`

```elixir
@type job() :: %{
  :status =&gt; job_state(),
  optional(:admission) =&gt; :pending | :started | :settled,
  :task_id =&gt; String.t(),
  :task_revision =&gt; pos_integer(),
  :delegation_id =&gt; String.t() | nil,
  :deadline_at_us =&gt; integer() | nil,
  :current? =&gt; boolean(),
  optional(:started_at_us) =&gt; integer(),
  optional(:completed_at_us) =&gt; integer(),
  optional(:delivery) =&gt; delivery(),
  optional(:result_command_id) =&gt; String.t() | nil,
  optional(:delivery_updated_at_us) =&gt; integer(),
  optional(:context_wait) =&gt; Parlora.ContextSnapshot.context_wait(),
  optional(:clarification) =&gt; Parlora.ContextSnapshot.clarification()
}
```

# `job_state`

```elixir
@type job_state() ::
  :queued | :submitted | :uncertain | Parlora.BackendResult.status()
```

# `lifecycle`

```elixir
@type lifecycle() :: :starting | :ready | :closing
```

# `playback`

```elixir
@type playback() :: %{
  :stage =&gt; playback_stage(),
  :observed_at_us =&gt; integer(),
  optional(:evidence) =&gt; Parlora.Channel.Capabilities.evidence(),
  optional(:stream_id) =&gt; String.t(),
  optional(:sequence) =&gt; non_neg_integer(),
  optional(:epoch) =&gt; non_neg_integer(),
  optional(:first_sample) =&gt; non_neg_integer(),
  optional(:end_sample) =&gt; non_neg_integer()
}
```

# `playback_stage`

```elixir
@type playback_stage() ::
  :queued
  | :handed_off
  | :cleared
  | :estimated_playback
  | :device_reported_playback
  | :unknown
```

# `t`

```elixir
@type t() :: %{
  session_id: String.t(),
  status: lifecycle(),
  provider_activity: :unknown | :in_progress | :idle,
  provider_speech: :unknown | :speaking | :idle,
  context_acknowledgment?: boolean(),
  observed_at_us: integer(),
  interpretation: interpretation(),
  delegations: %{optional(String.t()) =&gt; delegation()},
  jobs: %{optional(String.t()) =&gt; job()},
  health: Parlora.SessionHealth.t(),
  playback: %{optional(playback_stage()) =&gt; playback()},
  output_recovery:
    %{
      token: pos_integer(),
      cause: atom(),
      stage: :reconnecting | :awaiting_user,
      started_at_us: integer()
    }
    | nil
}
```

---

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