---
title: Provider authoring API
description: Generated public TypeScript reference for @relkit/provider.
search:
  exclude: true
sidebar:
  icon: braces
---

{/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

For configuration and examples, read [provider authoring](/docs/modules/integrations/provider-authoring).

## Public imports

- `@relkit/provider` — 88 exports

## All exported APIs

Names link to their complete contracts. Re-exports share their original contract; legacy exports keep their separate identity. Examples link to the API's inline sample, a maintained repository usage, or the shared module walkthrough.

| API                                                                                                       | Kind  | Import from        | Example                                                                                                                    |
| --------------------------------------------------------------------------------------------------------- | ----- | ------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| [BindingValueRef](/docs/api/provider#bindingvalueref-type-alias)                                          | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [BindingValueType](/docs/api/provider#bindingvaluetype-type-alias)                                        | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [createBindingValueRef](/docs/api/provider#createbindingvalueref)                                         | Value | `@relkit/provider` | [API example](/docs/api/provider#createbindingvalueref)                                                                    |
| [createBindingValueRefEffect](/docs/api/provider#createbindingvaluerefeffect)                             | Value | `@relkit/provider` | [API example](/docs/api/provider#createbindingvaluerefeffect)                                                              |
| [defineConnectionContract](/docs/api/provider#defineconnectioncontract)                                   | Value | `@relkit/provider` | [API example](/docs/api/provider#defineconnectioncontract)                                                                 |
| [defineConnectionContractEffect](/docs/api/provider#defineconnectioncontracteffect)                       | Value | `@relkit/provider` | [API example](/docs/api/provider#defineconnectioncontracteffect)                                                           |
| [defineInfrastructureProviderSource](/docs/api/provider#defineinfrastructureprovidersource-1)             | Value | `@relkit/provider` | [API example](/docs/api/provider#defineinfrastructureprovidersource-1)                                                     |
| [defineInfrastructureProviderSourceEffect](/docs/api/provider#defineinfrastructureprovidersourceeffect-1) | Value | `@relkit/provider` | [API example](/docs/api/provider#defineinfrastructureprovidersourceeffect-1)                                               |
| [defineIntegrationReference](/docs/api/provider#defineintegrationreference)                               | Value | `@relkit/provider` | [API example](/docs/api/provider#defineintegrationreference)                                                               |
| [defineIntegrationReferenceEffect](/docs/api/provider#defineintegrationreferenceeffect)                   | Value | `@relkit/provider` | [API example](/docs/api/provider#defineintegrationreferenceeffect)                                                         |
| [defineLocalProviderSource](/docs/api/provider#definelocalprovidersource-1)                               | Value | `@relkit/provider` | [API example](/docs/api/provider#definelocalprovidersource-1)                                                              |
| [defineLocalProviderSourceEffect](/docs/api/provider#definelocalprovidersourceeffect-1)                   | Value | `@relkit/provider` | [API example](/docs/api/provider#definelocalprovidersourceeffect-1)                                                        |
| [defineLocalRecipeReference](/docs/api/provider#definelocalrecipereference)                               | Value | `@relkit/provider` | [API example](/docs/api/provider#definelocalrecipereference)                                                               |
| [defineLocalRecipeReferenceEffect](/docs/api/provider#definelocalrecipereferenceeffect)                   | Value | `@relkit/provider` | [API example](/docs/api/provider#definelocalrecipereferenceeffect)                                                         |
| [defineProviderAccess](/docs/api/provider#defineprovideraccess)                                           | Value | `@relkit/provider` | [API example](/docs/api/provider#defineprovideraccess)                                                                     |
| [defineProviderAccessEffect](/docs/api/provider#defineprovideraccesseffect)                               | Value | `@relkit/provider` | [API example](/docs/api/provider#defineprovideraccesseffect)                                                               |
| [defineProviderAdapter](/docs/api/provider#defineprovideradapter)                                         | Value | `@relkit/provider` | [API example](/docs/api/provider#defineprovideradapter)                                                                    |
| [defineProviderAdapterEffect](/docs/api/provider#defineprovideradaptereffect)                             | Value | `@relkit/provider` | [API example](/docs/api/provider#defineprovideradaptereffect)                                                              |
| [DefineProviderAdapterOptions](/docs/api/provider#defineprovideradapteroptions-interface)                 | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [defineProviderBehavior](/docs/api/provider#defineproviderbehavior)                                       | Value | `@relkit/provider` | [API example](/docs/api/provider#defineproviderbehavior)                                                                   |
| [defineProviderBehaviorEffect](/docs/api/provider#defineproviderbehavioreffect)                           | Value | `@relkit/provider` | [API example](/docs/api/provider#defineproviderbehavioreffect)                                                             |
| [defineProviderCapability](/docs/api/provider#defineprovidercapability)                                   | Value | `@relkit/provider` | [API example](/docs/api/provider#defineprovidercapability)                                                                 |
| [defineProviderCapabilityEffect](/docs/api/provider#defineprovidercapabilityeffect)                       | Value | `@relkit/provider` | [API example](/docs/api/provider#defineprovidercapabilityeffect)                                                           |
| [defineProviderFeature](/docs/api/provider#defineproviderfeature)                                         | Value | `@relkit/provider` | [API example](/docs/api/provider#defineproviderfeature)                                                                    |
| [defineProviderFeatureEffect](/docs/api/provider#defineproviderfeatureeffect)                             | Value | `@relkit/provider` | [API example](/docs/api/provider#defineproviderfeatureeffect)                                                              |
| [InfrastructureProviderSource](/docs/api/provider#infrastructureprovidersource-type-alias)                | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [IntegrationReference](/docs/api/provider#integrationreference-type-alias)                                | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [isBindingValueRef](/docs/api/provider#isbindingvalueref)                                                 | Value | `@relkit/provider` | [API example](/docs/api/provider#isbindingvalueref)                                                                        |
| [isBindingValueRefEffect](/docs/api/provider#isbindingvaluerefeffect)                                     | Value | `@relkit/provider` | [API example](/docs/api/provider#isbindingvaluerefeffect)                                                                  |
| [LocalProviderSource](/docs/api/provider#localprovidersource-type-alias)                                  | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [NormalizedProviderAdapter](/docs/api/provider#normalizedprovideradapter-interface)                       | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [NormalizedProviderBinding](/docs/api/provider#normalizedproviderbinding-type-alias)                      | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [NormalizedProviderProfiles](/docs/api/provider#normalizedproviderprofiles-interface)                     | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [NormalizedProviderSource](/docs/api/provider#normalizedprovidersource-type-alias)                        | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [normalizeProviderBinding](/docs/api/provider#normalizeproviderbinding)                                   | Value | `@relkit/provider` | [API example](/docs/api/provider#normalizeproviderbinding)                                                                 |
| [normalizeProviderBindingEffect](/docs/api/provider#normalizeproviderbindingeffect)                       | Value | `@relkit/provider` | [API example](/docs/api/provider#normalizeproviderbindingeffect)                                                           |
| [NormalizeProviderBindingOptions](/docs/api/provider#normalizeproviderbindingoptions-interface)           | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [normalizeProviderProfiles](/docs/api/provider#normalizeproviderprofiles)                                 | Value | `@relkit/provider` | [API example](/docs/api/provider#normalizeproviderprofiles)                                                                |
| [normalizeProviderProfilesEffect](/docs/api/provider#normalizeproviderprofileseffect)                     | Value | `@relkit/provider` | [API example](/docs/api/provider#normalizeproviderprofileseffect)                                                          |
| [normalizeProviderSource](/docs/api/provider#normalizeprovidersource-1)                                   | Value | `@relkit/provider` | [API example](/docs/api/provider#normalizeprovidersource-1)                                                                |
| [normalizeProviderSourceEffect](/docs/api/provider#normalizeprovidersourceeffect-1)                       | Value | `@relkit/provider` | [API example](/docs/api/provider#normalizeprovidersourceeffect-1)                                                          |
| [observeProvider](/docs/api/provider#observeprovider)                                                     | Value | `@relkit/provider` | [API example](/docs/api/provider#observeprovider)                                                                          |
| [PROVIDER_PROTOCOL_VERSION](/docs/api/provider#provider_protocol_version)                                 | Value | `@relkit/provider` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/contracts/version-cohort.test.ts#L30)                   |
| [ProviderAccess](/docs/api/provider#provideraccess-type-alias)                                            | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderAdapter](/docs/api/provider#provideradapter-type-alias)                                          | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderBehavior](/docs/api/provider#providerbehavior-type-alias)                                        | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderBindingResolutionCode](/docs/api/provider#providerbindingresolutioncode-type-alias)              | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderBindingResolutionError](/docs/api/provider#providerbindingresolutionerror-class)                 | Value | `@relkit/provider` | [API example](/docs/api/provider#providerbindingresolutionerror-class)                                                     |
| [ProviderBindingResolutionFailure](/docs/api/provider#providerbindingresolutionfailure-class)             | Value | `@relkit/provider` | [API example](/docs/api/provider#providerbindingresolutionfailure-class)                                                   |
| [ProviderBindingSource](/docs/api/provider#providerbindingsource-type-alias)                              | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [providerCalculation](/docs/api/provider#providercalculation)                                             | Value | `@relkit/provider` | [API example](/docs/api/provider#providercalculation)                                                                      |
| [ProviderCapability](/docs/api/provider#providercapability-type-alias)                                    | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderConnectionContract](/docs/api/provider#providerconnectioncontract-type-alias)                    | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderConnectionDescriptor](/docs/api/provider#providerconnectiondescriptor-interface)                 | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderConnectionField](/docs/api/provider#providerconnectionfield-interface)                           | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderConnectionFieldInput](/docs/api/provider#providerconnectionfieldinput-interface)                 | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderConnectionFields](/docs/api/provider#providerconnectionfields-type-alias)                        | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderConnectionValue](/docs/api/provider#providerconnectionvalue-type-alias)                          | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderConnectionValueMode](/docs/api/provider#providerconnectionvaluemode-type-alias)                  | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderConnectionValues](/docs/api/provider#providerconnectionvalues-type-alias)                        | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderError](/docs/api/provider#providererror-type-alias)                                              | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderFeature](/docs/api/provider#providerfeature-type-alias)                                          | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderFeatureMismatchError](/docs/api/provider#providerfeaturemismatcherror-class)                     | Value | `@relkit/provider` | [API example](/docs/api/provider#providerfeaturemismatcherror-class)                                                       |
| [ProviderFeatureMismatchFailure](/docs/api/provider#providerfeaturemismatchfailure-class)                 | Value | `@relkit/provider` | [API example](/docs/api/provider#providerfeaturemismatchfailure-class)                                                     |
| [ProviderInput](/docs/api/provider#providerinput-type-alias)                                              | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderLocalRecipeReference](/docs/api/provider#providerlocalrecipereference-interface)                 | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderOperation](/docs/api/provider#provideroperation-type-alias)                                      | Type  | `@relkit/provider` | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/provider/tests/effect-telemetry.test.ts#L53)         |
| [ProviderProfileSelection](/docs/api/provider#providerprofileselection-interface)                         | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderProfileSelectionError](/docs/api/provider#providerprofileselectionerror-class)                   | Value | `@relkit/provider` | [API example](/docs/api/provider#providerprofileselectionerror-class)                                                      |
| [ProviderProfileSelectionFailure](/docs/api/provider#providerprofileselectionfailure-class)               | Value | `@relkit/provider` | [API example](/docs/api/provider#providerprofileselectionfailure-class)                                                    |
| [ProviderProfileSelectionSource](/docs/api/provider#providerprofileselectionsource-type-alias)            | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderProtocolVersion](/docs/api/provider#providerprotocolversion-type-alias)                          | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderSourceInput](/docs/api/provider#providersourceinput-type-alias)                                  | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderTelemetry](/docs/api/provider#providertelemetry-class)                                           | Value | `@relkit/provider` | [API example](/docs/api/provider#providertelemetry-class)                                                                  |
| [ProviderTelemetryLive](/docs/api/provider#providertelemetrylive)                                         | Value | `@relkit/provider` | [API example](/docs/api/provider#providertelemetrylive)                                                                    |
| [ProviderTelemetryService](/docs/api/provider#providertelemetryservice-interface)                         | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [ProviderValidationError](/docs/api/provider#providervalidationerror-class)                               | Value | `@relkit/provider` | [API example](/docs/api/provider#providervalidationerror-class)                                                            |
| [resolveProviderConnection](/docs/api/provider#resolveproviderconnection)                                 | Value | `@relkit/provider` | [API example](/docs/api/provider#resolveproviderconnection)                                                                |
| [resolveProviderConnectionEffect](/docs/api/provider#resolveproviderconnectioneffect)                     | Value | `@relkit/provider` | [API example](/docs/api/provider#resolveproviderconnectioneffect)                                                          |
| [ResolveProviderConnectionOptions](/docs/api/provider#resolveproviderconnectionoptions-interface)         | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [runProvider](/docs/api/provider#runprovider)                                                             | Value | `@relkit/provider` | [API example](/docs/api/provider#runprovider)                                                                              |
| [RuntimeProviderContext](/docs/api/provider#runtimeprovidercontext-interface)                             | Type  | `@relkit/provider` | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/engine/tests/provider-registry-runtime.test.ts#L16)  |
| [RuntimeProviderGeneration](/docs/api/provider#runtimeprovidergeneration-interface)                       | Type  | `@relkit/provider` | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/engine/tests/provider-registry-runtime.test.ts#L504) |
| [RuntimeProviderIntegration](/docs/api/provider#runtimeproviderintegration-interface)                     | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |
| [RuntimeProviderRegistration](/docs/api/provider#runtimeproviderregistration-interface)                   | Type  | `@relkit/provider` | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/engine/tests/provider-registry-runtime.test.ts#L505) |
| [selectProviderProfile](/docs/api/provider#selectproviderprofile)                                         | Value | `@relkit/provider` | [API example](/docs/api/provider#selectproviderprofile)                                                                    |
| [selectProviderProfileEffect](/docs/api/provider#selectproviderprofileeffect)                             | Value | `@relkit/provider` | [API example](/docs/api/provider#selectproviderprofileeffect)                                                              |
| [SelectProviderProfileOptions](/docs/api/provider#selectproviderprofileoptions-interface)                 | Type  | `@relkit/provider` | [Module example](/docs/modules/integrations/provider-authoring)                                                            |

## `adapter-builder.ts`

### DefineProviderAdapterOptions

**Signature**

```ts
declare const DefineProviderAdapterOptions: DefineProviderAdapterOptions<
  Capability,
  AdapterId,
  Connection,
  Behavior
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/adapter-builder.ts#L20)

### defineProviderAdapter

Define and validate a pure provider adapter synchronously.

**Throws**

TypeError for unknown fields, invalid features, or invalid identifiers.

**Example**

```ts
defineProviderAdapter(options);
```

**Signature**

```ts
declare const defineProviderAdapter: <
  const Capability extends ProviderCapability,
  const AdapterId extends string,
  const Connection extends ProviderConnectionValues,
  const Behavior extends ProviderBehavior,
>(
  options: DefineProviderAdapterOptions<Capability, AdapterId, Connection, Behavior>,
) => BuiltProviderAdapter<Capability, AdapterId, Connection, Behavior>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/adapter-builder.ts#L70)

### defineProviderAdapterEffect

Define and validate a pure provider adapter in an Effect.

**Example**

```ts
Effect.runSync(defineProviderAdapterEffect(options));
```

**Signature**

```ts
declare const defineProviderAdapterEffect: <
  const Capability extends ProviderCapability,
  const AdapterId extends string,
  const Connection extends ProviderConnectionValues,
  const Behavior extends ProviderBehavior,
>(
  options: DefineProviderAdapterOptions<Capability, AdapterId, Connection, Behavior>,
) => Effect.Effect<
  BuiltProviderAdapter<Capability, AdapterId, Connection, Behavior>,
  ProviderError
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/adapter-builder.ts#L26)

## `adapter-builder.types.ts`

### BuiltProviderAdapter (type alias)

Adapter produced from a typed builder input.

**Signature**

```ts
type BuiltProviderAdapter<
  Capability extends ProviderCapability,
  AdapterId extends string,
  Connection extends ProviderConnectionValues,
  Behavior extends ProviderBehavior,
> = ProviderAdapter<Capability, AdapterId, Connection, Behavior>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/adapter-builder.types.ts#L28)

### DefineProviderAdapterOptions (interface)

Inputs accepted by a provider adapter builder.

**Signature**

```ts
export interface DefineProviderAdapterOptions<
  Capability extends ProviderCapability,
  AdapterId extends string,
  Connection extends ProviderConnectionValues,
  Behavior extends ProviderBehavior,
> {
  readonly integration: IntegrationReference;
  readonly capability: Capability;
  readonly adapterId: AdapterId;
  readonly connectionContract: ProviderConnectionContract;
  readonly connection: Connection;
  readonly behavior: Behavior;
  readonly features?: readonly ProviderFeature<Capability["id"]>[];
  readonly localRecipe?: ProviderLocalRecipeReference;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/adapter-builder.types.ts#L12)

## `binding-normalization.ts`

### NormalizeProviderBindingOptions

**Signature**

```ts
declare const NormalizeProviderBindingOptions: NormalizeProviderBindingOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-normalization.ts#L15)

### ProviderFeatureMismatchError

**Signature**

```ts
declare const ProviderFeatureMismatchError: typeof ProviderFeatureMismatchError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-normalization.ts#L14)

### normalizeProviderBinding

Normalize a selected binding for synchronous callers.

**Throws**

ProviderFeatureMismatchError when required features are absent.

**Example**

```ts
normalizeProviderBinding(selection, { descriptorId: "cart" });
```

**Signature**

```ts
declare const normalizeProviderBinding: (
  selection: ProviderProfileSelection,
  options: NormalizeProviderBindingOptions,
) => NormalizedProviderBinding;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-normalization.ts#L40)

### normalizeProviderBindingEffect

Normalize a selected binding in an Effect after checking features.

**Example**

```ts
Effect.runSync(normalizeProviderBindingEffect(selection, { descriptorId: "cart" }));
```

**Signature**

```ts
declare const normalizeProviderBindingEffect: (
  selection: ProviderProfileSelection,
  options: NormalizeProviderBindingOptions,
) => Effect.Effect<NormalizedProviderBinding, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-normalization.ts#L22)

## `binding-normalization.types.ts`

Required features for a logical descriptor's selected provider.

### NormalizeProviderBindingOptions (interface)

Required features for a logical descriptor's selected provider.

**Signature**

```ts
export interface NormalizeProviderBindingOptions {
  readonly descriptorId: string;
  readonly requiredFeatures?: readonly string[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-normalization.types.ts#L2)

## `binding-resolution.ts`

### ProviderBindingResolutionCode

**Signature**

```ts
declare const ProviderBindingResolutionCode: ProviderBindingResolutionCode;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-resolution.ts#L18)

### ProviderBindingResolutionError

**Signature**

```ts
declare const ProviderBindingResolutionError: typeof ProviderBindingResolutionError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-resolution.ts#L17)

### ProviderConnectionDescriptor

**Signature**

```ts
declare const ProviderConnectionDescriptor: ProviderConnectionDescriptor;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-resolution.ts#L20)

### ResolveProviderConnectionOptions

**Signature**

```ts
declare const ResolveProviderConnectionOptions: ResolveProviderConnectionOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-resolution.ts#L21)

### resolveProviderConnection

Resolve provider connection values synchronously for legacy callers.

**Throws**

ProviderBindingResolutionError for missing or conflicting values; TypeError for invalid input.

**Example**

```ts
resolveProviderConnection(adapter, { profile: "default" });
```

**Signature**

```ts
declare const resolveProviderConnection: (
  adapter: ProviderConnectionDescriptor,
  options: ResolveProviderConnectionOptions,
) => Readonly<Record<string, JsonValue>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-resolution.ts#L47)

### resolveProviderConnectionEffect

Resolve a provider's connection values in an Effect with tagged failures.

**Example**

```ts
Effect.runSync(resolveProviderConnectionEffect(adapter, { profile: "default" }));
```

**Signature**

```ts
declare const resolveProviderConnectionEffect: (
  adapter: ProviderConnectionDescriptor,
  options: ResolveProviderConnectionOptions,
) => Effect.Effect<Readonly<Record<string, JsonValue>>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-resolution.ts#L29)

## `binding-resolution.types.ts`

### ProviderConnectionDescriptor (interface)

Minimal adapter shape accepted by connection resolution.

**Signature**

```ts
export interface ProviderConnectionDescriptor {
  readonly capability: Readonly<{ readonly id: string }>;
  readonly connectionContract: Readonly<{
    readonly fields: Readonly<Record<string, ProviderConnectionField>>;
  }>;
  readonly connection: ProviderConnectionValues;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-resolution.types.ts#L14)

### ResolveProviderConnectionOptions (interface)

Inputs for resolving authored, local, infrastructure, and named values.

**Signature**

```ts
export interface ResolveProviderConnectionOptions {
  readonly profile: string;
  readonly bindingId?: string;
  readonly local?: Readonly<Record<string, JsonValue>>;
  readonly infrastructure?: Readonly<Record<string, JsonValue>>;
  readonly values?: Readonly<Record<string, JsonValue>>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-resolution.types.ts#L5)

## `binding-values.ts`

### createBindingValueRef

Create a binding-local value reference synchronously.

**Throws**

TypeError for an invalid name.

**Example**

```ts
createBindingValueRef("CACHE_URL", "secret-string");
```

**Signature**

```ts
declare const createBindingValueRef: <
  const Name extends string,
  Value = unknown,
  const Type extends BindingValueType = BindingValueType,
>(
  name: Name,
  type: Type,
) => BindingValueRef<Name, Value, Type>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-values.ts#L45)

### createBindingValueRefEffect

Create a binding-local named value reference in an Effect.

**Example**

```ts
Effect.runSync(createBindingValueRefEffect("CACHE_URL", "secret-string"));
```

**Signature**

```ts
declare const createBindingValueRefEffect: <
  const Name extends string,
  Value = unknown,
  const Type extends BindingValueType = BindingValueType,
>(
  name: Name,
  type: Type,
) => Effect.Effect<BindingValueRef<Name, Value, Type>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-values.ts#L26)

### isBindingValueRef

Check an exact binding-local reference synchronously.

**Example**

```ts
isBindingValueRef(value);
```

**Signature**

```ts
declare const isBindingValueRef: (value: unknown) => value is BindingValueRef;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-values.ts#L81)

### isBindingValueRefCore

Pure predicate shared by observed provider operations.

**Example**

```ts
isBindingValueRefCore({ kind: "binding-value-ref", name: "URL", type: "string", sensitive: false });
```

**Signature**

```ts
declare const isBindingValueRefCore: (value: unknown) => value is BindingValueRef;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-values.ts#L89)

### isBindingValueRefEffect

Check an exact binding-local reference in an Effect.

**Example**

```ts
Effect.runSync(isBindingValueRefEffect(value));
```

**Signature**

```ts
declare const isBindingValueRefEffect: (value: unknown) => Effect.Effect<boolean, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/binding-values.ts#L70)

## `dependency-preflight.service.ts`

Validates only selected capability/phase requirements before readiness.
The Layer captures read-only resolution; checks resolve adapters from projects
and peers from adapters, aggregate missing/version diagnostics, and never install.

### "./dependency-preflight.types.js" (namespace export)

Re-exports all named exports from the "./dependency-preflight.types.js" module.

**Signature**

```ts
export * from "./dependency-preflight.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L153)

### DependencyResolutionFailure

**Signature**

```ts
declare const DependencyResolutionFailure: typeof DependencyResolutionFailure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L151)

### DependencySource

**Signature**

```ts
declare const DependencySource: typeof DependencySource;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L148)

### DependencySourceLive

**Signature**

```ts
declare const DependencySourceLive: Layer.Layer<DependencySource, never, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L148)

### SelectedDependencies (class)

Shared startup/compiler validator; each call retains its own selection and roots.

**Signature**

```ts
declare class SelectedDependencies
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L127)

### SelectedDependenciesLayer

Domain Layer leaves its native source replaceable without changing check behavior.

**Signature**

```ts
declare const SelectedDependenciesLayer: Layer.Layer<SelectedDependencies, never, DependencySource>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L138)

### SelectedDependenciesLive

Live compiler/runtime composition has no CLI/compiler or concrete SDK dependency.

**Signature**

```ts
declare const SelectedDependenciesLive: Layer.Layer<SelectedDependencies, never, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L144)

### SelectedDependencyFailure

**Signature**

```ts
declare const SelectedDependencyFailure: typeof SelectedDependencyFailure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L150)

### SelectedDependencyInitializationFailure

**Signature**

```ts
declare const SelectedDependencyInitializationFailure: typeof SelectedDependencyInitializationFailure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L156)

### checkIntegrationDependencies

**Signature**

```ts
declare const checkIntegrationDependencies: (
  plan: RuntimeIntegrationPlan,
  options: {
    readonly projectRoot: string;
    readonly phase: IntegrationDependencyPhase;
    readonly manager?: DependencyPackageManager;
  },
) => Effect.Effect<
  Array<Array<InstalledPackageIdentity>>,
  DependencyResolutionFailure | SelectedDependencyFailure,
  SelectedDependencies
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L154)

### initializeIntegration

**Signature**

```ts
declare const initializeIntegration: <Module>(
  packageName: string,
  load: () => Promise<Module>,
) => Effect.Effect<Module, SelectedDependencyInitializationFailure, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/dependency-preflight.service.ts#L155)

## `identity-builders.ts`

### defineIntegrationReference

Define a static integration identity synchronously.

**Throws**

TypeError for invalid identifiers.

**Example**

```ts
defineIntegrationReference("redis");
```

**Signature**

```ts
declare const defineIntegrationReference: <const Id extends string>(
  integrationId: Id,
) => IntegrationReference<Id>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/identity-builders.ts#L102)

### defineIntegrationReferenceEffect

Define a static integration identity in an Effect.

**Example**

```ts
Effect.runSync(defineIntegrationReferenceEffect("redis"));
```

**Signature**

```ts
declare const defineIntegrationReferenceEffect: <const Id extends string>(
  integrationId: Id,
) => Effect.Effect<IntegrationReference<Id>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/identity-builders.ts#L83)

### defineLocalRecipeReference

Define versioned local-recipe provenance synchronously.

**Throws**

TypeError for invalid versions or identifiers.

**Example**

```ts
defineLocalRecipeReference(redis, "redis-docker", 1);
```

**Signature**

```ts
declare const defineLocalRecipeReference: (
  integration: IntegrationReference,
  recipeId: string,
  recipeVersion: number,
) => ProviderLocalRecipeReference;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/identity-builders.ts#L140)

### defineLocalRecipeReferenceEffect

Define versioned local-recipe provenance in an Effect.

**Example**

```ts
Effect.runSync(defineLocalRecipeReferenceEffect(redis, "redis-docker", 1));
```

**Signature**

```ts
declare const defineLocalRecipeReferenceEffect: (
  integration: IntegrationReference,
  recipeId: string,
  recipeVersion: number,
) => Effect.Effect<ProviderLocalRecipeReference, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/identity-builders.ts#L114)

### defineProviderCapability

Define a stable capability synchronously.

**Throws**

TypeError for invalid identifiers.

**Example**

```ts
defineProviderCapability("cache");
```

**Signature**

```ts
declare const defineProviderCapability: <const Id extends string>(id: Id) => ProviderCapability<Id>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/identity-builders.ts#L38)

### defineProviderCapabilityEffect

Define a stable provider capability in an Effect.

**Example**

```ts
Effect.runSync(defineProviderCapabilityEffect("cache"));
```

**Signature**

```ts
declare const defineProviderCapabilityEffect: <const Id extends string>(
  id: Id,
) => Effect.Effect<ProviderCapability<Id>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/identity-builders.ts#L21)

### defineProviderFeature

Define an adapter feature synchronously.

**Throws**

TypeError for invalid identifiers.

**Example**

```ts
defineProviderFeature(cache, "atomicIncrement");
```

**Signature**

```ts
declare const defineProviderFeature: <
  const Capability extends ProviderCapability,
  const Id extends string,
>(
  capability: Capability,
  id: Id,
) => ProviderFeature<Capability["id"], Id>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/identity-builders.ts#L72)

### defineProviderFeatureEffect

Define an adapter feature in an Effect.

**Example**

```ts
Effect.runSync(defineProviderFeatureEffect(cache, "atomicIncrement"));
```

**Signature**

```ts
declare const defineProviderFeatureEffect: <
  const Capability extends ProviderCapability,
  const Id extends string,
>(
  capability: Capability,
  id: Id,
) => Effect.Effect<ProviderFeature<Capability["id"], Id>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/identity-builders.ts#L47)

## `index.ts`

### "./binding-normalization.js" (namespace export)

Re-exports all named exports from the "./binding-normalization.js" module.

**Signature**

```ts
export * from "./binding-normalization.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L2)

### "./binding-resolution.js" (namespace export)

Re-exports all named exports from the "./binding-resolution.js" module.

**Signature**

```ts
export * from "./binding-resolution.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L1)

### "./profile-normalization.js" (namespace export)

Re-exports all named exports from the "./profile-normalization.js" module.

**Signature**

```ts
export * from "./profile-normalization.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L9)

### "./protocol-builders.js" (namespace export)

Re-exports all named exports from the "./protocol-builders.js" module.

**Signature**

```ts
export * from "./protocol-builders.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L10)

### "./protocol.js" (namespace export)

Re-exports all named exports from the "./protocol.js" module.

**Signature**

```ts
export * from "./protocol.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L11)

### "./protocol.types.js" (namespace export)

Re-exports all named exports from the "./protocol.types.js" module.

**Signature**

```ts
export * from "./protocol.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L12)

### "./provider-observability.js" (namespace export)

Re-exports all named exports from the "./provider-observability.js" module.

**Signature**

```ts
export * from "./provider-observability.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L22)

### "./runtime.types.js" (namespace export)

Re-exports all named exports from the "./runtime.types.js" module.

**Signature**

```ts
export * from "./runtime.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L13)

### ProviderBindingResolutionFailure

**Signature**

```ts
declare const ProviderBindingResolutionFailure: typeof ProviderBindingResolutionFailure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L27)

### ProviderFeatureMismatchFailure

**Signature**

```ts
declare const ProviderFeatureMismatchFailure: typeof ProviderFeatureMismatchFailure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L26)

### ProviderProfileSelectionFailure

**Signature**

```ts
declare const ProviderProfileSelectionFailure: typeof ProviderProfileSelectionFailure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L25)

### ProviderValidationError

**Signature**

```ts
declare const ProviderValidationError: typeof ProviderValidationError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L24)

### createBindingValueRef

**Signature**

```ts
declare const createBindingValueRef: <
  const Name extends string,
  Value = unknown,
  const Type extends BindingValueType = BindingValueType,
>(
  name: Name,
  type: Type,
) => BindingValueRef<Name, Value, Type>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L4)

### createBindingValueRefEffect

**Signature**

```ts
declare const createBindingValueRefEffect: <
  const Name extends string,
  Value = unknown,
  const Type extends BindingValueType = BindingValueType,
>(
  name: Name,
  type: Type,
) => Effect<BindingValueRef<Name, Value, Type>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L5)

### defineInfrastructureProviderSource

**Signature**

```ts
declare const defineInfrastructureProviderSource: <const Adapter extends ProviderAdapter>(
  adapter: Adapter,
  integration: IntegrationReference,
  options: JsonValue,
  access?: ProviderAccess,
) => InfrastructureProviderSource<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L17)

### defineInfrastructureProviderSourceEffect

**Signature**

```ts
declare const defineInfrastructureProviderSourceEffect: <const Adapter extends ProviderAdapter>(
  adapter: Adapter,
  integration: IntegrationReference,
  options: JsonValue,
  access?: ProviderAccess,
) => Effect<InfrastructureProviderSource<Adapter>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L18)

### defineLocalProviderSource

**Signature**

```ts
declare const defineLocalProviderSource: <const Adapter extends ProviderAdapter>(
  adapter: Adapter,
) => LocalProviderSource<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L15)

### defineLocalProviderSourceEffect

**Signature**

```ts
declare const defineLocalProviderSourceEffect: <const Adapter extends ProviderAdapter>(
  adapter: Adapter,
) => Effect<LocalProviderSource<Adapter>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L16)

### isBindingValueRef

**Signature**

```ts
declare const isBindingValueRef: (value: unknown) => value is BindingValueRef;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L6)

### isBindingValueRefEffect

**Signature**

```ts
declare const isBindingValueRefEffect: (value: unknown) => Effect<boolean, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L7)

### normalizeProviderSource

**Signature**

```ts
declare const normalizeProviderSource: <const Adapter extends ProviderAdapter>(
  input: ProviderSourceInput<Adapter>,
) => NormalizedProviderSource<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L19)

### normalizeProviderSourceEffect

**Signature**

```ts
declare const normalizeProviderSourceEffect: <const Adapter extends ProviderAdapter>(
  input: ProviderSourceInput<Adapter>,
) => Effect<NormalizedProviderSource<Adapter>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/index.ts#L20)

## `profile-normalization.ts`

### NormalizedProviderProfiles

**Signature**

```ts
declare const NormalizedProviderProfiles: NormalizedProviderProfiles<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.ts#L28)

### ProviderInput

**Signature**

```ts
declare const ProviderInput: ProviderInput<Binding>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.ts#L29)

### ProviderProfileSelection

**Signature**

```ts
declare const ProviderProfileSelection: ProviderProfileSelection<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.ts#L30)

### ProviderProfileSelectionError

**Signature**

```ts
declare const ProviderProfileSelectionError: typeof ProviderProfileSelectionError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.ts#L26)

### ProviderProfileSelectionSource

**Signature**

```ts
declare const ProviderProfileSelectionSource: ProviderProfileSelectionSource;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.ts#L31)

### SelectProviderProfileOptions

**Signature**

```ts
declare const SelectProviderProfileOptions: SelectProviderProfileOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.ts#L32)

### normalizeProviderProfiles

Normalize provider profiles for synchronous callers.

**Throws**

TypeError when a profile is empty, duplicated, or mismatched.

**Example**

```ts
normalizeProviderProfiles(cache, adapter);
```

**Signature**

```ts
declare const normalizeProviderProfiles: <Adapter extends ProviderAdapter>(
  capability: ProviderCapability,
  input: ProviderInput<ProviderSourceInput<Adapter>>,
) => NormalizedProviderProfiles<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.ts#L56)

### normalizeProviderProfilesEffect

Normalize a direct source or named profile map in an Effect.

**Example**

```ts
Effect.runSync(normalizeProviderProfilesEffect(cache, adapter));
```

**Signature**

```ts
declare const normalizeProviderProfilesEffect: <Adapter extends ProviderAdapter>(
  capability: ProviderCapability,
  input: ProviderInput<ProviderSourceInput<Adapter>>,
) => Effect.Effect<NormalizedProviderProfiles<Adapter>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.ts#L40)

### selectProviderProfile

Select a provider profile synchronously for legacy callers.

**Throws**

ProviderProfileSelectionError for ambiguity or an unknown profile.

**Example**

```ts
selectProviderProfile(profiles, { descriptorId: "cart" });
```

**Signature**

```ts
declare const selectProviderProfile: <Adapter extends ProviderAdapter>(
  normalized: NormalizedProviderProfiles<Adapter>,
  options: SelectProviderProfileOptions,
) => ProviderProfileSelection<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.ts#L109)

### selectProviderProfileEffect

Select a descriptor, default, or sole provider profile in an Effect.

**Example**

```ts
Effect.runSync(selectProviderProfileEffect(profiles, { descriptorId: "cart" }));
```

**Signature**

```ts
declare const selectProviderProfileEffect: <Adapter extends ProviderAdapter>(
  normalized: NormalizedProviderProfiles<Adapter>,
  options: SelectProviderProfileOptions,
) => Effect.Effect<ProviderProfileSelection<Adapter>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.ts#L93)

## `profile-normalization.types.ts`

### NormalizedProviderProfiles (interface)

Immutable provider sources keyed by normalized profile name.

**Signature**

```ts
export interface NormalizedProviderProfiles<Adapter extends ProviderAdapter = ProviderAdapter> {
  readonly kind: "normalized-provider-profiles";
  readonly capability: string;
  readonly profiles: Readonly<Record<string, NormalizedProviderSource<Adapter>>>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.types.ts#L9)

### ProviderInput (type alias)

A direct binding or a map of named provider profiles.

**Signature**

```ts
type ProviderInput<Binding> = Binding | Readonly<Record<string, Binding>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.types.ts#L7)

### ProviderProfileSelection (interface)

Selected profile with the matching normalized binding.

**Signature**

```ts
export interface ProviderProfileSelection<Adapter extends ProviderAdapter = ProviderAdapter> {
  readonly capability: string;
  readonly profile: string;
  readonly source: ProviderProfileSelectionSource;
  readonly binding: NormalizedProviderSource<Adapter>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.types.ts#L17)

### ProviderProfileSelectionSource (type alias)

How a profile was selected.

**Signature**

```ts
type ProviderProfileSelectionSource = "descriptor" | "default" | "sole";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.types.ts#L15)

### ProviderProfileSource (type alias)

Source accepted by profile normalization.

**Signature**

```ts
type ProviderProfileSource<Adapter extends ProviderAdapter> = ProviderInput<
  ProviderSourceInput<Adapter>
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.types.ts#L24)

### SelectProviderProfileOptions (interface)

Descriptor and optional application-level default profile selection.

**Signature**

```ts
export interface SelectProviderProfileOptions {
  readonly descriptorId: string;
  readonly profile?: string;
  readonly defaultProfile?: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/profile-normalization.types.ts#L28)

## `protocol.ts`

Current provider descriptor protocol version.

### PROVIDER_PROTOCOL_VERSION

Current provider descriptor protocol version.

**Signature**

```ts
declare const PROVIDER_PROTOCOL_VERSION: 1;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.ts#L2)

## `protocol.types.ts`

### BindingValueRef (type alias)

Opaque reference to a binding-local runtime value.

**Signature**

```ts
type BindingValueRef<
  Name extends string = string,
  Value = unknown,
  Type extends BindingValueType = BindingValueType,
> = Readonly<{
  kind: "binding-value-ref";
  name: Name;
  type: Type;
  sensitive: Type extends "secret-string" ? true : false;
  __value?: Value;
}> &
  ProviderProtocolType<"binding-value-ref">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L18)

### BindingValueType (type alias)

Supported named binding value kinds.

**Signature**

```ts
type BindingValueType = "string" | "number" | "boolean" | "port" | "url" | "json" | "secret-string";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L14)

### InfrastructureProviderSource (type alias)

Adapter and infrastructure materialization request.

**Signature**

```ts
type InfrastructureProviderSource<Adapter extends ProviderAdapter = ProviderAdapter> = Readonly<{
  kind: "provider-infrastructure-source";
  adapter: Adapter;
  integration: IntegrationReference;
  options: JsonValue;
  access?: ProviderAccess;
}> &
  ProviderProtocolType<"infrastructure-source">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L134)

### IntegrationReference (type alias)

Static integration identity without an import path.

**Signature**

```ts
type IntegrationReference<Id extends string = string> = Readonly<{
  kind: "integration-reference";
  integrationId: Id;
}> &
  ProviderProtocolType<"integration-reference">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L95)

### LocalProviderSource (type alias)

Adapter wrapped with its declared local recipe.

**Signature**

```ts
type LocalProviderSource<Adapter extends ProviderAdapter = ProviderAdapter> = Readonly<{
  kind: "provider-local-source";
  adapter: Adapter;
}> &
  ProviderProtocolType<"local-source">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L127)

### NormalizedProviderAdapter (interface)

Runtime-facing projection of an adapter's immutable fields.

**Signature**

```ts
export interface NormalizedProviderAdapter {
  readonly integrationId: string;
  readonly adapterId: string;
  readonly protocolVersion: ProviderProtocolVersion;
  readonly behavior: JsonValue;
  readonly connectionContract: ProviderConnectionFields;
  readonly connection: ProviderConnectionValues;
  readonly features: readonly string[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L176)

### NormalizedProviderBinding (type alias)

Selected provider binding consumed by the runtime.

**Signature**

```ts
type NormalizedProviderBinding = Readonly<{
  kind: "provider-binding";
  capability: string;
  profile: string;
  adapter: NormalizedProviderAdapter;
  source: ProviderBindingSource;
  local?: ProviderLocalRecipeReference;
  access?: JsonValue;
}> &
  ProviderProtocolType<"normalized-binding">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L187)

### NormalizedProviderSource (type alias)

Frozen source descriptor consumed by profile normalization.

**Signature**

```ts
type NormalizedProviderSource<Adapter extends ProviderAdapter = ProviderAdapter> = Readonly<{
  kind: "normalized-provider-source";
  adapter: Adapter;
  source: ProviderBindingSource;
  local?: ProviderLocalRecipeReference;
  access?: JsonValue;
}> &
  ProviderProtocolType<"normalized-source">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L166)

### ProviderAccess (type alias)

Access policy metadata for an infrastructure source.

**Signature**

```ts
type ProviderAccess<Value extends JsonValue = JsonValue> = Readonly<{
  kind: "provider-access";
  value: Value;
}> &
  ProviderProtocolType<"access">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L88)

### ProviderAdapter (type alias)

Immutable adapter descriptor for one integration capability.

**Signature**

```ts
type ProviderAdapter<
  Capability extends ProviderCapability = ProviderCapability,
  AdapterId extends string = string,
  Connection extends ProviderConnectionValues = ProviderConnectionValues,
  Behavior extends ProviderBehavior = ProviderBehavior,
> = Readonly<{
  kind: "provider-adapter";
  protocolVersion: ProviderProtocolVersion;
  integration: IntegrationReference;
  capability: Capability;
  adapterId: AdapterId;
  connectionContract: ProviderConnectionContract;
  connection: Connection;
  behavior: Behavior;
  features: readonly ProviderFeature<Capability["id"]>[];
  localRecipe?: ProviderLocalRecipeReference;
}> &
  ProviderProtocolType<"adapter">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L107)

### ProviderBehavior (type alias)

Immutable behavioral metadata separate from connection values.

**Signature**

```ts
type ProviderBehavior<Value extends JsonValue = JsonValue> = Readonly<{
  kind: "provider-behavior";
  value: Value;
}> &
  ProviderProtocolType<"behavior">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L81)

### ProviderBindingSource (type alias)

Source mode selected for a normalized provider binding.

**Signature**

```ts
type ProviderBindingSource =
  | Readonly<{ kind: "connected" }>
  | Readonly<{ kind: "local-only" }>
  | Readonly<{
      kind: "infrastructure";
      integrationId: string;
      options: JsonValue;
    }>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L149)

### ProviderCapability (type alias)

Nominal capability identity shared by features and adapters.

**Signature**

```ts
type ProviderCapability<Id extends string = string> = Readonly<{
  kind: "provider-capability";
  id: Id;
}> &
  ProviderProtocolType<"capability">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L32)

### ProviderConnectionContract (type alias)

Nominal connection contract for a provider adapter.

**Signature**

```ts
type ProviderConnectionContract<
  Fields extends ProviderConnectionFields = ProviderConnectionFields,
> = Readonly<{
  kind: "provider-connection-contract";
  fields: Fields;
}> &
  ProviderProtocolType<"connection-contract">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L72)

### ProviderConnectionField (interface)

Normalized field contract with explicit defaults.

**Signature**

```ts
export interface ProviderConnectionField {
  readonly required: boolean;
  readonly sensitive: boolean;
  readonly authoredValue: ProviderConnectionValueMode;
  readonly default?: JsonValue;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L61)

### ProviderConnectionFieldInput (interface)

Authoring options for one connection field.

**Signature**

```ts
export interface ProviderConnectionFieldInput {
  readonly required?: boolean;
  readonly sensitive?: boolean;
  readonly authoredValue?: ProviderConnectionValueMode;
  readonly default?: JsonValue;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L53)

### ProviderConnectionFields (type alias)

Named connection fields in an adapter contract.

**Signature**

```ts
type ProviderConnectionFields = Readonly<Record<string, ProviderConnectionField>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L69)

### ProviderConnectionValue (type alias)

Literal JSON or a named binding value reference.

**Signature**

```ts
type ProviderConnectionValue = JsonValue | BindingValueRef;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L102)

### ProviderConnectionValueMode (type alias)

Whether authored connection values are fixed or allow outputs to replace them.

**Signature**

```ts
type ProviderConnectionValueMode = "fixed" | "fallback";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L50)

### ProviderConnectionValues (type alias)

Authored connection field values.

**Signature**

```ts
type ProviderConnectionValues = Readonly<Record<string, ProviderConnectionValue>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L104)

### ProviderFeature (type alias)

Nominal feature identity within one provider capability.

**Signature**

```ts
type ProviderFeature<Capability extends string = string, Id extends string = string> = Readonly<{
  kind: "provider-feature";
  capability: Capability;
  id: Id;
}> &
  ProviderProtocolType<"feature">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L39)

### ProviderLocalRecipeReference (interface)

Versioned local recipe provenance for an adapter.

**Signature**

```ts
export interface ProviderLocalRecipeReference {
  readonly integrationId: string;
  readonly recipeId: string;
  readonly recipeVersion: number;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L159)

### ProviderProtocolVersion (type alias)

Current version accepted by provider descriptors.

**Signature**

```ts
type ProviderProtocolVersion = typeof PROVIDER_PROTOCOL_VERSION;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L11)

### ProviderSourceInput (type alias)

Direct adapter or one source wrapper.

**Signature**

```ts
type ProviderSourceInput<Adapter extends ProviderAdapter = ProviderAdapter> =
  Adapter | LocalProviderSource<Adapter> | InfrastructureProviderSource<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/protocol.types.ts#L145)

## `provider-compat-errors.ts`

### ProviderBindingResolutionError (class)

Synchronous connection error retained for compatibility.

**Example**

```ts
throw new ProviderBindingResolutionError(
  "MISSING_CONNECTION_VALUE",
  "cache.default",
  "url",
  "is required",
);
```

**Signature**

```ts
declare class ProviderBindingResolutionError {
  constructor(
    code: ProviderBindingResolutionCode,
    bindingId: string,
    field: string,
    reason: string,
  );
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L75)

### code (property)

**Signature**

```ts
readonly code: ProviderBindingResolutionCode
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L76)

### bindingId (property)

**Signature**

```ts
readonly bindingId: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L77)

### field (property)

**Signature**

```ts
readonly field: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L78)

### reason (property)

**Signature**

```ts
readonly reason: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L79)

### ProviderFeatureMismatchError (class)

Synchronous missing-feature error retained for compatibility.

**Example**

```ts
throw new ProviderFeatureMismatchError("cache", "default", "cart", ["atomic"]);
```

**Signature**

```ts
declare class ProviderFeatureMismatchError {
  constructor(
    capability: string,
    profile: string,
    descriptorId: string,
    features: readonly string[],
  );
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L44)

### code (property)

**Signature**

```ts
readonly code: "MISSING_PROVIDER_FEATURE"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L45)

### capability (property)

**Signature**

```ts
readonly capability: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L46)

### profile (property)

**Signature**

```ts
readonly profile: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L47)

### descriptorId (property)

**Signature**

```ts
readonly descriptorId: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L48)

### features (property)

**Signature**

```ts
readonly features: ReadonlyArray<string>
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L49)

### ProviderInputError (class)

Internal marker for expected provider input failures.

**Example**

```ts
throw new ProviderInputError("Invalid provider ID");
```

**Signature**

```ts
declare class ProviderInputError
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L6)

### ProviderProfileSelectionError (class)

Synchronous profile selection error retained for compatibility.

**Example**

```ts
throw new ProviderProfileSelectionError(
  "UNKNOWN_PROVIDER_PROFILE",
  "cache",
  "cart",
  [],
  "selected unknown profile",
);
```

**Signature**

```ts
declare class ProviderProfileSelectionError {
  constructor(
    code: ProviderProfileSelectionError["code"],
    capability: string,
    descriptorId: string,
    profiles: readonly string[],
    reason: string,
  );
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L10)

### code (property)

**Signature**

```ts
readonly code: "AMBIGUOUS_PROVIDER_PROFILE" | "UNKNOWN_PROVIDER_PROFILE"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L11)

### capability (property)

**Signature**

```ts
readonly capability: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L12)

### descriptorId (property)

**Signature**

```ts
readonly descriptorId: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L13)

### profiles (property)

**Signature**

```ts
readonly profiles: ReadonlyArray<string>
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L14)

### reason (property)

**Signature**

```ts
readonly reason: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-compat-errors.ts#L15)

## `provider-errors.ts`

### ProviderBindingResolutionCode

**Signature**

```ts
declare const ProviderBindingResolutionCode: ProviderBindingResolutionCode;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-errors.ts#L7)

### ProviderBindingResolutionFailure (class)

Tagged connection failure in the Effect error channel.

**Example**

```ts
Effect.catchTag("ProviderBindingResolutionError", (error) => Effect.logWarning(error.message));
```

**Signature**

```ts
declare class ProviderBindingResolutionFailure
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-errors.ts#L46)

### ProviderFeatureMismatchFailure (class)

Tagged missing-feature failure in the Effect error channel.

**Example**

```ts
Effect.catchTag("ProviderFeatureMismatchError", (error) => Effect.logWarning(error.message));
```

**Signature**

```ts
declare class ProviderFeatureMismatchFailure
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-errors.ts#L33)

### ProviderProfileSelectionFailure (class)

Tagged profile failure in the Effect error channel.

**Example**

```ts
Effect.catchTag("ProviderProfileSelectionError", (error) => Effect.logWarning(error.message));
```

**Signature**

```ts
declare class ProviderProfileSelectionFailure
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-errors.ts#L20)

### ProviderValidationCode

**Signature**

```ts
declare const ProviderValidationCode: ProviderValidationCode;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-errors.ts#L8)

### ProviderValidationError (class)

Tagged invalid provider input, with a stable category and safe message.

**Example**

```ts
Effect.catchTag("ProviderValidationError", (error) => Effect.logWarning(error.message));
```

**Signature**

```ts
declare class ProviderValidationError
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-errors.ts#L13)

## `provider-errors.types.ts`

Stable validation codes for provider authoring failures.

### ProviderBindingResolutionCode (type alias)

Stable codes for connection resolution failures.

**Signature**

```ts
type ProviderBindingResolutionCode =
  "CONFLICTING_CONNECTION_VALUE" | "MISSING_CONNECTION_VALUE" | "UNKNOWN_CONNECTION_OUTPUT";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-errors.types.ts#L5)

### ProviderValidationCode (type alias)

Stable validation codes for provider authoring failures.

**Signature**

```ts
type ProviderValidationCode =
  "INVALID_ID" | "INVALID_DESCRIPTOR" | "INVALID_CONNECTION" | "INVALID_PROFILE";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-errors.types.ts#L2)

## `provider-observability.ts`

### ProviderError

**Signature**

```ts
declare const ProviderError: ProviderError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.ts#L20)

### ProviderOperation

**Signature**

```ts
declare const ProviderOperation: ProviderOperation;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.ts#L21)

### ProviderTelemetry (class)

Injectable telemetry for provider operations.

**Example**

```ts
Effect.provide(defineProviderCapabilityEffect("cache"), ProviderTelemetryLive);
```

**Signature**

```ts
declare class ProviderTelemetry
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.ts#L27)

### ProviderTelemetryLive

Live spans and metrics for provider operations.

**Example**

```ts
Effect.runSync(Effect.provide(defineProviderCapabilityEffect("cache"), ProviderTelemetryLive));
```

**Signature**

```ts
declare const ProviderTelemetryLive: Layer.Layer<ProviderTelemetry, never, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.ts#L34)

### ProviderTelemetryService

**Signature**

```ts
declare const ProviderTelemetryService: ProviderTelemetryService;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.ts#L22)

### observeProvider

Records a fixed provider operation with substitutable telemetry.

**Example**

```ts
observeProvider("capability.define", Effect.succeed("cache"));
```

**Signature**

```ts
declare const observeProvider: <A, E, R>(
  operation: ProviderOperation,
  effect: Effect.Effect<A, E, R>,
) => Effect.Effect<A, E, R>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.ts#L46)

### providerCalculation

Runs synchronous provider logic inside Effect and tags known validation failures.

**Example**

```ts
providerCalculation("INVALID_ID", () => "cache");
```

**Signature**

```ts
declare const providerCalculation: <A>(
  code: ProviderValidationError["code"],
  evaluate: () => A,
) => Effect.Effect<A, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.ts#L83)

### runProvider

Runs a public synchronous compatibility adapter.

**Throws**

A TypeError for general validation, a named domain error, or an unexpected defect.

**Example**

```ts
runProvider(Effect.succeed("cache"));
```

**Signature**

```ts
declare const runProvider: <A, E>(effect: Effect.Effect<A, E>) => A;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.ts#L142)

## `provider-observability.types.ts`

Names provider operations and typed failures for substitutable instrumentation that preserves Effect result channels.

### ProviderError (type alias)

Expected tagged failures from provider operations.

**Signature**

```ts
type ProviderError =
  | ProviderValidationError
  | ProviderProfileSelectionFailure
  | ProviderFeatureMismatchFailure
  | ProviderBindingResolutionFailure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.types.ts#L33)

### ProviderOperation (type alias)

Fixed names for provider operations; never derived from user input.

**Signature**

```ts
type ProviderOperation =
  | "dependency.resolve"
  | "dependency.manager"
  | "dependency.check"
  | "dependency.initialize"
  | "binding-value.create"
  | "binding-value.is-ref"
  | "binding.resolve"
  | "binding.normalize"
  | "profile.normalize"
  | "profile.select"
  | "source.local"
  | "source.infrastructure"
  | "source.normalize"
  | "capability.define"
  | "feature.define"
  | "connection.define"
  | "behavior.define"
  | "access.define"
  | "integration.define"
  | "recipe.define"
  | "adapter.define";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.types.ts#L10)

### ProviderTelemetryService (interface)

Substitutable operation telemetry used by public Effect functions.

**Signature**

```ts
export interface ProviderTelemetryService {
  /** Observe an operation without changing its result or failure.
   * @param operation - Fixed operation name.
   * @param effect - Effect to observe.
   * @returns The same success and error channels.
   * @example telemetry.observe("capability.define", Effect.succeed("cache"));
   */
  readonly observe: <A, E, R>(
    operation: ProviderOperation,
    effect: Effect.Effect<A, E, R>,
  ) => Effect.Effect<A, E, R>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/provider-observability.types.ts#L39)

## `runtime.types.ts`

### RuntimeProviderContext (interface)

Binding data passed to a runtime provider generation.

**Signature**

```ts
export interface RuntimeProviderContext {
  readonly generationId: string;
  readonly bindingId: string;
  readonly capability: string;
  readonly profile: string;
  readonly executionModel?: "task" | "legacy-function";
  readonly behavior: JsonValue;
  readonly connection: Readonly<Record<string, JsonValue>>;
  readonly signal?: AbortSignal;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/runtime.types.ts#L8)

### RuntimeProviderGeneration (interface)

Acquired runtime value and optional readiness and disposal hooks.

**Signature**

```ts
export interface RuntimeProviderGeneration {
  readonly value: unknown;
  readonly ready?: () => MaybePromise<void>;
  readonly readiness?: () => MaybePromise<void>;
  readonly release?: () => MaybePromise<void>;
  readonly dispose?: () => MaybePromise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/runtime.types.ts#L20)

### RuntimeProviderIntegration (interface)

Collection of runtime provider registrations owned by an integration.

**Signature**

```ts
export interface RuntimeProviderIntegration<IntegrationId extends string = string> {
  readonly kind: "runtime-integration";
  readonly integrationId: IntegrationId;
  readonly registrations: readonly RuntimeProviderRegistration[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/runtime.types.ts#L34)

### RuntimeProviderRegistration (interface)

Registration factory for one runtime provider capability.

**Signature**

```ts
export interface RuntimeProviderRegistration extends RuntimeIntegrationRegistrationMetadata {
  readonly create: (context: RuntimeProviderContext) => MaybePromise<RuntimeProviderGeneration>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/runtime.types.ts#L29)

## `source-normalization.ts`

### defineInfrastructureProviderSource

Add an infrastructure source synchronously.

**Throws**

TypeError when the adapter is invalid or has no local recipe.

**Example**

```ts
defineInfrastructureProviderSource(adapter, integration, {});
```

**Signature**

```ts
declare const defineInfrastructureProviderSource: <const Adapter extends ProviderAdapter>(
  adapter: Adapter,
  integration: IntegrationReference,
  options: JsonValue,
  access?: ProviderAccess,
) => InfrastructureProviderSource<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/source-normalization.ts#L91)

### defineInfrastructureProviderSourceEffect

Add an infrastructure source in an Effect.

**Example**

```ts
Effect.runSync(defineInfrastructureProviderSourceEffect(adapter, integration, {}));
```

**Signature**

```ts
declare const defineInfrastructureProviderSourceEffect: <const Adapter extends ProviderAdapter>(
  adapter: Adapter,
  integration: IntegrationReference,
  options: JsonValue,
  access?: ProviderAccess,
) => Effect.Effect<InfrastructureProviderSource<Adapter>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/source-normalization.ts#L69)

### defineLocalProviderSource

Add an adapter's local recipe for synchronous callers.

**Throws**

TypeError when the adapter is invalid or has no local recipe.

**Example**

```ts
defineLocalProviderSource(adapter);
```

**Signature**

```ts
declare const defineLocalProviderSource: <const Adapter extends ProviderAdapter>(
  adapter: Adapter,
) => LocalProviderSource<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/source-normalization.ts#L48)

### defineLocalProviderSourceEffect

Add an adapter's local recipe without starting it.

**Example**

```ts
Effect.runSync(defineLocalProviderSourceEffect(adapter));
```

**Signature**

```ts
declare const defineLocalProviderSourceEffect: <const Adapter extends ProviderAdapter>(
  adapter: Adapter,
) => Effect.Effect<LocalProviderSource<Adapter>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/source-normalization.ts#L34)

### normalizeProviderSource

Normalize a provider source synchronously.

**Throws**

TypeError for invalid descriptors, nested wrappers, or missing values.

**Example**

```ts
normalizeProviderSource(adapter);
```

**Signature**

```ts
declare const normalizeProviderSource: <const Adapter extends ProviderAdapter>(
  input: ProviderSourceInput<Adapter>,
) => NormalizedProviderSource<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/source-normalization.ts#L137)

### normalizeProviderSourceCore

Pure normalization shared by observed source and profile operations.

**Throws**

TypeError for invalid descriptors or missing required values.

**Example**

```ts
normalizeProviderSourceCore(adapter);
```

**Signature**

```ts
declare const normalizeProviderSourceCore: <const Adapter extends ProviderAdapter>(
  input: ProviderSourceInput<Adapter>,
) => NormalizedProviderSource<Adapter>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/source-normalization.ts#L148)

### normalizeProviderSourceEffect

Normalize any provider source in an Effect.

**Example**

```ts
Effect.runSync(normalizeProviderSourceEffect(adapter));
```

**Signature**

```ts
declare const normalizeProviderSourceEffect: <const Adapter extends ProviderAdapter>(
  input: ProviderSourceInput<Adapter>,
) => Effect.Effect<NormalizedProviderSource<Adapter>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/source-normalization.ts#L123)

## `value-builders.ts`

### defineConnectionContract

Define connection fields synchronously.

**Throws**

TypeError for invalid or duplicate fields.

**Example**

```ts
defineConnectionContract({ url: { sensitive: true } });
```

**Signature**

```ts
declare const defineConnectionContract: (
  fields: Readonly<Record<string, ProviderConnectionFieldInput>>,
) => ProviderConnectionContract;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/value-builders.ts#L56)

### defineConnectionContractEffect

Define connection fields in an Effect with deterministic key order.

**Example**

```ts
Effect.runSync(defineConnectionContractEffect({ url: { sensitive: true } }));
```

**Signature**

```ts
declare const defineConnectionContractEffect: (
  fields: Readonly<Record<string, ProviderConnectionFieldInput>>,
) => Effect.Effect<ProviderConnectionContract, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/value-builders.ts#L23)

### defineProviderAccess

Define immutable access metadata synchronously.

**Throws**

TypeError for invalid JSON.

**Example**

```ts
defineProviderAccess({ actions: ["cache:read"] });
```

**Signature**

```ts
declare const defineProviderAccess: <const Value extends JsonValue>(
  value: Value,
) => ProviderAccess<Value>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/value-builders.ts#L110)

### defineProviderAccessEffect

Define immutable access metadata in an Effect.

**Example**

```ts
Effect.runSync(defineProviderAccessEffect({ actions: ["cache:read"] }));
```

**Signature**

```ts
declare const defineProviderAccessEffect: <const Value extends JsonValue>(
  value: Value,
) => Effect.Effect<ProviderAccess<Value>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/value-builders.ts#L93)

### defineProviderBehavior

Define immutable provider behavior synchronously.

**Throws**

TypeError for invalid JSON.

**Example**

```ts
defineProviderBehavior({ keyPrefix: "cart" });
```

**Signature**

```ts
declare const defineProviderBehavior: <const Value extends JsonValue>(
  value: Value,
) => ProviderBehavior<Value>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/value-builders.ts#L83)

### defineProviderBehaviorEffect

Define immutable provider behavior in an Effect.

**Example**

```ts
Effect.runSync(defineProviderBehaviorEffect({ keyPrefix: "cart" }));
```

**Signature**

```ts
declare const defineProviderBehaviorEffect: <const Value extends JsonValue>(
  value: Value,
) => Effect.Effect<ProviderBehavior<Value>, ProviderError>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/provider/src/value-builders.ts#L66)
