TypeSafeSDK.RuntimeCapabilities (TypeSafeSDK v0.2.0)

Copy Markdown View Source

Fail-closed reporting of transport capabilities, without inventing Pristine APIs.

The supplied Pristine integration establishes no contract for global queue bounds, a streaming response-byte cap, or physical cancellation cleanup. Missing capabilities report :unverified, not false or "supported".

An adapter may implement typesafe_capabilities(transport_opts) (preferred) or typesafe_capabilities/0, returning a map. Numeric bounds are positive integers (bounded_queue also accepts zero); deterministic_overload and cancellation_cleanup must be true. Reports label these advertised, not independently verified. Adapter contract tests must prove actual enforcement.

Summary

Functions

check(client, requirements)

@spec check(map(), [atom()]) :: :ok | {:error, TypeSafeSDK.Error.t()}

names()

@spec names() :: [atom()]

report(map)

@spec report(TypeSafeSDK.Client.t() | map()) :: map()

require!(client, requirements)

@spec require!(map(), [atom()]) :: :ok