Local API
Generated public TypeScript reference for @relkit/local.
Common APIs
For configuration and examples, read 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.
index.ts
“./providers.js” (namespace export)
Re-exports all named exports from the “./providers.js” module.
Signature
export * from "./providers.js";
“@relkit/local-service” (namespace export)
Re-exports all named exports from the “@relkit/local-service” module.
Signature
export * from "@relkit/local-service";
providers.ts
localEvent
Defines the durable filesystem event provider used by local development.
Example
import { localEvent } from "@relkit/local";
const events = localEvent();
Signature
declare const localEvent: (options?: LocalProviderOptions) => LocalEventAdapter;
Since v0.4.0
localJob
Defines the durable filesystem queue provider for unscheduled local jobs.
Example
import { localJob } from "@relkit/local";
const jobs = localJob();
Signature
declare const localJob: (options?: LocalProviderOptions) => LocalJobAdapter;
Since v0.4.0
LocalAgentStateAdapter (type alias)
Signature
type LocalAgentStateAdapter = ProviderAdapter<typeof agentState, "local-agent-state">;
LocalEventAdapter (type alias)
Signature
type LocalEventAdapter = ProviderAdapter<typeof event, "local-event">;
LocalJobAdapter (type alias)
Signature
type LocalJobAdapter = ProviderAdapter<typeof job, "local-job">;
LocalProviderOptions (interface)
Signature
export interface LocalProviderOptions {
readonly root?: string;
}
LocalRealtimeAdapter (type alias)
Signature
type LocalRealtimeAdapter = ProviderAdapter<typeof realtime, "local-realtime">;
localAgentState
Signature
declare const localAgentState: (options?: LocalProviderOptions) => LocalAgentStateAdapter;
localRealtime
Signature
declare const localRealtime: (options?: LocalProviderOptions) => LocalRealtimeAdapter;
identity.ts
LOCAL_RESOURCE_LABEL
Signature
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";
}>;
LocalProjectIdentity (interface)
Signature
export interface LocalProjectIdentity {
readonly applicationId: string;
readonly projectRoot: string;
readonly localProjectId: string;
}
createLocalProjectIdentity
Signature
declare const createLocalProjectIdentity: (
requestedRoot: string,
applicationId: string,
) => LocalProjectIdentity;
localEndpointHash
Signature
declare const localEndpointHash: (
endpoints: Readonly<Record<string, string>> | undefined,
) => string | undefined;
localProjectLabels
Signature
declare const localProjectLabels: (
identity: LocalProjectIdentity,
) => Readonly<Record<string, string>>;
localResourceLabels
Signature
declare const localResourceLabels: (
identity: LocalProjectIdentity,
resource: LocalResourceIdentity,
) => Readonly<Record<string, string>>;
localResourceName
Signature
declare const localResourceName: (
identity: LocalProjectIdentity,
bindingId: string,
suffix?: string,
) => string;
index.ts
“./identity.js” (namespace export)
Re-exports all named exports from the “./identity.js” module.
Signature
export * from "./identity.js";
“./integration.js” (namespace export)
Re-exports all named exports from the “./integration.js” module.
Signature
export * from "./integration.js";
“./lease.js” (namespace export)
Re-exports all named exports from the “./lease.js” module.
Signature
export * from "./lease.js";
“./local-secrets.js” (namespace export)
Re-exports all named exports from the “./local-secrets.js” module.
Signature
export * from "./local-secrets.js";
“./provider-overrides.js” (namespace export)
Re-exports all named exports from the “./provider-overrides.js” module.
Signature
export * from "./provider-overrides.js";
“./reconciler.js” (namespace export)
Re-exports all named exports from the “./reconciler.js” module.
Signature
export * from "./reconciler.js";
“./service-state.js” (namespace export)
Re-exports all named exports from the “./service-state.js” module.
Signature
export * from "./service-state.js";
“./state-paths.js” (namespace export)
Re-exports all named exports from the “./state-paths.js” module.
Signature
export * from "./state-paths.js";
groupServiceInstances
Signature
declare const groupServiceInstances: (
instances: readonly LocalServiceInstance[],
) => readonly LocalServiceInstance[];
serviceInstanceIds
Signature
declare const serviceInstanceIds: (instance: LocalServiceInstance) => readonly string[];
integration.ts
runtimeIntegration
Signature
declare const runtimeIntegration: RuntimeProviderIntegration<"local">;
lease-files.ts
LeasePaths (interface)
Signature
export interface LeasePaths {
readonly directory: string;
readonly lock: string;
}
ensureLeaseDirectory
Signature
declare const ensureLeaseDirectory: (identity: LocalProjectIdentity) => void;
leasePaths
Signature
declare const leasePaths: (identity: LocalProjectIdentity) => LeasePaths;
readLease
Signature
declare const readLease: (identity: LocalProjectIdentity) => LocalProjectLease | undefined;
withLeaseLock
Signature
declare const withLeaseLock: <Value>(
identity: LocalProjectIdentity,
paths: LeasePaths,
isProcessAlive: (pid: number) => boolean,
operation: () => Value,
) => Value;
writeLease
Signature
declare const writeLease: (identity: LocalProjectIdentity, lease: LocalProjectLease) => void;
lease-types.ts
AcquireLocalProjectLeaseOptions (interface)
Signature
export interface AcquireLocalProjectLeaseOptions {
readonly mode: LocalProjectLeaseMode;
readonly sessionId: string;
readonly pid?: number;
readonly now?: () => Date;
readonly isProcessAlive?: (pid: number) => boolean;
}
LOCAL_PROJECT_LEASE_VERSION
Signature
declare const LOCAL_PROJECT_LEASE_VERSION: 1;
LocalProjectLease (interface)
Signature
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;
}
LocalProjectLeaseError (class)
Signature
declare class LocalProjectLeaseError { constructor(
readonly code: LocalProjectLeaseErrorCode,
message: string,
readonly owner?: LocalProjectLease,
) }
LocalProjectLeaseErrorCode (type alias)
Signature
type LocalProjectLeaseErrorCode =
"RELKIT_LOCAL_LEASE_HELD" | "RELKIT_LOCAL_LEASE_BUSY" | "RELKIT_LOCAL_LEASE_INVALID";
LocalProjectLeaseHandle (interface)
Signature
export interface LocalProjectLeaseHandle {
readonly lease: LocalProjectLease;
readonly status: LocalProjectLeaseStatus;
readonly release: () => void;
}
LocalProjectLeaseMode (type alias)
Signature
type LocalProjectLeaseMode = "attached" | "detached";
LocalProjectLeaseStatus (type alias)
Signature
type LocalProjectLeaseStatus = "acquired" | "adopted" | "recovered";
lease.ts
“./lease-types.js” (namespace export)
Re-exports all named exports from the “./lease-types.js” module.
Signature
export * from "./lease-types.js";
acquireLocalProjectLease
Signature
declare const acquireLocalProjectLease: (
identity: LocalProjectIdentity,
options: AcquireLocalProjectLeaseOptions,
) => LocalProjectLeaseHandle;
readLocalProjectLease
Signature
declare const readLocalProjectLease: (
identity: LocalProjectIdentity,
) => LocalProjectLease | undefined;
local-secrets.ts
LOCAL_SERVICE_SECRETS_FILE
Signature
declare const LOCAL_SERVICE_SECRETS_FILE: "local-secrets.json";
LocalServiceSecretBinding (interface)
Signature
export interface LocalServiceSecretBinding {
readonly bindingId: string;
readonly recipe: Readonly<{
readonly integrationId: string;
readonly recipeId: string;
readonly recipeVersion: number;
}>;
readonly values: Readonly<Record<string, string>>;
}
LocalServiceSecretState (interface)
Signature
export interface LocalServiceSecretState {
readonly version: typeof LOCAL_SERVICE_SECRETS_VERSION;
readonly applicationId: string;
readonly localProjectId: string;
readonly bindings: readonly LocalServiceSecretBinding[];
}
readLocalServiceSecrets
Signature
declare const readLocalServiceSecrets: (
identity: LocalProjectIdentity,
) => LocalServiceSecretState | undefined;
upsertLocalServiceSecrets
Signature
declare const upsertLocalServiceSecrets: (
identity: LocalProjectIdentity,
current: LocalServiceSecretState | undefined,
bindingId: string,
recipe: LocalServiceSecretBinding["recipe"],
values: Readonly<Record<string, string>>,
) => LocalServiceSecretState;
provider-overrides.ts
ProviderOverrideError (class)
Signature
declare class ProviderOverrideError { constructor(readonly code: "RELKIT_LOCAL_OVERRIDE_INVALID" | "RELKIT_LOCAL_OVERRIDE_STALE") }
ProviderOverrideSummary (interface)
Signature
export interface ProviderOverrideSummary {
readonly generationId: string;
readonly planHash: string;
readonly bindingIds: readonly string[];
}
readProviderOverrides
Signature
declare const readProviderOverrides: (
identity: LocalProjectIdentity,
expectedPlanHash?: string,
) => ProviderOverrideState | undefined;
removeProviderOverrides
Signature
declare const removeProviderOverrides: (identity: LocalProjectIdentity) => void;
summarizeProviderOverrides
Signature
declare const summarizeProviderOverrides: (state: ProviderOverrideState) => ProviderOverrideSummary;
writeProviderOverrides
Signature
declare const writeProviderOverrides: (
identity: LocalProjectIdentity,
planHash: string,
bindings: readonly ProviderOverrideBinding[],
) => ProviderOverrideSummary;
reconciler-environment.ts
environmentFile
Signature
declare const environmentFile: (
recipe: LocalServiceRecipeInput,
secrets: Readonly<Record<string, string>>,
) => string | undefined;
environmentFiles
Signature
declare const environmentFiles: (
recipe: LocalServiceRecipeInput,
secrets: Readonly<Record<string, string>>,
) => Readonly<Record<string, string>>;
reconciler-generation.ts
assertHotSwapSafe
Refuses an unsafe source-generation swap while an older service is owned.
Signature
declare const assertHotSwapSafe: (
bindingId: string,
instances: readonly LocalServiceInstance[],
environment: string | undefined,
serviceGeneration: string | undefined,
) => void;
reconciler-lifecycle.ts
aborted
Signature
declare const aborted: (signal: AbortSignal | undefined) => void;
frozenResult
Signature
declare const frozenResult: (
overrides: ProviderOverrideSummary,
state: LocalServiceState,
reused: readonly string[],
started: readonly string[],
removed: readonly string[],
) => LocalServiceReconcileResult;
startService
Signature
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>;
writeFailureState
Signature
declare const writeFailureState: (
options: LocalServiceReconcilerOptions,
request: LocalServiceReconcileRequest,
active: LocalServicePlanEntry | undefined,
) => void;
reconciler-operation-finalize.ts
finalizeReconcile
Signature
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>;
reconciler-operation-run.ts
runReconcileOperation
Signature
declare const runReconcileOperation: (
options: LocalServiceReconcilerOptions,
projectLabels: Readonly<Record<string, string>>,
tracked: Map<string, TrackedService>,
signatures: Map<string, string>,
isClosed: () => boolean,
request: LocalServiceReconcileRequest,
) => Promise<LocalServiceReconcileResult>;
reconciler-operation-service.ts
ensureServiceInstance
Signature
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>;
keepServiceCandidates
Signature
declare const keepServiceCandidates: (
recipe: NormalizedLocalServiceRecipe,
candidates: readonly LocalServiceInstance[],
request: LocalServiceReconcileRequest,
bindingId: string,
) => boolean;
reconciler-operation.ts
TrackedService (interface)
Signature
export interface TrackedService {
readonly instance: LocalServiceInstance;
readonly signature: string;
readonly secrets: Readonly<Record<string, string>>;
readonly owned: boolean;
}
createReconcileOperation
Signature
declare const createReconcileOperation: (
options: LocalServiceReconcilerOptions,
projectLabels: Readonly<Record<string, string>>,
tracked: Map<string, TrackedService>,
signatures: Map<string, string>,
isClosed: () => boolean,
) => (request: LocalServiceReconcileRequest) => Promise<LocalServiceReconcileResult>;
reconciler-queue.ts
ReconcileQueue (interface)
Signature
export interface ReconcileQueue {
readonly enqueue: (request: LocalServiceReconcileRequest) => Promise<LocalServiceReconcileResult>;
readonly wait: () => Promise<void>;
}
createReconcileQueue
Signature
declare const createReconcileQueue: (
reconcile: (request: LocalServiceReconcileRequest) => Promise<LocalServiceReconcileResult>,
) => ReconcileQueue;
reconciler-resource.ts
removeInstance
Signature
declare const removeInstance: (
options: LocalServiceReconcilerOptions,
instance: LocalServiceInstance,
signal?: AbortSignal,
) => Promise<void>;
reconciler-support-validation.ts
completeUnits
Signature
declare const completeUnits: (
instance: LocalServiceInstance,
expectedUnitIds: readonly string[],
) => boolean;
hash
Signature
declare const hash: (value: unknown) => value is string;
invalid
Signature
declare const invalid: () => never;
sameBindings
Signature
declare const sameBindings: (
previous: ProviderOverrideState | undefined,
planHash: string,
bindings: readonly {
readonly bindingId: string;
readonly values: Readonly<Record<string, JsonValue>>;
}[],
) => boolean;
reconciler-support.ts
compatible
Signature
declare const compatible: (
instance: LocalServiceInstance,
expectedRecipe: string,
planHash: string,
priorSignature: string | undefined,
signature: string,
environment?: string,
serviceGeneration?: string,
expectedUnitIds?: readonly string[],
endpointHash?: string,
) => boolean;
createSecrets
Signature
declare const createSecrets: (recipe: LocalServiceRecipeInput) => Readonly<Record<string, string>>;
desiredServices
Signature
declare const desiredServices: (
request: LocalServiceReconcileRequest,
) => readonly LocalServicePlanEntry[];
generatedSecrets
Signature
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;
groupServiceInstances
Signature
declare const groupServiceInstances: (
instances: readonly LocalServiceInstance[],
) => readonly LocalServiceInstance[];
outputPorts
Signature
declare const outputPorts: (
recipe: LocalServiceRecipeInput,
instance: LocalServiceInstance,
) => Readonly<Record<string, number>>;
recipeFor
Signature
declare const recipeFor: (
entry: LocalServicePlanEntry,
recipes: Readonly<Record<string, LocalServiceRecipeInput>>,
materializerId: string,
) => LocalServiceRecipeInput;
sameBindings
Signature
declare const sameBindings: (
previous: ProviderOverrideState | undefined,
planHash: string,
bindings: readonly {
readonly bindingId: string;
readonly values: Readonly<Record<string, JsonValue>>;
}[],
) => boolean;
serviceInstanceIds
Signature
declare const serviceInstanceIds: (instance: LocalServiceInstance) => readonly string[];
serviceSignature
Signature
declare const serviceSignature: (entry: LocalServicePlanEntry) => string;
reconciler-types.ts
LocalServiceRecipeMap (type alias)
Signature
type LocalServiceRecipeMap = Readonly<Record<string, LocalServiceRecipeInput>>;
LocalServiceReconcileRequest (interface)
Signature
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;
}
LocalServiceReconcileResult (interface)
Signature
export interface LocalServiceReconcileResult {
readonly overrides: ProviderOverrideSummary;
readonly state: LocalServiceState;
readonly reused: readonly string[];
readonly started: readonly string[];
readonly removed: readonly string[];
}
LocalServiceReconciler (interface)
Signature
export interface LocalServiceReconciler {
readonly reconcile: (
request: LocalServiceReconcileRequest,
) => Promise<LocalServiceReconcileResult>;
readonly close: () => Promise<void>;
}
LocalServiceReconcilerOptions (interface)
Signature
export interface LocalServiceReconcilerOptions {
readonly identity: LocalProjectIdentity;
readonly materializer: LocalServiceMaterializerRuntime;
readonly preserveOnClose?: boolean;
}
reconciler-worker.ts
WorkerStartOptions (interface)
Signature
export interface WorkerStartOptions {
readonly bindMounts?: Readonly<Record<string, readonly LocalServiceBindMount[]>>;
readonly environmentVariablesByUnit?: Readonly<Record<string, Readonly<Record<string, string>>>>;
}
workerStartOptions
Signature
declare const workerStartOptions: (
recipe: NormalizedLocalServiceRecipe,
artifact: LocalServiceWorkerArtifact | undefined,
) => WorkerStartOptions;
reconciler.ts
“./reconciler-types.js” (namespace export)
Re-exports all named exports from the “./reconciler-types.js” module.
Signature
export * from "./reconciler-types.js";
createLocalServiceReconciler
Signature
declare const createLocalServiceReconciler: (
options: LocalServiceReconcilerOptions,
) => LocalServiceReconciler;
service-state.ts
readLocalServiceState
Signature
declare const readLocalServiceState: (
identity: LocalProjectIdentity,
) => LocalServiceState | undefined;
removeLocalServiceState
Signature
declare const removeLocalServiceState: (identity: LocalProjectIdentity) => void;
writeLocalServiceState
Signature
declare const writeLocalServiceState: (
identity: LocalProjectIdentity,
planHash: string,
services: readonly LocalServiceBindingState[],
) => LocalServiceState;
state-paths.ts
LocalStateError (class)
Signature
declare class LocalStateError {
constructor();
}
code (property)
Signature
readonly code: "RELKIT_LOCAL_STATE_INVALID"
LocalStateFileName (type alias)
Signature
type LocalStateFileName =
| "lease.json"
| "local-services.state.json"
| "provider-overrides.json"
| "worker-provider-overrides.json"
| "local-secrets.json";
ensureLocalStateDirectory
Signature
declare const ensureLocalStateDirectory: (identity: LocalProjectIdentity) => string;
localStateDirectory
Signature
declare const localStateDirectory: (identity: LocalProjectIdentity) => string;
readLocalStateText
Signature
declare const readLocalStateText: (
identity: LocalProjectIdentity,
name: LocalStateFileName,
) => string | undefined;
removeLocalStateFile
Signature
declare const removeLocalStateFile: (
identity: LocalProjectIdentity,
name: LocalStateFileName,
) => void;
withLocalStateTemporaryFile
Signature
declare const withLocalStateTemporaryFile: <Value>(
identity: LocalProjectIdentity,
value: string,
operation: (path: string) => Promise<Value>,
) => Promise<Value>;
writeLocalStateText
Signature
declare const writeLocalStateText: (
identity: LocalProjectIdentity,
name: LocalStateFileName,
value: string,
) => void;
local-service-errors.ts
LocalServiceValidationFailure (class)
Expected validation failure in a local-service Effect operation.
Example
Effect.catchTag("LocalServiceValidationFailure", ({ message }) => Effect.logWarning(message));
Signature
declare class LocalServiceValidationFailure
LocalServiceVersionError (class)
Legacy synchronous error for a stale local-service artifact.
Example
throw new LocalServiceVersionError(
"RELKIT_LOCAL_SERVICE_PLAN_VERSION_UNSUPPORTED",
"Local-service plan",
0,
1,
"relkit check",
);
Signature
declare class LocalServiceVersionError { constructor(
readonly code: LocalServiceVersionErrorCode,
label: string,
version: unknown,
expected: number,
command: string,
) }
LocalServiceVersionFailure (class)
Expected unsupported artifact version in a local-service Effect operation.
Example
Effect.catchTag("LocalServiceVersionFailure", ({ code }) => Effect.logWarning(code));
Signature
declare class LocalServiceVersionFailure
local-service-observability.ts
LocalServiceTelemetry (class)
Substitutable telemetry service for local-service operations.
Example
Effect.provide(normalizeLocalServiceRecipeEffect(recipe), LocalServiceTelemetryLive);
Signature
declare class LocalServiceTelemetry
LocalServiceTelemetryLive
Live operation spans and metrics.
Example
Effect.runSync(
Effect.provide(normalizeLocalServiceRecipeEffect(recipe), LocalServiceTelemetryLive),
);
Signature
declare const LocalServiceTelemetryLive: Layer.Layer<LocalServiceTelemetry, never, never>;
observeLocalService
Observe one public operation using an injected or live telemetry service.
Example
observeLocalService("recipe.normalize", Effect.succeed(recipe));
Signature
declare const observeLocalService: <A, E, R>(
operation: LocalServiceOperation,
effect: Effect.Effect<A, E, R>,
) => Effect.Effect<A, E, R>;
runLocalService
Run a synchronous compatibility adapter and restore legacy errors.
Throws
TypeError or LocalServiceVersionError for expected failures; defects propagate.
Example
runLocalService(Effect.succeed("ready"));
Signature
declare const runLocalService: <A, E>(effect: Effect.Effect<A, E>) => A;
local-service-observability.types.ts
LocalServiceOperation (type alias)
Fixed operation names keep metric dimensions bounded.
Example
const operation: LocalServiceOperation = "recipe.normalize";
Signature
type LocalServiceOperation =
| "recipe.normalize"
| "plan.assert-version"
| "state.assert-version"
| "override.assert-version"
| "override.binding-values";
LocalServiceTelemetryService (interface)
Injectable tracing and metric behavior for public operations.
Example
const telemetry: LocalServiceTelemetryService = { observe: (_operation, effect) => effect };
Signature
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>;
}
protocol-version.ts
assertLocalServicePlanVersion
Assert a local-service plan version synchronously.
Throws
LocalServiceVersionError when the version differs.
Example
assertLocalServicePlanVersion({ version: 1 });
Signature
declare const assertLocalServicePlanVersion: (value: unknown) => asserts value is LocalServicePlan;
assertLocalServicePlanVersionEffect
Check a local-service plan version in the Effect error channel.
Example
Effect.runSync(assertLocalServicePlanVersionEffect({ version: 1 }));
Signature
declare const assertLocalServicePlanVersionEffect: (
value: unknown,
) => Effect.Effect<void, LocalServiceVersionFailure, never>;
assertLocalServiceStateVersion
Assert a local-service state version synchronously.
Throws
LocalServiceVersionError when the version differs.
Example
assertLocalServiceStateVersion({ version: 1 });
Signature
declare const assertLocalServiceStateVersion: (
value: unknown,
) => asserts value is LocalServiceState;
assertLocalServiceStateVersionEffect
Check a local-service state version in the Effect error channel.
Example
Effect.runSync(assertLocalServiceStateVersionEffect({ version: 1 }));
Signature
declare const assertLocalServiceStateVersionEffect: (
value: unknown,
) => Effect.Effect<void, LocalServiceVersionFailure, never>;
assertProviderOverrideStateVersion
Assert a provider override version synchronously.
Throws
LocalServiceVersionError when the version differs.
Example
assertProviderOverrideStateVersion({ version: 1 });
Signature
declare const assertProviderOverrideStateVersion: (
value: unknown,
) => asserts value is ProviderOverrideState;
assertProviderOverrideStateVersionEffect
Check an override artifact version in the Effect error channel.
Example
Effect.runSync(assertProviderOverrideStateVersionEffect({ version: 1 }));
Signature
declare const assertProviderOverrideStateVersionEffect: (
value: unknown,
) => Effect.Effect<void, LocalServiceVersionFailure, never>;
checkVersionEffect
Check one artifact version without starting a separate public operation span.
Example
Effect.runSync(
checkVersionEffect(
{ version: 1 },
1,
"Local-service plan",
"RELKIT_LOCAL_SERVICE_PLAN_VERSION_UNSUPPORTED",
"relkit check",
),
);
Signature
declare const checkVersionEffect: (
value: unknown,
expected: number,
label: string,
code: LocalServiceVersionErrorCode,
command: string,
) => Effect.Effect<undefined, LocalServiceVersionFailure, never>;
protocol.ts
Version and artifact names for the local-service protocol.
LOCAL_SERVICE_PLAN_FILE
Signature
declare const LOCAL_SERVICE_PLAN_FILE: "local-services.plan.json";
LOCAL_SERVICE_PLAN_VERSION
Signature
declare const LOCAL_SERVICE_PLAN_VERSION: 1;
LOCAL_SERVICE_PROTOCOL_VERSION
Version and artifact names for the local-service protocol.
Signature
declare const LOCAL_SERVICE_PROTOCOL_VERSION: 1;
LOCAL_SERVICE_STATE_FILE
Signature
declare const LOCAL_SERVICE_STATE_FILE: "local-services.state.json";
LOCAL_SERVICE_STATE_VERSION
Signature
declare const LOCAL_SERVICE_STATE_VERSION: 1;
PROVIDER_OVERRIDE_STATE_FILE
Signature
declare const PROVIDER_OVERRIDE_STATE_FILE: "provider-overrides.json";
PROVIDER_OVERRIDE_STATE_VERSION
Signature
declare const PROVIDER_OVERRIDE_STATE_VERSION: 1;
protocol.types.ts
LocalServiceBindingState (interface)
Observed state of one local binding.
Example
const phase: LocalServicePhase = binding.phase;
Signature
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;
}
LocalServiceMaterializerMetadata (interface)
Identity of a local materializer integration.
Example
const metadata: LocalServiceMaterializerMetadata = {
kind: "local-service-materializer",
protocolVersion: 1,
integrationId: "docker",
};
Signature
export interface LocalServiceMaterializerMetadata<IntegrationId extends string = string> {
readonly kind: "local-service-materializer";
readonly protocolVersion: typeof LOCAL_SERVICE_PROTOCOL_VERSION;
readonly integrationId: IntegrationId;
}
LocalServicePhase (type alias)
Runtime lifecycle phase for one local binding.
Example
const phase: LocalServicePhase = "healthy";
Signature
type LocalServicePhase = "pending" | "starting" | "healthy" | "unhealthy" | "stopped";
LocalServicePlan (interface)
Versioned local service plan.
Example
const entries: readonly LocalServicePlanEntry[] = plan.services;
Signature
export interface LocalServicePlan {
readonly version: typeof LOCAL_SERVICE_PLAN_VERSION;
readonly graphHash: string;
readonly services: readonly LocalServicePlanEntry[];
}
LocalServicePlanEntry (interface)
Planned local binding and its provider recipe.
Example
const entry = plan.services[0] as LocalServicePlanEntry;
Signature
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[];
}
LocalServiceState (interface)
Versioned state for all local bindings.
Example
const bindings: readonly LocalServiceBindingState[] = state.services;
Signature
export interface LocalServiceState {
readonly version: typeof LOCAL_SERVICE_STATE_VERSION;
readonly applicationId: string;
readonly localProjectId: string;
readonly planHash: string;
readonly services: readonly LocalServiceBindingState[];
}
LocalServiceVersionErrorCode (type alias)
Stable error codes for unsupported artifact versions.
Example
const code: LocalServiceVersionErrorCode = "RELKIT_LOCAL_SERVICE_PLAN_VERSION_UNSUPPORTED";
Signature
type LocalServiceVersionErrorCode =
| "RELKIT_LOCAL_SERVICE_PLAN_VERSION_UNSUPPORTED"
| "RELKIT_LOCAL_SERVICE_STATE_VERSION_UNSUPPORTED"
| "RELKIT_PROVIDER_OVERRIDE_STATE_VERSION_UNSUPPORTED";
ProviderOverrideBinding (interface)
Resolved override values for one provider binding.
Example
const url = binding.values.url;
Signature
export interface ProviderOverrideBinding {
readonly bindingId: string;
readonly values: Readonly<Record<string, JsonValue>>;
}
ProviderOverrideExpectation (interface)
Expected activation identity for provider override lookup.
Example
const expected: ProviderOverrideExpectation = {
applicationId: "demo",
planHash,
generationId: "generation-1",
};
Signature
export interface ProviderOverrideExpectation {
readonly applicationId: string;
readonly planHash: string;
readonly generationId: string;
}
ProviderOverrideState (interface)
Versioned override state bound to one activation.
Example
const bindings: readonly ProviderOverrideBinding[] = overrides.bindings;
Signature
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[];
}
provider-overrides.ts
providerOverrideBindingValues
Resolve provider overrides synchronously for existing callers.
Throws
LocalServiceVersionError or TypeError for an invalid artifact.
Example
providerOverrideBindingValues(artifact, expected);
Signature
declare const providerOverrideBindingValues: (
value: unknown,
expected: ProviderOverrideExpectation,
) => Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
providerOverrideBindingValuesEffect
Resolve only the overrides belonging to one activation.
Example
Effect.runSync(providerOverrideBindingValuesEffect(artifact, expected));
Signature
declare const providerOverrideBindingValuesEffect: (
value: unknown,
expected: ProviderOverrideExpectation,
) => Effect.Effect<
Record<string, Readonly<Record<string, JsonValue>>>,
LocalServiceVersionFailure | LocalServiceValidationFailure,
never
>;
recipe-normalize.ts
NormalizedLocalServiceRecipe
Signature
declare const NormalizedLocalServiceRecipe: NormalizedLocalServiceRecipe;
NormalizedLocalServiceUnit
Signature
declare const NormalizedLocalServiceUnit: NormalizedLocalServiceUnit;
normalizeLocalServiceRecipe
Normalize a recipe synchronously for existing callers.
Throws
TypeError when a recipe field or dependency is invalid.
Example
normalizeLocalServiceRecipe(recipe);
Signature
declare const normalizeLocalServiceRecipe: (
recipe: LocalServiceRecipeInput,
) => NormalizedLocalServiceRecipe;
normalizeLocalServiceRecipeEffect
Normalize a supported recipe in the Effect error channel.
Example
Effect.runSync(normalizeLocalServiceRecipeEffect(recipe));
Signature
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
>;
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
const normalized: NormalizedLocalServiceRecipe = normalizeLocalServiceRecipe(recipe);
Signature
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>;
}
NormalizedLocalServiceUnit (interface)
Validated unit with required frozen collections.
Example
const ids = recipe.units.map((unit: NormalizedLocalServiceUnit) => unit.id);
Signature
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;
}
recipe-runtime.types.ts
LocalServiceInstance (interface)
Observed materializer instance, possibly containing child units.
Example
const healthy = instance.health === "healthy";
Signature
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;
}
LocalServiceMaterializerRuntime (interface)
External materializer operations that own local containers and volumes. Implementations must release their acquired resources through stop, remove, and removeVolumes.
Example
const services = await materializer.list({ application: "demo" });
Signature
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>;
}
LocalServiceStartRequest (interface)
Parameters for starting one materialized local service.
The caller owns cancellation through signal and materializer cleanup after start.
Example
await materializer.start(request);
Signature
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;
}
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
export * from "./recipe-runtime.types.js";
“./recipe.types.js” (namespace export)
Re-exports all named exports from the “./recipe.types.js” module.
Signature
export * from "./recipe.types.js";
LOCAL_SERVICE_RECIPE_PROTOCOL_VERSION
Version used by composite recipes; single-container recipes remain on v1.
Signature
declare const LOCAL_SERVICE_RECIPE_PROTOCOL_VERSION: 2;
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
normalizeLocalServiceRecipe(recipe as CompositeLocalServiceRecipe);
Signature
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>;
}
CompositeLocalServiceUnit (interface)
Container, initializer, or worker declaration. Dependencies refer to other unit IDs in the same composite recipe.
Example
const unit: CompositeLocalServiceUnit = { id: "api", kind: "container", image: "api" };
Signature
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>>;
}
CompositeLocalServiceUnitKind (type alias)
Supported unit roles in a composite recipe.
Example
const kind: CompositeLocalServiceUnitKind = "worker";
Signature
type CompositeLocalServiceUnitKind = "container" | "init" | "worker";
CompositeLocalServiceUnitVolume (interface)
Mount of one named composite volume into a unit.
Example
const mount: CompositeLocalServiceUnitVolume = { name: "data", mountPath: "/data" };
Signature
export interface CompositeLocalServiceUnitVolume {
readonly name: string;
readonly mountPath: string;
}
CompositeLocalServiceVolume (interface)
Named composite volume and persistence policy.
Example
const volume: CompositeLocalServiceVolume = { mountPath: "/data", persistent: true };
Signature
export interface CompositeLocalServiceVolume {
readonly mountPath: string;
readonly persistent?: boolean;
}
LocalServiceBindMount (interface)
Host path mounted into a local-service unit.
Example
const mount: LocalServiceBindMount = { source: "/tmp/data", target: "/data", readOnly: true };
Signature
export interface LocalServiceBindMount {
readonly source: string;
readonly target: string;
readonly readOnly?: boolean;
}
LocalServiceGeneratedSecret (interface)
Generated secret byte length and encoding.
Example
const secret: LocalServiceGeneratedSecret = { bytes: 32, encoding: "hex" };
Signature
export interface LocalServiceGeneratedSecret {
readonly bytes: number;
readonly encoding?: "base64url" | "hex";
}
LocalServiceHealthCheck (interface)
Container health command and positive retry timing.
Example
const check: LocalServiceHealthCheck = {
command: ["true"],
intervalMs: 1000,
timeoutMs: 500,
retries: 3,
};
Signature
export interface LocalServiceHealthCheck {
readonly command: readonly string[];
readonly intervalMs: number;
readonly timeoutMs: number;
readonly retries: number;
}
LocalServiceLiteralEnvironment (interface)
Literal environment value without a secret reference.
Example
const level: LocalServiceLiteralEnvironment = { value: "debug" };
Signature
export interface LocalServiceLiteralEnvironment {
readonly value: string;
readonly secret?: never;
}
LocalServiceRecipe (interface)
Version 1 single-container recipe kept for compatibility. Its output and initialization callbacks run in the materializer, not during normalization.
Example
normalizeLocalServiceRecipe(recipe as LocalServiceRecipe);
Signature
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>;
}
LocalServiceRecipeInput (type alias)
Either supported local recipe form.
Example
normalizeLocalServiceRecipe(recipe as LocalServiceRecipeInput);
Signature
type LocalServiceRecipeInput<IntegrationId extends string = string> =
LocalServiceRecipe<IntegrationId> | CompositeLocalServiceRecipe<IntegrationId>;
LocalServiceRecipeOutputContext (interface)
Runtime values supplied to recipe output and initialization callbacks.
Example
const context: LocalServiceRecipeOutputContext = { ports: {}, secrets: {} };
Signature
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;
}
LocalServiceSecretEnvironment (interface)
Reference to a declared generated secret.
Example
const password: LocalServiceSecretEnvironment = { secret: "password" };
Signature
export interface LocalServiceSecretEnvironment {
readonly secret: string;
readonly value?: never;
}
LocalServiceVolume (interface)
Legacy single-container volume mount.
Example
const volume: LocalServiceVolume = { mountPath: "/data" };
Signature
export interface LocalServiceVolume {
readonly mountPath: string;
}
LocalServiceWorkerArtifact (interface)
Built worker inputs used by a local materializer.
Example
const artifact: LocalServiceWorkerArtifact = {
entrypoint: "worker.js",
providerOverridesFile: "overrides.json",
};
Signature
export interface LocalServiceWorkerArtifact {
readonly entrypoint: string;
readonly nodeModulesDirectory?: string;
readonly providerOverridesFile: string;
readonly environment?: Readonly<Record<string, string>>;
}