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

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

## Common APIs

- [localEvent](/docs/api/integrations/local#localevent)
- [localJob](/docs/api/integrations/local#localjob)

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

## Public imports

- `@relkit/local` — 64 exports
- `@relkit/local/runtime` — 48 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                                                                                                            |
| ----------------------------------------------------------------------------------------------------------------- | ----- | ----------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [acquireLocalProjectLease](/docs/api/integrations/local#acquirelocalprojectlease)                                 | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [AcquireLocalProjectLeaseOptions](/docs/api/integrations/local#acquirelocalprojectleaseoptions-interface)         | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [assertLocalServicePlanVersion](/docs/api/integrations/local#assertlocalserviceplanversion)                       | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#assertlocalserviceplanversion)                                          |
| [assertLocalServicePlanVersionEffect](/docs/api/integrations/local#assertlocalserviceplanversioneffect)           | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#assertlocalserviceplanversioneffect)                                    |
| [assertLocalServiceStateVersion](/docs/api/integrations/local#assertlocalservicestateversion)                     | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#assertlocalservicestateversion)                                         |
| [assertLocalServiceStateVersionEffect](/docs/api/integrations/local#assertlocalservicestateversioneffect)         | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#assertlocalservicestateversioneffect)                                   |
| [assertProviderOverrideStateVersion](/docs/api/integrations/local#assertprovideroverridestateversion)             | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#assertprovideroverridestateversion)                                     |
| [assertProviderOverrideStateVersionEffect](/docs/api/integrations/local#assertprovideroverridestateversioneffect) | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#assertprovideroverridestateversioneffect)                               |
| [CompositeLocalServiceRecipe](/docs/api/integrations/local#compositelocalservicerecipe-interface)                 | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#compositelocalservicerecipe-interface)                                  |
| [CompositeLocalServiceUnit](/docs/api/integrations/local#compositelocalserviceunit-interface)                     | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#compositelocalserviceunit-interface)                                    |
| [CompositeLocalServiceUnitKind](/docs/api/integrations/local#compositelocalserviceunitkind-type-alias)            | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#compositelocalserviceunitkind-type-alias)                               |
| [CompositeLocalServiceUnitVolume](/docs/api/integrations/local#compositelocalserviceunitvolume-interface)         | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#compositelocalserviceunitvolume-interface)                              |
| [CompositeLocalServiceVolume](/docs/api/integrations/local#compositelocalservicevolume-interface)                 | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#compositelocalservicevolume-interface)                                  |
| [createLocalProjectIdentity](/docs/api/integrations/local#createlocalprojectidentity)                             | Value | `@relkit/local/runtime` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/integration/local-docker-composite.test.ts#L34) |
| [createLocalServiceReconciler](/docs/api/integrations/local#createlocalservicereconciler)                         | Value | `@relkit/local/runtime` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/integration/local-docker-composite.test.ts#L46) |
| [ensureLocalStateDirectory](/docs/api/integrations/local#ensurelocalstatedirectory)                               | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [groupServiceInstances](/docs/api/integrations/local#groupserviceinstances-1)                                     | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LOCAL_PROJECT_LEASE_VERSION](/docs/api/integrations/local#local_project_lease_version)                           | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LOCAL_RESOURCE_LABEL](/docs/api/integrations/local#local_resource_label)                                         | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LOCAL_SERVICE_PLAN_FILE](/docs/api/integrations/local#local_service_plan_file)                                   | Value | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [LOCAL_SERVICE_PLAN_VERSION](/docs/api/integrations/local#local_service_plan_version)                             | Value | `@relkit/local`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/contracts/version-cohort.test.ts#L32)           |
| [LOCAL_SERVICE_PROTOCOL_VERSION](/docs/api/integrations/local#local_service_protocol_version)                     | Value | `@relkit/local`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/services/recipe-cache.test.ts#L15) |
| [LOCAL_SERVICE_RECIPE_PROTOCOL_VERSION](/docs/api/integrations/local#local_service_recipe_protocol_version)       | Value | `@relkit/local`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/local-service/tests/recipe.test.ts#L10)      |
| [LOCAL_SERVICE_SECRETS_FILE](/docs/api/integrations/local#local_service_secrets_file)                             | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LOCAL_SERVICE_STATE_FILE](/docs/api/integrations/local#local_service_state_file)                                 | Value | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [LOCAL_SERVICE_STATE_VERSION](/docs/api/integrations/local#local_service_state_version)                           | Value | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [localAgentState](/docs/api/integrations/local#localagentstate)                                                   | Value | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [LocalAgentStateAdapter](/docs/api/integrations/local#localagentstateadapter-type-alias)                          | Type  | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [localEndpointHash](/docs/api/integrations/local#localendpointhash)                                               | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [localEvent](/docs/api/integrations/local#localevent)                                                             | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#localevent)                                                             |
| [LocalEventAdapter](/docs/api/integrations/local#localeventadapter-type-alias)                                    | Type  | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [localJob](/docs/api/integrations/local#localjob)                                                                 | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#localjob)                                                               |
| [LocalJobAdapter](/docs/api/integrations/local#localjobadapter-type-alias)                                        | Type  | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [LocalProjectIdentity](/docs/api/integrations/local#localprojectidentity-interface)                               | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [localProjectLabels](/docs/api/integrations/local#localprojectlabels)                                             | Value | `@relkit/local/runtime` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/integration/local-docker-composite.test.ts#L35) |
| [LocalProjectLease](/docs/api/integrations/local#localprojectlease-interface)                                     | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalProjectLeaseError](/docs/api/integrations/local#localprojectleaseerror-class)                               | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalProjectLeaseErrorCode](/docs/api/integrations/local#localprojectleaseerrorcode-type-alias)                  | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalProjectLeaseHandle](/docs/api/integrations/local#localprojectleasehandle-interface)                         | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalProjectLeaseMode](/docs/api/integrations/local#localprojectleasemode-type-alias)                            | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalProjectLeaseStatus](/docs/api/integrations/local#localprojectleasestatus-type-alias)                        | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalProviderOptions](/docs/api/integrations/local#localprovideroptions-interface)                               | Type  | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [localRealtime](/docs/api/integrations/local#localrealtime)                                                       | Value | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [LocalRealtimeAdapter](/docs/api/integrations/local#localrealtimeadapter-type-alias)                              | Type  | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [localResourceLabels](/docs/api/integrations/local#localresourcelabels)                                           | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [localResourceName](/docs/api/integrations/local#localresourcename)                                               | Value | `@relkit/local/runtime` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/integration/local-docker-composite.test.ts#L38) |
| [LocalServiceBindingState](/docs/api/integrations/local#localservicebindingstate-interface)                       | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicebindingstate-interface)                                     |
| [LocalServiceBindMount](/docs/api/integrations/local#localservicebindmount-interface)                             | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicebindmount-interface)                                        |
| [LocalServiceGeneratedSecret](/docs/api/integrations/local#localservicegeneratedsecret-interface)                 | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicegeneratedsecret-interface)                                  |
| [LocalServiceHealthCheck](/docs/api/integrations/local#localservicehealthcheck-interface)                         | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicehealthcheck-interface)                                      |
| [LocalServiceInstance](/docs/api/integrations/local#localserviceinstance-interface)                               | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localserviceinstance-interface)                                         |
| [LocalServiceLiteralEnvironment](/docs/api/integrations/local#localserviceliteralenvironment-interface)           | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localserviceliteralenvironment-interface)                               |
| [LocalServiceMaterializerMetadata](/docs/api/integrations/local#localservicematerializermetadata-interface)       | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicematerializermetadata-interface)                             |
| [LocalServiceMaterializerRuntime](/docs/api/integrations/local#localservicematerializerruntime-interface)         | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicematerializerruntime-interface)                              |
| [LocalServiceOperation](/docs/api/integrations/local#localserviceoperation-type-alias)                            | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localserviceoperation-type-alias)                                       |
| [LocalServicePhase](/docs/api/integrations/local#localservicephase-type-alias)                                    | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicephase-type-alias)                                           |
| [LocalServicePlan](/docs/api/integrations/local#localserviceplan-interface)                                       | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localserviceplan-interface)                                             |
| [LocalServicePlanEntry](/docs/api/integrations/local#localserviceplanentry-interface)                             | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localserviceplanentry-interface)                                        |
| [LocalServiceRecipe](/docs/api/integrations/local#localservicerecipe-interface)                                   | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicerecipe-interface)                                           |
| [LocalServiceRecipeInput](/docs/api/integrations/local#localservicerecipeinput-type-alias)                        | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicerecipeinput-type-alias)                                     |
| [LocalServiceRecipeMap](/docs/api/integrations/local#localservicerecipemap-type-alias)                            | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalServiceRecipeOutputContext](/docs/api/integrations/local#localservicerecipeoutputcontext-interface)         | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicerecipeoutputcontext-interface)                              |
| [LocalServiceReconciler](/docs/api/integrations/local#localservicereconciler-interface)                           | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalServiceReconcileRequest](/docs/api/integrations/local#localservicereconcilerequest-interface)               | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalServiceReconcileResult](/docs/api/integrations/local#localservicereconcileresult-interface)                 | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalServiceReconcilerOptions](/docs/api/integrations/local#localservicereconcileroptions-interface)             | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalServiceSecretBinding](/docs/api/integrations/local#localservicesecretbinding-interface)                     | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalServiceSecretEnvironment](/docs/api/integrations/local#localservicesecretenvironment-interface)             | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicesecretenvironment-interface)                                |
| [LocalServiceSecretState](/docs/api/integrations/local#localservicesecretstate-interface)                         | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalServiceStartRequest](/docs/api/integrations/local#localservicestartrequest-interface)                       | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicestartrequest-interface)                                     |
| [LocalServiceState](/docs/api/integrations/local#localservicestate-interface)                                     | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicestate-interface)                                            |
| [LocalServiceTelemetry](/docs/api/integrations/local#localservicetelemetry-class)                                 | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicetelemetry-class)                                            |
| [LocalServiceTelemetryLive](/docs/api/integrations/local#localservicetelemetrylive)                               | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicetelemetrylive)                                              |
| [LocalServiceTelemetryService](/docs/api/integrations/local#localservicetelemetryservice-interface)               | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicetelemetryservice-interface)                                 |
| [LocalServiceValidationFailure](/docs/api/integrations/local#localservicevalidationfailure-class)                 | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicevalidationfailure-class)                                    |
| [LocalServiceVersionError](/docs/api/integrations/local#localserviceversionerror-class)                           | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#localserviceversionerror-class)                                         |
| [LocalServiceVersionErrorCode](/docs/api/integrations/local#localserviceversionerrorcode-type-alias)              | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localserviceversionerrorcode-type-alias)                                |
| [LocalServiceVersionFailure](/docs/api/integrations/local#localserviceversionfailure-class)                       | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#localserviceversionfailure-class)                                       |
| [LocalServiceVolume](/docs/api/integrations/local#localservicevolume-interface)                                   | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localservicevolume-interface)                                           |
| [LocalServiceWorkerArtifact](/docs/api/integrations/local#localserviceworkerartifact-interface)                   | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#localserviceworkerartifact-interface)                                   |
| [localStateDirectory](/docs/api/integrations/local#localstatedirectory)                                           | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalStateError](/docs/api/integrations/local#localstateerror-class)                                             | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [LocalStateFileName](/docs/api/integrations/local#localstatefilename-type-alias)                                  | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [NormalizedLocalServiceRecipe](/docs/api/integrations/local#normalizedlocalservicerecipe-interface)               | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#normalizedlocalservicerecipe-interface)                                 |
| [NormalizedLocalServiceUnit](/docs/api/integrations/local#normalizedlocalserviceunit-interface)                   | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#normalizedlocalserviceunit-interface)                                   |
| [normalizeLocalServiceRecipe](/docs/api/integrations/local#normalizelocalservicerecipe)                           | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#normalizelocalservicerecipe)                                            |
| [normalizeLocalServiceRecipeEffect](/docs/api/integrations/local#normalizelocalservicerecipeeffect)               | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#normalizelocalservicerecipeeffect)                                      |
| [PROVIDER_OVERRIDE_STATE_FILE](/docs/api/integrations/local#provider_override_state_file)                         | Value | `@relkit/local`         | [Module example](/docs/modules/integrations)                                                                       |
| [PROVIDER_OVERRIDE_STATE_VERSION](/docs/api/integrations/local#provider_override_state_version)                   | Value | `@relkit/local`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/contracts/version-cohort.test.ts#L33)           |
| [ProviderOverrideBinding](/docs/api/integrations/local#provideroverridebinding-interface)                         | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#provideroverridebinding-interface)                                      |
| [providerOverrideBindingValues](/docs/api/integrations/local#provideroverridebindingvalues)                       | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#provideroverridebindingvalues)                                          |
| [providerOverrideBindingValuesEffect](/docs/api/integrations/local#provideroverridebindingvalueseffect)           | Value | `@relkit/local`         | [API example](/docs/api/integrations/local#provideroverridebindingvalueseffect)                                    |
| [ProviderOverrideError](/docs/api/integrations/local#provideroverrideerror-class)                                 | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [ProviderOverrideExpectation](/docs/api/integrations/local#provideroverrideexpectation-interface)                 | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#provideroverrideexpectation-interface)                                  |
| [ProviderOverrideState](/docs/api/integrations/local#provideroverridestate-interface)                             | Type  | `@relkit/local`         | [API example](/docs/api/integrations/local#provideroverridestate-interface)                                        |
| [ProviderOverrideSummary](/docs/api/integrations/local#provideroverridesummary-interface)                         | Type  | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [readLocalProjectLease](/docs/api/integrations/local#readlocalprojectlease)                                       | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [readLocalServiceSecrets](/docs/api/integrations/local#readlocalservicesecrets)                                   | Value | `@relkit/local/runtime` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/integration/local-docker-composite.test.ts#L77) |
| [readLocalServiceState](/docs/api/integrations/local#readlocalservicestate)                                       | Value | `@relkit/local/runtime` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/integration/local-docker-services.test.ts#L133) |
| [readLocalStateText](/docs/api/integrations/local#readlocalstatetext)                                             | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [readProviderOverrides](/docs/api/integrations/local#readprovideroverrides)                                       | Value | `@relkit/local/runtime` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/integration/local-docker-composite.test.ts#L68) |
| [removeLocalServiceState](/docs/api/integrations/local#removelocalservicestate)                                   | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [removeLocalStateFile](/docs/api/integrations/local#removelocalstatefile)                                         | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [removeProviderOverrides](/docs/api/integrations/local#removeprovideroverrides)                                   | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [runtimeIntegration](/docs/api/integrations/local#runtimeintegration)                                             | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [serviceInstanceIds](/docs/api/integrations/local#serviceinstanceids-1)                                           | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [summarizeProviderOverrides](/docs/api/integrations/local#summarizeprovideroverrides)                             | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [upsertLocalServiceSecrets](/docs/api/integrations/local#upsertlocalservicesecrets)                               | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [withLocalStateTemporaryFile](/docs/api/integrations/local#withlocalstatetemporaryfile)                           | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [writeLocalServiceState](/docs/api/integrations/local#writelocalservicestate)                                     | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [writeLocalStateText](/docs/api/integrations/local#writelocalstatetext)                                           | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |
| [writeProviderOverrides](/docs/api/integrations/local#writeprovideroverrides)                                     | Value | `@relkit/local/runtime` | [Module example](/docs/modules/integrations)                                                                       |

## `index.ts`

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

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

**Signature**

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

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

### "@relkit/local-service" (namespace export)

Re-exports all named exports from the "@relkit/local-service" module.

**Signature**

```ts
export * from "@relkit/local-service";
```

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

## `providers.ts`

### localEvent

Defines the durable filesystem event provider used by local development.

**Example**

```ts
import { localEvent } from "@relkit/local";
const events = localEvent();
```

**Signature**

```ts
declare const localEvent: (options?: LocalProviderOptions) => LocalEventAdapter;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/providers.ts#L42)

Since v0.4.0

### localJob

Defines the durable filesystem queue provider for unscheduled local jobs.

**Example**

```ts
import { localJob } from "@relkit/local";
const jobs = localJob();
```

**Signature**

```ts
declare const localJob: (options?: LocalProviderOptions) => LocalJobAdapter;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/providers.ts#L57)

Since v0.4.0

### LocalAgentStateAdapter (type alias)

**Signature**

```ts
type LocalAgentStateAdapter = ProviderAdapter<typeof agentState, "local-agent-state">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/providers.ts#L29)

### LocalEventAdapter (type alias)

**Signature**

```ts
type LocalEventAdapter = ProviderAdapter<typeof event, "local-event">;
```

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

### LocalJobAdapter (type alias)

**Signature**

```ts
type LocalJobAdapter = ProviderAdapter<typeof job, "local-job">;
```

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

### LocalProviderOptions (interface)

**Signature**

```ts
export interface LocalProviderOptions {
  readonly root?: string;
}
```

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

### LocalRealtimeAdapter (type alias)

**Signature**

```ts
type LocalRealtimeAdapter = ProviderAdapter<typeof realtime, "local-realtime">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/providers.ts#L28)

### localAgentState

**Signature**

```ts
declare const localAgentState: (options?: LocalProviderOptions) => LocalAgentStateAdapter;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/providers.ts#L65)

### localRealtime

**Signature**

```ts
declare const localRealtime: (options?: LocalProviderOptions) => LocalRealtimeAdapter;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/providers.ts#L61)

## `identity.ts`

### LOCAL_RESOURCE_LABEL

**Signature**

```ts
declare const LOCAL_RESOURCE_LABEL: Readonly<{
  readonly managed: "dev.relkit.managed";
  readonly applicationId: "dev.relkit.application-id";
  readonly localProjectId: "dev.relkit.local-project-id";
  readonly bindingId: "dev.relkit.binding-id";
  readonly environment: "dev.relkit.environment";
  readonly serviceGeneration: "dev.relkit.service-generation";
  readonly unitId: "dev.relkit.unit-id";
  readonly unitKind: "dev.relkit.unit-kind";
  readonly recipeId: "dev.relkit.recipe-id";
  readonly planHash: "dev.relkit.plan-hash";
  readonly endpointHash: "dev.relkit.endpoint-hash";
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/identity.ts#L5)

### LocalProjectIdentity (interface)

**Signature**

```ts
export interface LocalProjectIdentity {
  readonly applicationId: string;
  readonly projectRoot: string;
  readonly localProjectId: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/identity.ts#L19)

### createLocalProjectIdentity

**Signature**

```ts
declare const createLocalProjectIdentity: (
  requestedRoot: string,
  applicationId: string,
) => LocalProjectIdentity;
```

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

### localEndpointHash

**Signature**

```ts
declare const localEndpointHash: (
  endpoints: Readonly<Record<string, string>> | undefined,
) => string | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/identity.ts#L105)

### localProjectLabels

**Signature**

```ts
declare const localProjectLabels: (
  identity: LocalProjectIdentity,
) => Readonly<Record<string, string>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/identity.ts#L58)

### localResourceLabels

**Signature**

```ts
declare const localResourceLabels: (
  identity: LocalProjectIdentity,
  resource: LocalResourceIdentity,
) => Readonly<Record<string, string>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/identity.ts#L69)

### localResourceName

**Signature**

```ts
declare const localResourceName: (
  identity: LocalProjectIdentity,
  bindingId: string,
  suffix?: string,
) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/identity.ts#L113)

## `index.ts`

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

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

**Signature**

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

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

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

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

**Signature**

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

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

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

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

**Signature**

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

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/index.ts#L3)

### "./local-secrets.js" (namespace export)

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

**Signature**

```ts
export * from "./local-secrets.js";
```

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

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

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

**Signature**

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

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

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

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

**Signature**

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

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

### "./service-state.js" (namespace export)

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

**Signature**

```ts
export * from "./service-state.js";
```

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

### "./state-paths.js" (namespace export)

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

**Signature**

```ts
export * from "./state-paths.js";
```

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

### groupServiceInstances

**Signature**

```ts
declare const groupServiceInstances: (
  instances: readonly LocalServiceInstance[],
) => readonly LocalServiceInstance[];
```

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

### serviceInstanceIds

**Signature**

```ts
declare const serviceInstanceIds: (instance: LocalServiceInstance) => readonly string[];
```

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

## `integration.ts`

### runtimeIntegration

**Signature**

```ts
declare const runtimeIntegration: RuntimeProviderIntegration<"local">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/integration.ts#L10)

## `lease-files.ts`

### LeasePaths (interface)

**Signature**

```ts
export interface LeasePaths {
  readonly directory: string;
  readonly lock: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-files.ts#L25)

### ensureLeaseDirectory

**Signature**

```ts
declare const ensureLeaseDirectory: (identity: LocalProjectIdentity) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-files.ts#L35)

### leasePaths

**Signature**

```ts
declare const leasePaths: (identity: LocalProjectIdentity) => LeasePaths;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-files.ts#L30)

### readLease

**Signature**

```ts
declare const readLease: (identity: LocalProjectIdentity) => LocalProjectLease | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-files.ts#L39)

### withLeaseLock

**Signature**

```ts
declare const withLeaseLock: <Value>(
  identity: LocalProjectIdentity,
  paths: LeasePaths,
  isProcessAlive: (pid: number) => boolean,
  operation: () => Value,
) => Value;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-files.ts#L68)

### writeLease

**Signature**

```ts
declare const writeLease: (identity: LocalProjectIdentity, lease: LocalProjectLease) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-files.ts#L64)

## `lease-types.ts`

### AcquireLocalProjectLeaseOptions (interface)

**Signature**

```ts
export interface AcquireLocalProjectLeaseOptions {
  readonly mode: LocalProjectLeaseMode;
  readonly sessionId: string;
  readonly pid?: number;
  readonly now?: () => Date;
  readonly isProcessAlive?: (pid: number) => boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-types.ts#L16)

### LOCAL_PROJECT_LEASE_VERSION

**Signature**

```ts
declare const LOCAL_PROJECT_LEASE_VERSION: 1;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-types.ts#L1)

### LocalProjectLease (interface)

**Signature**

```ts
export interface LocalProjectLease {
  readonly version: typeof LOCAL_PROJECT_LEASE_VERSION;
  readonly localProjectId: string;
  readonly mode: LocalProjectLeaseMode;
  readonly sessionId: string;
  readonly generationId: string;
  readonly createdAt: string;
  readonly ownerPid?: number;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-types.ts#L6)

### LocalProjectLeaseError (class)

**Signature**

```ts
declare class LocalProjectLeaseError { constructor(
    readonly code: LocalProjectLeaseErrorCode,
    message: string,
    readonly owner?: LocalProjectLease,
  ) }
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-types.ts#L33)

### LocalProjectLeaseErrorCode (type alias)

**Signature**

```ts
type LocalProjectLeaseErrorCode =
  "RELKIT_LOCAL_LEASE_HELD" | "RELKIT_LOCAL_LEASE_BUSY" | "RELKIT_LOCAL_LEASE_INVALID";
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-types.ts#L30)

### LocalProjectLeaseHandle (interface)

**Signature**

```ts
export interface LocalProjectLeaseHandle {
  readonly lease: LocalProjectLease;
  readonly status: LocalProjectLeaseStatus;
  readonly release: () => void;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-types.ts#L24)

### LocalProjectLeaseMode (type alias)

**Signature**

```ts
type LocalProjectLeaseMode = "attached" | "detached";
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-types.ts#L3)

### LocalProjectLeaseStatus (type alias)

**Signature**

```ts
type LocalProjectLeaseStatus = "acquired" | "adopted" | "recovered";
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease-types.ts#L4)

## `lease.ts`

### "./lease-types.js" (namespace export)

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

**Signature**

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

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease.ts#L21)

### acquireLocalProjectLease

**Signature**

```ts
declare const acquireLocalProjectLease: (
  identity: LocalProjectIdentity,
  options: AcquireLocalProjectLeaseOptions,
) => LocalProjectLeaseHandle;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease.ts#L23)

### readLocalProjectLease

**Signature**

```ts
declare const readLocalProjectLease: (
  identity: LocalProjectIdentity,
) => LocalProjectLease | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/lease.ts#L64)

## `local-secrets.ts`

### LOCAL_SERVICE_SECRETS_FILE

**Signature**

```ts
declare const LOCAL_SERVICE_SECRETS_FILE: "local-secrets.json";
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/local-secrets.ts#L5)

### LocalServiceSecretBinding (interface)

**Signature**

```ts
export interface LocalServiceSecretBinding {
  readonly bindingId: string;
  readonly recipe: Readonly<{
    readonly integrationId: string;
    readonly recipeId: string;
    readonly recipeVersion: number;
  }>;
  readonly values: Readonly<Record<string, string>>;
}
```

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

### LocalServiceSecretState (interface)

**Signature**

```ts
export interface LocalServiceSecretState {
  readonly version: typeof LOCAL_SERVICE_SECRETS_VERSION;
  readonly applicationId: string;
  readonly localProjectId: string;
  readonly bindings: readonly LocalServiceSecretBinding[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/local-secrets.ts#L18)

### readLocalServiceSecrets

**Signature**

```ts
declare const readLocalServiceSecrets: (
  identity: LocalProjectIdentity,
) => LocalServiceSecretState | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/local-secrets.ts#L25)

### upsertLocalServiceSecrets

**Signature**

```ts
declare const upsertLocalServiceSecrets: (
  identity: LocalProjectIdentity,
  current: LocalServiceSecretState | undefined,
  bindingId: string,
  recipe: LocalServiceSecretBinding["recipe"],
  values: Readonly<Record<string, string>>,
) => LocalServiceSecretState;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/local-secrets.ts#L50)

## `provider-overrides.ts`

### ProviderOverrideError (class)

**Signature**

```ts
declare class ProviderOverrideError { constructor(readonly code: "RELKIT_LOCAL_OVERRIDE_INVALID" | "RELKIT_LOCAL_OVERRIDE_STALE") }
```

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

### ProviderOverrideSummary (interface)

**Signature**

```ts
export interface ProviderOverrideSummary {
  readonly generationId: string;
  readonly planHash: string;
  readonly bindingIds: readonly string[];
}
```

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

### readProviderOverrides

**Signature**

```ts
declare const readProviderOverrides: (
  identity: LocalProjectIdentity,
  expectedPlanHash?: string,
) => ProviderOverrideState | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/provider-overrides.ts#L48)

### removeProviderOverrides

**Signature**

```ts
declare const removeProviderOverrides: (identity: LocalProjectIdentity) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/provider-overrides.ts#L80)

### summarizeProviderOverrides

**Signature**

```ts
declare const summarizeProviderOverrides: (state: ProviderOverrideState) => ProviderOverrideSummary;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/provider-overrides.ts#L76)

### writeProviderOverrides

**Signature**

```ts
declare const writeProviderOverrides: (
  identity: LocalProjectIdentity,
  planHash: string,
  bindings: readonly ProviderOverrideBinding[],
) => ProviderOverrideSummary;
```

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

## `reconciler-environment.ts`

### environmentFile

**Signature**

```ts
declare const environmentFile: (
  recipe: LocalServiceRecipeInput,
  secrets: Readonly<Record<string, string>>,
) => string | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-environment.ts#L3)

### environmentFiles

**Signature**

```ts
declare const environmentFiles: (
  recipe: LocalServiceRecipeInput,
  secrets: Readonly<Record<string, string>>,
) => Readonly<Record<string, string>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-environment.ts#L22)

## `reconciler-generation.ts`

### assertHotSwapSafe

Refuses an unsafe source-generation swap while an older service is owned.

**Signature**

```ts
declare const assertHotSwapSafe: (
  bindingId: string,
  instances: readonly LocalServiceInstance[],
  environment: string | undefined,
  serviceGeneration: string | undefined,
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-generation.ts#L5)

## `reconciler-lifecycle.ts`

### aborted

**Signature**

```ts
declare const aborted: (signal: AbortSignal | undefined) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-lifecycle.ts#L140)

### frozenResult

**Signature**

```ts
declare const frozenResult: (
  overrides: ProviderOverrideSummary,
  state: LocalServiceState,
  reused: readonly string[],
  started: readonly string[],
  removed: readonly string[],
) => LocalServiceReconcileResult;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-lifecycle.ts#L144)

### startService

**Signature**

```ts
declare const startService: (
  options: LocalServiceReconcilerOptions,
  entry: LocalServicePlanEntry,
  recipe: LocalServiceRecipeInput,
  labels: Readonly<Record<string, string>>,
  secrets: Readonly<Record<string, string>>,
  signal?: AbortSignal,
  environmentVariables?: Readonly<Record<string, string>>,
  workerArtifact?: LocalServiceWorkerArtifact,
  environmentVariablesByUnit?: Readonly<Record<string, Readonly<Record<string, string>>>>,
  portBindings?: Readonly<Record<string, Readonly<Record<string, number>>>>,
) => Promise<LocalServiceInstance>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-lifecycle.ts#L21)

### writeFailureState

**Signature**

```ts
declare const writeFailureState: (
  options: LocalServiceReconcilerOptions,
  request: LocalServiceReconcileRequest,
  active: LocalServicePlanEntry | undefined,
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-lifecycle.ts#L117)

## `reconciler-operation-finalize.ts`

### finalizeReconcile

**Signature**

```ts
declare const finalizeReconcile: (
  options: LocalServiceReconcilerOptions,
  request: LocalServiceReconcileRequest,
  desired: readonly LocalServicePlanEntry[],
  previous: ProviderOverrideState | undefined,
  next: Map<string, TrackedService>,
  tracked: Map<string, TrackedService>,
  signatures: Map<string, string>,
  bindings: { bindingId: string; values: Readonly<Record<string, JsonValue>> }[],
  reused: string[],
  started: string[],
  removed: string[],
) => Promise<LocalServiceReconcileResult>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-operation-finalize.ts#L14)

## `reconciler-operation-run.ts`

### runReconcileOperation

**Signature**

```ts
declare const runReconcileOperation: (
  options: LocalServiceReconcilerOptions,
  projectLabels: Readonly<Record<string, string>>,
  tracked: Map<string, TrackedService>,
  signatures: Map<string, string>,
  isClosed: () => boolean,
  request: LocalServiceReconcileRequest,
) => Promise<LocalServiceReconcileResult>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-operation-run.ts#L34)

## `reconciler-operation-service.ts`

### ensureServiceInstance

**Signature**

```ts
declare const ensureServiceInstance: (
  options: LocalServiceReconcilerOptions,
  request: LocalServiceReconcileRequest,
  entry: LocalServicePlanEntry,
  recipe: LocalServiceRecipeInput,
  labels: Readonly<Record<string, string>>,
  secrets: Readonly<Record<string, string>>,
  candidates: readonly LocalServiceInstance[],
  existing: LocalServiceInstance | undefined,
  keepCandidates: boolean,
  startedIds: string[],
  started: string[],
  reused: string[],
  removed: string[],
) => Promise<LocalServiceInstance>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-operation-service.ts#L36)

### keepServiceCandidates

**Signature**

```ts
declare const keepServiceCandidates: (
  recipe: NormalizedLocalServiceRecipe,
  candidates: readonly LocalServiceInstance[],
  request: LocalServiceReconcileRequest,
  bindingId: string,
) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-operation-service.ts#L17)

## `reconciler-operation.ts`

### TrackedService (interface)

**Signature**

```ts
export interface TrackedService {
  readonly instance: LocalServiceInstance;
  readonly signature: string;
  readonly secrets: Readonly<Record<string, string>>;
  readonly owned: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-operation.ts#L8)

### createReconcileOperation

**Signature**

```ts
declare const createReconcileOperation: (
  options: LocalServiceReconcilerOptions,
  projectLabels: Readonly<Record<string, string>>,
  tracked: Map<string, TrackedService>,
  signatures: Map<string, string>,
  isClosed: () => boolean,
) => (request: LocalServiceReconcileRequest) => Promise<LocalServiceReconcileResult>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-operation.ts#L15)

## `reconciler-queue.ts`

### ReconcileQueue (interface)

**Signature**

```ts
export interface ReconcileQueue {
  readonly enqueue: (request: LocalServiceReconcileRequest) => Promise<LocalServiceReconcileResult>;
  readonly wait: () => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-queue.ts#L6)

### createReconcileQueue

**Signature**

```ts
declare const createReconcileQueue: (
  reconcile: (request: LocalServiceReconcileRequest) => Promise<LocalServiceReconcileResult>,
) => ReconcileQueue;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-queue.ts#L11)

## `reconciler-resource.ts`

### removeInstance

**Signature**

```ts
declare const removeInstance: (
  options: LocalServiceReconcilerOptions,
  instance: LocalServiceInstance,
  signal?: AbortSignal,
) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-resource.ts#L5)

## `reconciler-support-validation.ts`

### completeUnits

**Signature**

```ts
declare const completeUnits: (
  instance: LocalServiceInstance,
  expectedUnitIds: readonly string[],
) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support-validation.ts#L4)

### hash

**Signature**

```ts
declare const hash: (value: unknown) => value is string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support-validation.ts#L29)

### invalid

**Signature**

```ts
declare const invalid: () => never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support-validation.ts#L33)

### sameBindings

**Signature**

```ts
declare const sameBindings: (
  previous: ProviderOverrideState | undefined,
  planHash: string,
  bindings: readonly {
    readonly bindingId: string;
    readonly values: Readonly<Record<string, JsonValue>>;
  }[],
) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support-validation.ts#L16)

## `reconciler-support.ts`

### compatible

**Signature**

```ts
declare const compatible: (
  instance: LocalServiceInstance,
  expectedRecipe: string,
  planHash: string,
  priorSignature: string | undefined,
  signature: string,
  environment?: string,
  serviceGeneration?: string,
  expectedUnitIds?: readonly string[],
  endpointHash?: string,
) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support.ts#L176)

### createSecrets

**Signature**

```ts
declare const createSecrets: (recipe: LocalServiceRecipeInput) => Readonly<Record<string, string>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support.ts#L82)

### desiredServices

**Signature**

```ts
declare const desiredServices: (
  request: LocalServiceReconcileRequest,
) => readonly LocalServicePlanEntry[];
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support.ts#L18)

### generatedSecrets

**Signature**

```ts
declare const generatedSecrets: (
  recipe: LocalServiceRecipeInput,
  previous: ProviderOverrideState | undefined,
  bindingId: string,
  retained?: Readonly<Record<string, string>>,
  persisted?: Readonly<Record<string, string>>,
) => Readonly<Record<string, string>> | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support.ts#L63)

### groupServiceInstances

**Signature**

```ts
declare const groupServiceInstances: (
  instances: readonly LocalServiceInstance[],
) => readonly LocalServiceInstance[];
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support.ts#L124)

### outputPorts

**Signature**

```ts
declare const outputPorts: (
  recipe: LocalServiceRecipeInput,
  instance: LocalServiceInstance,
) => Readonly<Record<string, number>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support.ts#L95)

### recipeFor

**Signature**

```ts
declare const recipeFor: (
  entry: LocalServicePlanEntry,
  recipes: Readonly<Record<string, LocalServiceRecipeInput>>,
  materializerId: string,
) => LocalServiceRecipeInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support.ts#L34)

### sameBindings

**Signature**

```ts
declare const sameBindings: (
  previous: ProviderOverrideState | undefined,
  planHash: string,
  bindings: readonly {
    readonly bindingId: string;
    readonly values: Readonly<Record<string, JsonValue>>;
  }[],
) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support.ts#L16)

### serviceInstanceIds

**Signature**

```ts
declare const serviceInstanceIds: (instance: LocalServiceInstance) => readonly string[];
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support.ts#L168)

### serviceSignature

**Signature**

```ts
declare const serviceSignature: (entry: LocalServicePlanEntry) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-support.ts#L55)

## `reconciler-types.ts`

### LocalServiceRecipeMap (type alias)

**Signature**

```ts
type LocalServiceRecipeMap = Readonly<Record<string, LocalServiceRecipeInput>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-types.ts#L11)

### LocalServiceReconcileRequest (interface)

**Signature**

```ts
export interface LocalServiceReconcileRequest {
  readonly plan: LocalServicePlan;
  readonly planHash: string;
  readonly recipes: LocalServiceRecipeMap;
  readonly scope: "required" | "all";
  readonly environment?: string;
  readonly serviceGeneration?: string;
  readonly serviceGenerations?: Readonly<Record<string, string>>;
  readonly endpoints?: Readonly<Record<string, Readonly<Record<string, string>>>>;
  readonly environmentOverrides?: Readonly<Record<string, Readonly<Record<string, string>>>>;
  readonly environmentOverridesByUnit?: Readonly<
    Record<string, Readonly<Record<string, Readonly<Record<string, string>>>>>
  >;
  readonly workerArtifacts?: Readonly<Record<string, LocalServiceWorkerArtifact>>;
  readonly signal?: AbortSignal;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-types.ts#L13)

### LocalServiceReconcileResult (interface)

**Signature**

```ts
export interface LocalServiceReconcileResult {
  readonly overrides: ProviderOverrideSummary;
  readonly state: LocalServiceState;
  readonly reused: readonly string[];
  readonly started: readonly string[];
  readonly removed: readonly string[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-types.ts#L30)

### LocalServiceReconciler (interface)

**Signature**

```ts
export interface LocalServiceReconciler {
  readonly reconcile: (
    request: LocalServiceReconcileRequest,
  ) => Promise<LocalServiceReconcileResult>;
  readonly close: () => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-types.ts#L44)

### LocalServiceReconcilerOptions (interface)

**Signature**

```ts
export interface LocalServiceReconcilerOptions {
  readonly identity: LocalProjectIdentity;
  readonly materializer: LocalServiceMaterializerRuntime;
  readonly preserveOnClose?: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-types.ts#L38)

## `reconciler-worker.ts`

### WorkerStartOptions (interface)

**Signature**

```ts
export interface WorkerStartOptions {
  readonly bindMounts?: Readonly<Record<string, readonly LocalServiceBindMount[]>>;
  readonly environmentVariablesByUnit?: Readonly<Record<string, Readonly<Record<string, string>>>>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-worker.ts#L8)

### workerStartOptions

**Signature**

```ts
declare const workerStartOptions: (
  recipe: NormalizedLocalServiceRecipe,
  artifact: LocalServiceWorkerArtifact | undefined,
) => WorkerStartOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler-worker.ts#L13)

## `reconciler.ts`

### "./reconciler-types.js" (namespace export)

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

**Signature**

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

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler.ts#L9)

### createLocalServiceReconciler

**Signature**

```ts
declare const createLocalServiceReconciler: (
  options: LocalServiceReconcilerOptions,
) => LocalServiceReconciler;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/reconciler.ts#L11)

## `service-state.ts`

### readLocalServiceState

**Signature**

```ts
declare const readLocalServiceState: (
  identity: LocalProjectIdentity,
) => LocalServiceState | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/service-state.ts#L28)

### removeLocalServiceState

**Signature**

```ts
declare const removeLocalServiceState: (identity: LocalProjectIdentity) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/service-state.ts#L55)

### writeLocalServiceState

**Signature**

```ts
declare const writeLocalServiceState: (
  identity: LocalProjectIdentity,
  planHash: string,
  services: readonly LocalServiceBindingState[],
) => LocalServiceState;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/service-state.ts#L11)

## `state-paths.ts`

### LocalStateError (class)

**Signature**

```ts
declare class LocalStateError {
  constructor();
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/state-paths.ts#L26)

### code (property)

**Signature**

```ts
readonly code: "RELKIT_LOCAL_STATE_INVALID"
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/state-paths.ts#L27)

### LocalStateFileName (type alias)

**Signature**

```ts
type LocalStateFileName =
  | "lease.json"
  | "local-services.state.json"
  | "provider-overrides.json"
  | "worker-provider-overrides.json"
  | "local-secrets.json";
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/state-paths.ts#L19)

### ensureLocalStateDirectory

**Signature**

```ts
declare const ensureLocalStateDirectory: (identity: LocalProjectIdentity) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/state-paths.ts#L48)

### localStateDirectory

**Signature**

```ts
declare const localStateDirectory: (identity: LocalProjectIdentity) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/state-paths.ts#L35)

### readLocalStateText

**Signature**

```ts
declare const readLocalStateText: (
  identity: LocalProjectIdentity,
  name: LocalStateFileName,
) => string | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/state-paths.ts#L58)

### removeLocalStateFile

**Signature**

```ts
declare const removeLocalStateFile: (
  identity: LocalProjectIdentity,
  name: LocalStateFileName,
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/state-paths.ts#L100)

### withLocalStateTemporaryFile

**Signature**

```ts
declare const withLocalStateTemporaryFile: <Value>(
  identity: LocalProjectIdentity,
  value: string,
  operation: (path: string) => Promise<Value>,
) => Promise<Value>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/state-paths.ts#L113)

### writeLocalStateText

**Signature**

```ts
declare const writeLocalStateText: (
  identity: LocalProjectIdentity,
  name: LocalStateFileName,
  value: string,
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/local/src/runtime/state-paths.ts#L72)

## `local-service-errors.ts`

### LocalServiceValidationFailure (class)

Expected validation failure in a local-service Effect operation.

**Example**

```ts
Effect.catchTag("LocalServiceValidationFailure", ({ message }) => Effect.logWarning(message));
```

**Signature**

```ts
declare class LocalServiceValidationFailure
```

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

### LocalServiceVersionError (class)

Legacy synchronous error for a stale local-service artifact.

**Example**

```ts
throw new LocalServiceVersionError(
  "RELKIT_LOCAL_SERVICE_PLAN_VERSION_UNSUPPORTED",
  "Local-service plan",
  0,
  1,
  "relkit check",
);
```

**Signature**

```ts
declare class LocalServiceVersionError { constructor(
    readonly code: LocalServiceVersionErrorCode,
    label: string,
    version: unknown,
    expected: number,
    command: string,
  ) }
```

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

### LocalServiceVersionFailure (class)

Expected unsupported artifact version in a local-service Effect operation.

**Example**

```ts
Effect.catchTag("LocalServiceVersionFailure", ({ code }) => Effect.logWarning(code));
```

**Signature**

```ts
declare class LocalServiceVersionFailure
```

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

## `local-service-observability.ts`

### LocalServiceTelemetry (class)

Substitutable telemetry service for local-service operations.

**Example**

```ts
Effect.provide(normalizeLocalServiceRecipeEffect(recipe), LocalServiceTelemetryLive);
```

**Signature**

```ts
declare class LocalServiceTelemetry
```

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

### LocalServiceTelemetryLive

Live operation spans and metrics.

**Example**

```ts
Effect.runSync(
  Effect.provide(normalizeLocalServiceRecipeEffect(recipe), LocalServiceTelemetryLive),
);
```

**Signature**

```ts
declare const LocalServiceTelemetryLive: Layer.Layer<LocalServiceTelemetry, never, never>;
```

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

### observeLocalService

Observe one public operation using an injected or live telemetry service.

**Example**

```ts
observeLocalService("recipe.normalize", Effect.succeed(recipe));
```

**Signature**

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

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

### runLocalService

Run a synchronous compatibility adapter and restore legacy errors.

**Throws**

TypeError or LocalServiceVersionError for expected failures; defects propagate.

**Example**

```ts
runLocalService(Effect.succeed("ready"));
```

**Signature**

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

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

## `local-service-observability.types.ts`

### LocalServiceOperation (type alias)

Fixed operation names keep metric dimensions bounded.

**Example**

```ts
const operation: LocalServiceOperation = "recipe.normalize";
```

**Signature**

```ts
type LocalServiceOperation =
  | "recipe.normalize"
  | "plan.assert-version"
  | "state.assert-version"
  | "override.assert-version"
  | "override.binding-values";
```

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

### LocalServiceTelemetryService (interface)

Injectable tracing and metric behavior for public operations.

**Example**

```ts
const telemetry: LocalServiceTelemetryService = { observe: (_operation, effect) => effect };
```

**Signature**

```ts
export interface LocalServiceTelemetryService {
  /** Observe an operation without changing its result.
   * @param operation - Fixed operation name.
   * @param effect - Operation to measure.
   * @returns The original Effect success and failure channels.
   * @example telemetry.observe("recipe.normalize", Effect.succeed(recipe));
   */
  readonly observe: <A, E, R>(
    operation: LocalServiceOperation,
    effect: Effect.Effect<A, E, R>,
  ) => Effect.Effect<A, E, R>;
}
```

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

## `protocol-version.ts`

### assertLocalServicePlanVersion

Assert a local-service plan version synchronously.

**Throws**

LocalServiceVersionError when the version differs.

**Example**

```ts
assertLocalServicePlanVersion({ version: 1 });
```

**Signature**

```ts
declare const assertLocalServicePlanVersion: (value: unknown) => asserts value is LocalServicePlan;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/protocol-version.ts#L108)

### assertLocalServicePlanVersionEffect

Check a local-service plan version in the Effect error channel.

**Example**

```ts
Effect.runSync(assertLocalServicePlanVersionEffect({ version: 1 }));
```

**Signature**

```ts
declare const assertLocalServicePlanVersionEffect: (
  value: unknown,
) => Effect.Effect<void, LocalServiceVersionFailure, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/protocol-version.ts#L47)

### assertLocalServiceStateVersion

Assert a local-service state version synchronously.

**Throws**

LocalServiceVersionError when the version differs.

**Example**

```ts
assertLocalServiceStateVersion({ version: 1 });
```

**Signature**

```ts
declare const assertLocalServiceStateVersion: (
  value: unknown,
) => asserts value is LocalServiceState;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/protocol-version.ts#L118)

### assertLocalServiceStateVersionEffect

Check a local-service state version in the Effect error channel.

**Example**

```ts
Effect.runSync(assertLocalServiceStateVersionEffect({ version: 1 }));
```

**Signature**

```ts
declare const assertLocalServiceStateVersionEffect: (
  value: unknown,
) => Effect.Effect<void, LocalServiceVersionFailure, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/protocol-version.ts#L67)

### assertProviderOverrideStateVersion

Assert a provider override version synchronously.

**Throws**

LocalServiceVersionError when the version differs.

**Example**

```ts
assertProviderOverrideStateVersion({ version: 1 });
```

**Signature**

```ts
declare const assertProviderOverrideStateVersion: (
  value: unknown,
) => asserts value is ProviderOverrideState;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/protocol-version.ts#L128)

### assertProviderOverrideStateVersionEffect

Check an override artifact version in the Effect error channel.

**Example**

```ts
Effect.runSync(assertProviderOverrideStateVersionEffect({ version: 1 }));
```

**Signature**

```ts
declare const assertProviderOverrideStateVersionEffect: (
  value: unknown,
) => Effect.Effect<void, LocalServiceVersionFailure, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/protocol-version.ts#L87)

### checkVersionEffect

Check one artifact version without starting a separate public operation span.

**Example**

```ts
Effect.runSync(
  checkVersionEffect(
    { version: 1 },
    1,
    "Local-service plan",
    "RELKIT_LOCAL_SERVICE_PLAN_VERSION_UNSUPPORTED",
    "relkit check",
  ),
);
```

**Signature**

```ts
declare const checkVersionEffect: (
  value: unknown,
  expected: number,
  label: string,
  code: LocalServiceVersionErrorCode,
  command: string,
) => Effect.Effect<undefined, LocalServiceVersionFailure, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/protocol-version.ts#L25)

## `protocol.ts`

Version and artifact names for the local-service protocol.

### LOCAL_SERVICE_PLAN_FILE

**Signature**

```ts
declare const LOCAL_SERVICE_PLAN_FILE: "local-services.plan.json";
```

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

### LOCAL_SERVICE_PLAN_VERSION

**Signature**

```ts
declare const LOCAL_SERVICE_PLAN_VERSION: 1;
```

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

### LOCAL_SERVICE_PROTOCOL_VERSION

Version and artifact names for the local-service protocol.

**Signature**

```ts
declare const LOCAL_SERVICE_PROTOCOL_VERSION: 1;
```

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

### LOCAL_SERVICE_STATE_FILE

**Signature**

```ts
declare const LOCAL_SERVICE_STATE_FILE: "local-services.state.json";
```

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

### LOCAL_SERVICE_STATE_VERSION

**Signature**

```ts
declare const LOCAL_SERVICE_STATE_VERSION: 1;
```

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

### PROVIDER_OVERRIDE_STATE_FILE

**Signature**

```ts
declare const PROVIDER_OVERRIDE_STATE_FILE: "provider-overrides.json";
```

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

### PROVIDER_OVERRIDE_STATE_VERSION

**Signature**

```ts
declare const PROVIDER_OVERRIDE_STATE_VERSION: 1;
```

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

## `protocol.types.ts`

### LocalServiceBindingState (interface)

Observed state of one local binding.

**Example**

```ts
const phase: LocalServicePhase = binding.phase;
```

**Signature**

```ts
export interface LocalServiceBindingState {
  readonly bindingId: string;
  readonly recipe: ProviderLocalRecipeReference;
  readonly phase: LocalServicePhase;
  readonly environment?: string;
  readonly serviceGeneration?: string;
  readonly units?: readonly string[];
  readonly message?: string;
}
```

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

### LocalServiceMaterializerMetadata (interface)

Identity of a local materializer integration.

**Example**

```ts
const metadata: LocalServiceMaterializerMetadata = {
  kind: "local-service-materializer",
  protocolVersion: 1,
  integrationId: "docker",
};
```

**Signature**

```ts
export interface LocalServiceMaterializerMetadata<IntegrationId extends string = string> {
  readonly kind: "local-service-materializer";
  readonly protocolVersion: typeof LOCAL_SERVICE_PROTOCOL_VERSION;
  readonly integrationId: IntegrationId;
}
```

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

### LocalServicePhase (type alias)

Runtime lifecycle phase for one local binding.

**Example**

```ts
const phase: LocalServicePhase = "healthy";
```

**Signature**

```ts
type LocalServicePhase = "pending" | "starting" | "healthy" | "unhealthy" | "stopped";
```

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

### LocalServicePlan (interface)

Versioned local service plan.

**Example**

```ts
const entries: readonly LocalServicePlanEntry[] = plan.services;
```

**Signature**

```ts
export interface LocalServicePlan {
  readonly version: typeof LOCAL_SERVICE_PLAN_VERSION;
  readonly graphHash: string;
  readonly services: readonly LocalServicePlanEntry[];
}
```

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

### LocalServicePlanEntry (interface)

Planned local binding and its provider recipe.

**Example**

```ts
const entry = plan.services[0] as LocalServicePlanEntry;
```

**Signature**

```ts
export interface LocalServicePlanEntry {
  readonly bindingId: string;
  readonly capability: string;
  readonly profile: string;
  readonly materializerId: string;
  readonly recipe: ProviderLocalRecipeReference;
  readonly configuration: JsonValue;
  readonly requiredBy: readonly string[];
}
```

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

### LocalServiceState (interface)

Versioned state for all local bindings.

**Example**

```ts
const bindings: readonly LocalServiceBindingState[] = state.services;
```

**Signature**

```ts
export interface LocalServiceState {
  readonly version: typeof LOCAL_SERVICE_STATE_VERSION;
  readonly applicationId: string;
  readonly localProjectId: string;
  readonly planHash: string;
  readonly services: readonly LocalServiceBindingState[];
}
```

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

### LocalServiceVersionErrorCode (type alias)

Stable error codes for unsupported artifact versions.

**Example**

```ts
const code: LocalServiceVersionErrorCode = "RELKIT_LOCAL_SERVICE_PLAN_VERSION_UNSUPPORTED";
```

**Signature**

```ts
type LocalServiceVersionErrorCode =
  | "RELKIT_LOCAL_SERVICE_PLAN_VERSION_UNSUPPORTED"
  | "RELKIT_LOCAL_SERVICE_STATE_VERSION_UNSUPPORTED"
  | "RELKIT_PROVIDER_OVERRIDE_STATE_VERSION_UNSUPPORTED";
```

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

### ProviderOverrideBinding (interface)

Resolved override values for one provider binding.

**Example**

```ts
const url = binding.values.url;
```

**Signature**

```ts
export interface ProviderOverrideBinding {
  readonly bindingId: string;
  readonly values: Readonly<Record<string, JsonValue>>;
}
```

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

### ProviderOverrideExpectation (interface)

Expected activation identity for provider override lookup.

**Example**

```ts
const expected: ProviderOverrideExpectation = {
  applicationId: "demo",
  planHash,
  generationId: "generation-1",
};
```

**Signature**

```ts
export interface ProviderOverrideExpectation {
  readonly applicationId: string;
  readonly planHash: string;
  readonly generationId: string;
}
```

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

### ProviderOverrideState (interface)

Versioned override state bound to one activation.

**Example**

```ts
const bindings: readonly ProviderOverrideBinding[] = overrides.bindings;
```

**Signature**

```ts
export interface ProviderOverrideState {
  readonly version: typeof PROVIDER_OVERRIDE_STATE_VERSION;
  readonly applicationId: string;
  readonly localProjectId: string;
  readonly planHash: string;
  readonly generationId: string;
  readonly bindings: readonly ProviderOverrideBinding[];
}
```

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

## `provider-overrides.ts`

### providerOverrideBindingValues

Resolve provider overrides synchronously for existing callers.

**Throws**

LocalServiceVersionError or TypeError for an invalid artifact.

**Example**

```ts
providerOverrideBindingValues(artifact, expected);
```

**Signature**

```ts
declare const providerOverrideBindingValues: (
  value: unknown,
  expected: ProviderOverrideExpectation,
) => Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/provider-overrides.ts#L82)

### providerOverrideBindingValuesEffect

Resolve only the overrides belonging to one activation.

**Example**

```ts
Effect.runSync(providerOverrideBindingValuesEffect(artifact, expected));
```

**Signature**

```ts
declare const providerOverrideBindingValuesEffect: (
  value: unknown,
  expected: ProviderOverrideExpectation,
) => Effect.Effect<
  Record<string, Readonly<Record<string, JsonValue>>>,
  LocalServiceVersionFailure | LocalServiceValidationFailure,
  never
>;
```

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

## `recipe-normalize.ts`

### NormalizedLocalServiceRecipe

**Signature**

```ts
declare const NormalizedLocalServiceRecipe: NormalizedLocalServiceRecipe;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe-normalize.ts#L24)

### NormalizedLocalServiceUnit

**Signature**

```ts
declare const NormalizedLocalServiceUnit: NormalizedLocalServiceUnit;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe-normalize.ts#L25)

### normalizeLocalServiceRecipe

Normalize a recipe synchronously for existing callers.

**Throws**

TypeError when a recipe field or dependency is invalid.

**Example**

```ts
normalizeLocalServiceRecipe(recipe);
```

**Signature**

```ts
declare const normalizeLocalServiceRecipe: (
  recipe: LocalServiceRecipeInput,
) => NormalizedLocalServiceRecipe;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe-normalize.ts#L43)

### normalizeLocalServiceRecipeEffect

Normalize a supported recipe in the Effect error channel.

**Example**

```ts
Effect.runSync(normalizeLocalServiceRecipeEffect(recipe));
```

**Signature**

```ts
declare const normalizeLocalServiceRecipeEffect: (recipe: LocalServiceRecipeInput) => Effect.Effect<
  | Readonly<{
      initialize?: (context: LocalServiceRecipeOutputContext) => Promise<void>;
      kind: "local-service-recipe";
      protocolVersion: 1;
      integrationId: string;
      recipeId: string;
      recipeVersion: 1;
      materializerId: "docker";
      units: ReadonlyArray<NormalizedLocalServiceUnit>;
      volumes: Readonly<{ data?: never } | { data: { mountPath: string } }>;
      generatedSecrets: Readonly<{ [x: string]: LocalServiceGeneratedSecret }>;
      environment: Readonly<{ [x: string]: LocalServiceSecretEnvironment }>;
      ownership: Readonly<{ scope: "binding"; retainVolumes: true }>;
      outputs: (context: LocalServiceRecipeOutputContext) => Readonly<Record<string, JsonValue>>;
    }>
  | Readonly<{
      initialize?: (context: LocalServiceRecipeOutputContext) => Promise<void>;
      ownership: Readonly<{ scope: "binding" | "project"; retainVolumes: boolean }>;
      outputs: (context: LocalServiceRecipeOutputContext) => Readonly<Record<string, JsonValue>>;
      network?: Readonly<{ readonly internal?: boolean }>;
      kind: "local-service-recipe";
      protocolVersion: 2;
      integrationId: string;
      recipeId: string;
      recipeVersion: 2;
      materializerId: "docker";
      units: ReadonlyArray<NormalizedLocalServiceUnit>;
      volumes: Readonly<{ [x: string]: CompositeLocalServiceVolume }>;
      generatedSecrets: Readonly<{ [x: string]: LocalServiceGeneratedSecret }>;
      environment: Readonly<{
        [x: string]: LocalServiceSecretEnvironment | LocalServiceLiteralEnvironment;
      }>;
    }>,
  LocalServiceValidationFailure,
  never
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe-normalize.ts#L32)

## `recipe-normalize.types.ts`

### NormalizedLocalServiceRecipe (interface)

Canonical recipe used by local materializers.
Units are ordered by dependency and ID and the root collections are frozen.

**Example**

```ts
const normalized: NormalizedLocalServiceRecipe = normalizeLocalServiceRecipe(recipe);
```

**Signature**

```ts
export interface NormalizedLocalServiceRecipe {
  readonly kind: "local-service-recipe";
  readonly protocolVersion: 1 | typeof LOCAL_SERVICE_RECIPE_PROTOCOL_VERSION;
  readonly integrationId: string;
  readonly recipeId: string;
  readonly recipeVersion: number;
  readonly materializerId: "docker";
  readonly units: readonly NormalizedLocalServiceUnit[];
  readonly volumes: Readonly<Record<string, CompositeLocalServiceVolume>>;
  readonly generatedSecrets: Readonly<Record<string, LocalServiceGeneratedSecret>>;
  readonly environment: Readonly<
    Record<string, LocalServiceSecretEnvironment | LocalServiceLiteralEnvironment>
  >;
  readonly network?: Readonly<{ readonly internal?: boolean }>;
  readonly ownership: Readonly<{
    readonly scope: "project" | "binding";
    readonly retainVolumes: boolean;
  }>;
  readonly outputs: (
    context: LocalServiceRecipeOutputContext,
  ) => Readonly<Record<string, JsonValue>>;
  readonly initialize?: (context: LocalServiceRecipeOutputContext) => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe-normalize.types.ts#L27)

### NormalizedLocalServiceUnit (interface)

Validated unit with required frozen collections.

**Example**

```ts
const ids = recipe.units.map((unit: NormalizedLocalServiceUnit) => unit.id);
```

**Signature**

```ts
export interface NormalizedLocalServiceUnit extends CompositeLocalServiceUnit {
  readonly dependsOn: readonly string[];
  readonly ports: Readonly<Record<string, number>>;
  readonly volumes: readonly { readonly name: string; readonly mountPath: string }[];
  readonly health?: LocalServiceHealthCheck;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe-normalize.types.ts#L16)

## `recipe-runtime.types.ts`

### LocalServiceInstance (interface)

Observed materializer instance, possibly containing child units.

**Example**

```ts
const healthy = instance.health === "healthy";
```

**Signature**

```ts
export interface LocalServiceInstance {
  readonly id: string;
  readonly name: string;
  readonly labels: Readonly<Record<string, string>>;
  readonly state: string;
  readonly health?: "starting" | "healthy" | "unhealthy";
  readonly ports: Readonly<Record<string, number>>;
  readonly unitId?: string;
  readonly units?: readonly LocalServiceInstance[];
  readonly networkName?: string;
  readonly environment?: string;
  readonly serviceGeneration?: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe-runtime.types.ts#L11)

### LocalServiceMaterializerRuntime (interface)

External materializer operations that own local containers and volumes.
Implementations must release their acquired resources through stop, remove, and removeVolumes.

**Example**

```ts
const services = await materializer.list({ application: "demo" });
```

**Signature**

```ts
export interface LocalServiceMaterializerRuntime {
  readonly kind: "local-service-materializer-runtime";
  readonly protocolVersion: typeof LOCAL_SERVICE_PROTOCOL_VERSION;
  readonly integrationId: string;
  /** List matching services.
   * @param labels - Bounded identity labels used for lookup.
   * @param signal - Optional cancellation signal.
   * @returns Matching instances or a rejected provider promise.
   * @example await materializer.list({ application: "demo" });
   */
  readonly list: (
    labels: Readonly<Record<string, string>>,
    signal?: AbortSignal,
  ) => Promise<readonly LocalServiceInstance[]>;
  /** Start one requested service and return its live instance.
   * @param request - Recipe and runtime bindings.
   * @returns A live instance or a rejected provider promise.
   * @example await materializer.start(request);
   */
  readonly start: (request: LocalServiceStartRequest) => Promise<LocalServiceInstance>;
  /** Stop a live service without deleting it.
   * @param id - Materializer instance ID.
   * @param signal - Optional cancellation signal.
   * @returns Completion or a rejected provider promise.
   * @example await materializer.stop?.(instance.id);
   */
  readonly stop?: (id: string, signal?: AbortSignal) => Promise<void>;
  /** Remove a stopped service.
   * @param id - Materializer instance ID.
   * @param signal - Optional cancellation signal.
   * @returns Completion or a rejected provider promise.
   * @example await materializer.remove(instance.id);
   */
  readonly remove: (id: string, signal?: AbortSignal) => Promise<void>;
  /** Remove volumes owned by matching services.
   * @param labels - Ownership labels.
   * @param signal - Optional cancellation signal.
   * @returns Completion or a rejected provider promise.
   * @example await materializer.removeVolumes({ application: "demo" });
   */
  readonly removeVolumes: (
    labels: Readonly<Record<string, string>>,
    signal?: AbortSignal,
  ) => Promise<void>;
  /** List matching volumes when the materializer supports it.
   * @param labels - Ownership labels.
   * @param signal - Optional cancellation signal.
   * @returns Named volumes or a rejected provider promise.
   * @example await materializer.listVolumes?.({ application: "demo" });
   */
  readonly listVolumes?: (
    labels: Readonly<Record<string, string>>,
    signal?: AbortSignal,
  ) => Promise<
    readonly { readonly name: string; readonly labels: Readonly<Record<string, string>> }[]
  >;
  /** Remove networks owned by matching services.
   * @param labels - Ownership labels.
   * @param signal - Optional cancellation signal.
   * @returns Completion or a rejected provider promise.
   * @example await materializer.removeNetworks?.({ application: "demo" });
   */
  readonly removeNetworks?: (
    labels: Readonly<Record<string, string>>,
    signal?: AbortSignal,
  ) => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe-runtime.types.ts#L51)

### LocalServiceStartRequest (interface)

Parameters for starting one materialized local service.
The caller owns cancellation through `signal` and materializer cleanup after start.

**Example**

```ts
await materializer.start(request);
```

**Signature**

```ts
export interface LocalServiceStartRequest {
  readonly name: string;
  readonly volumeName?: string;
  readonly labels: Readonly<Record<string, string>>;
  readonly recipe: LocalServiceRecipeInput;
  readonly environmentFile?: string;
  readonly environmentFiles?: Readonly<Record<string, string>>;
  readonly environmentVariables?: Readonly<Record<string, string>>;
  readonly volumeNames?: Readonly<Record<string, string>>;
  readonly networkName?: string;
  readonly serviceGeneration?: string;
  readonly workerArtifact?: LocalServiceWorkerArtifact;
  readonly bindMounts?: Readonly<Record<string, readonly LocalServiceBindMount[]>>;
  readonly environmentVariablesByUnit?: Readonly<Record<string, Readonly<Record<string, string>>>>;
  readonly portBindings?: Readonly<Record<string, Readonly<Record<string, number>>>>;
  readonly signal?: AbortSignal;
}
```

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

## `recipe.ts`

Version used by composite recipes; single-container recipes remain on v1.

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

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

**Signature**

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

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

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

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

**Signature**

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

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

### LOCAL_SERVICE_RECIPE_PROTOCOL_VERSION

Version used by composite recipes; single-container recipes remain on v1.

**Signature**

```ts
declare const LOCAL_SERVICE_RECIPE_PROTOCOL_VERSION: 2;
```

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

## `recipe.types.ts`

### CompositeLocalServiceRecipe (interface)

Version 2 recipe with ordered units and optional shared resources.
Supply either a flat `units` list or the grouped container, init, and worker fields.

**Example**

```ts
normalizeLocalServiceRecipe(recipe as CompositeLocalServiceRecipe);
```

**Signature**

```ts
export interface CompositeLocalServiceRecipe<IntegrationId extends string = string> {
  readonly kind: "local-service-recipe";
  readonly protocolVersion: typeof LOCAL_SERVICE_RECIPE_PROTOCOL_VERSION;
  readonly integrationId: IntegrationId;
  readonly recipeId: string;
  readonly recipeVersion: 2;
  readonly materializerId: "docker";
  /** A flat unit list is preferred; grouped fields keep recipes readable. */
  readonly units?: readonly CompositeLocalServiceUnit[];
  readonly containers?: readonly Omit<CompositeLocalServiceUnit, "kind">[];
  readonly init?: readonly Omit<CompositeLocalServiceUnit, "kind">[];
  readonly workers?: readonly Omit<CompositeLocalServiceUnit, "kind">[];
  readonly volumes: Readonly<Record<string, CompositeLocalServiceVolume>>;
  readonly generatedSecrets?: Readonly<Record<string, LocalServiceGeneratedSecret>>;
  readonly environment?: Readonly<
    Record<string, LocalServiceSecretEnvironment | LocalServiceLiteralEnvironment>
  >;
  readonly network?: Readonly<{ readonly internal?: boolean }>;
  readonly ownership?: Readonly<{
    readonly scope: "project" | "binding";
    readonly retainVolumes?: boolean;
  }>;
  readonly outputs: (
    context: LocalServiceRecipeOutputContext,
  ) => Readonly<Record<string, JsonValue>>;
  readonly initialize?: (context: LocalServiceRecipeOutputContext) => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L121)

### CompositeLocalServiceUnit (interface)

Container, initializer, or worker declaration.
Dependencies refer to other unit IDs in the same composite recipe.

**Example**

```ts
const unit: CompositeLocalServiceUnit = { id: "api", kind: "container", image: "api" };
```

**Signature**

```ts
export interface CompositeLocalServiceUnit {
  readonly id: string;
  readonly kind: CompositeLocalServiceUnitKind;
  readonly image: string;
  readonly command?: readonly string[];
  readonly dependsOn?: readonly string[];
  readonly ports?: Readonly<Record<string, number>>;
  readonly volumes?: readonly CompositeLocalServiceUnitVolume[];
  readonly environment?: Readonly<
    Record<string, LocalServiceSecretEnvironment | LocalServiceLiteralEnvironment>
  >;
  readonly health?: LocalServiceHealthCheck;
  readonly networkAliases?: readonly string[];
  readonly hostAliases?: Readonly<Record<string, string>>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L101)

### CompositeLocalServiceUnitKind (type alias)

Supported unit roles in a composite recipe.

**Example**

```ts
const kind: CompositeLocalServiceUnitKind = "worker";
```

**Signature**

```ts
type CompositeLocalServiceUnitKind = "container" | "init" | "worker";
```

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

### CompositeLocalServiceUnitVolume (interface)

Mount of one named composite volume into a unit.

**Example**

```ts
const mount: CompositeLocalServiceUnitVolume = { name: "data", mountPath: "/data" };
```

**Signature**

```ts
export interface CompositeLocalServiceUnitVolume {
  readonly name: string;
  readonly mountPath: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L68)

### CompositeLocalServiceVolume (interface)

Named composite volume and persistence policy.

**Example**

```ts
const volume: CompositeLocalServiceVolume = { mountPath: "/data", persistent: true };
```

**Signature**

```ts
export interface CompositeLocalServiceVolume {
  readonly mountPath: string;
  readonly persistent?: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L60)

### LocalServiceBindMount (interface)

Host path mounted into a local-service unit.

**Example**

```ts
const mount: LocalServiceBindMount = { source: "/tmp/data", target: "/data", readOnly: true };
```

**Signature**

```ts
export interface LocalServiceBindMount {
  readonly source: string;
  readonly target: string;
  readonly readOnly?: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L76)

### LocalServiceGeneratedSecret (interface)

Generated secret byte length and encoding.

**Example**

```ts
const secret: LocalServiceGeneratedSecret = { bytes: 32, encoding: "hex" };
```

**Signature**

```ts
export interface LocalServiceGeneratedSecret {
  readonly bytes: number;
  readonly encoding?: "base64url" | "hex";
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L36)

### LocalServiceHealthCheck (interface)

Container health command and positive retry timing.

**Example**

```ts
const check: LocalServiceHealthCheck = {
  command: ["true"],
  intervalMs: 1000,
  timeoutMs: 500,
  retries: 3,
};
```

**Signature**

```ts
export interface LocalServiceHealthCheck {
  readonly command: readonly string[];
  readonly intervalMs: number;
  readonly timeoutMs: number;
  readonly retries: number;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L19)

### LocalServiceLiteralEnvironment (interface)

Literal environment value without a secret reference.

**Example**

```ts
const level: LocalServiceLiteralEnvironment = { value: "debug" };
```

**Signature**

```ts
export interface LocalServiceLiteralEnvironment {
  readonly value: string;
  readonly secret?: never;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L52)

### LocalServiceRecipe (interface)

Version 1 single-container recipe kept for compatibility.
Its output and initialization callbacks run in the materializer, not during normalization.

**Example**

```ts
normalizeLocalServiceRecipe(recipe as LocalServiceRecipe);
```

**Signature**

```ts
export interface LocalServiceRecipe<IntegrationId extends string = string> {
  readonly kind: "local-service-recipe";
  readonly protocolVersion: typeof LOCAL_SERVICE_PROTOCOL_VERSION;
  readonly integrationId: IntegrationId;
  readonly recipeId: string;
  readonly recipeVersion: number;
  readonly materializerId: "docker";
  readonly image: string;
  readonly command?: readonly string[];
  readonly ports: Readonly<Record<string, number>>;
  readonly volume?: LocalServiceVolume;
  readonly health: LocalServiceHealthCheck;
  readonly generatedSecrets?: Readonly<Record<string, LocalServiceGeneratedSecret>>;
  readonly environment?: Readonly<Record<string, LocalServiceSecretEnvironment>>;
  readonly outputs: (
    context: LocalServiceRecipeOutputContext,
  ) => Readonly<Record<string, JsonValue>>;
  readonly initialize?: (context: LocalServiceRecipeOutputContext) => Promise<void>;
}
```

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

### LocalServiceRecipeInput (type alias)

Either supported local recipe form.

**Example**

```ts
normalizeLocalServiceRecipe(recipe as LocalServiceRecipeInput);
```

**Signature**

```ts
type LocalServiceRecipeInput<IntegrationId extends string = string> =
  LocalServiceRecipe<IntegrationId> | CompositeLocalServiceRecipe<IntegrationId>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L152)

### LocalServiceRecipeOutputContext (interface)

Runtime values supplied to recipe output and initialization callbacks.

**Example**

```ts
const context: LocalServiceRecipeOutputContext = { ports: {}, secrets: {} };
```

**Signature**

```ts
export interface LocalServiceRecipeOutputContext {
  readonly ports: Readonly<Record<string, number>>;
  readonly secrets: Readonly<Record<string, string>>;
  readonly endpoints?: Readonly<Record<string, string>>;
  readonly signal?: AbortSignal;
  readonly fetch?: typeof globalThis.fetch;
}
```

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

### LocalServiceSecretEnvironment (interface)

Reference to a declared generated secret.

**Example**

```ts
const password: LocalServiceSecretEnvironment = { secret: "password" };
```

**Signature**

```ts
export interface LocalServiceSecretEnvironment {
  readonly secret: string;
  readonly value?: never;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L44)

### LocalServiceVolume (interface)

Legacy single-container volume mount.

**Example**

```ts
const volume: LocalServiceVolume = { mountPath: "/data" };
```

**Signature**

```ts
export interface LocalServiceVolume {
  readonly mountPath: string;
}
```

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

### LocalServiceWorkerArtifact (interface)

Built worker inputs used by a local materializer.

**Example**

```ts
const artifact: LocalServiceWorkerArtifact = {
  entrypoint: "worker.js",
  providerOverridesFile: "overrides.json",
};
```

**Signature**

```ts
export interface LocalServiceWorkerArtifact {
  readonly entrypoint: string;
  readonly nodeModulesDirectory?: string;
  readonly providerOverridesFile: string;
  readonly environment?: Readonly<Record<string, string>>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/local-service/src/recipe.types.ts#L85)
