# `MingaAgent.Credentials.Snapshot`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_agent/credentials/snapshot.ex#L1)

Secret-free local credential classification captured from one acquisition.

API key values and OAuth tokens never leave `MingaAgent.Credentials`. OAuth
presence is represented by its exact provider/account identity when the local
file supplies one; activation still pins and refreshes through ReqLLM.

# `source`

```elixir
@type source() :: :env | :file
```

# `t`

```elixir
@type t() :: %MingaAgent.Credentials.Snapshot{
  oauth_ref: MingaAgent.ModelSelection.Credential.OAuth.t() | nil,
  provider_sources: %{optional(String.t()) =&gt; source()}
}
```

# `locally_configured?`

```elixir
@spec locally_configured?(t()) :: boolean()
```

Returns whether any local API-key or exact OAuth identity is configured.

# `new`

```elixir
@spec new(
  %{optional(String.t()) =&gt; source()},
  MingaAgent.ModelSelection.Credential.OAuth.t() | nil
) ::
  t()
```

Builds a secret-free credential snapshot from an exact OAuth identity.

# `oauth_ref`

```elixir
@spec oauth_ref(t()) :: MingaAgent.ModelSelection.Credential.OAuth.t() | nil
```

Returns the exact local OAuth identity, if the snapshot contained one.

# `provider_source`

```elixir
@spec provider_source(t(), String.t()) :: source() | nil
```

Returns the configured source for one API-key provider.

---

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