smelt.auth¶
Tier: Host - Available in every runtime, including headless mode.
Visibility: Public - Stable Lua API intended for user config and plugins.
Authenticated provider helpers. Requests use smelt-managed credentials without exposing bearer tokens to Lua.
smelt.auth.managed_usage¶
Fetch parsed managed-provider usage. Credentials stay in Rust; Lua receives
provider-neutral { summary, limits } rows with { label, used, limit,
resetHint? }. Only providers with managed quota endpoints support this.
smelt.auth.request¶
fun(provider: string, opts: { path: string, method: string?, body: string? }): { status: integer, body: string }?, string?
Run an authenticated request against a provider-owned endpoint using
smelt-managed credentials. Credentials stay in Rust; Lua receives only
the HTTP status and body. opts.path must be an absolute path without a
URL scheme; opts.method defaults to GET.