Gemini.GovernedAuthority (GeminiEx v0.15.0)

Copy Markdown View Source

Exact, transient authority-materialization boundary for managed Gemini calls.

Standalone GeminiEx calls may still use explicit per-request or configured credentials. Governed calls accept credentials only through a frozen-contract shaped materialization request plus separately typed secret material. The request binds account generation, quota scope, lease, authority, operation, endpoint, target, effect, and expiry before any lower HTTP effect occurs.

Summary

Types

header_map()

@type header_map() :: %{optional(String.t()) => String.t()}

query_params()

@type query_params() :: [{String.t(), String.t()}]

t()

@type t() :: %Gemini.GovernedAuthority{
  base_url: String.t(),
  credential_handle_ref: String.t(),
  credential_query_params: query_params(),
  headers: header_map(),
  materialization_request: Gemini.GovernedAuthority.MaterializationRequest.t(),
  model_account_ref: String.t(),
  operation_policy_ref: String.t(),
  provider_ref: String.t(),
  redaction_ref: String.t() | nil,
  secret_material: Gemini.GovernedAuthority.SecretMaterial.t(),
  websocket_path: String.t() | nil
}

Functions

account_namespace(governed_authority)

@spec account_namespace(t()) :: String.t()

credential_query_names(authority)

@spec credential_query_names(t()) :: [String.t()]

credential_request_key?(key)

@spec credential_request_key?(String.t()) :: boolean()

headers(authority)

@spec headers(t()) :: [{String.t(), String.t()}]

new!(authority)

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

query_params(authority)

@spec query_params(t()) :: query_params()

rate_limit_scope(governed_authority)

@spec rate_limit_scope(t()) :: String.t()

refs(authority)

@spec refs(t()) :: map()

secret_values(authority)

@spec secret_values(t()) :: [String.t()]

validate_request_body!(body)

@spec validate_request_body!(term()) :: :ok