---
title: Effect API
description: Generated public TypeScript reference for relkit/effect.
search:
  exclude: true
sidebar:
  icon: braces
---

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

## Common APIs

- [defineApp](/docs/api/effect#defineapp)

For configuration and examples, read [effect](/docs/modules/service/effect).

## Most-used APIs

These entries carry each API's contract and example. The complete reference follows.

### defineApp

Defines one immutable application topology synchronously.

**Throws**

The original validation error for invalid options.

**Example**

```ts
import { defineApp } from "relkit";
import { defineEnv } from "relkit/config";
const app = defineApp({ env: defineEnv({}), server: { port: 3000 } });
```

**Signature**

```ts
declare const defineApp: <
  const Shape extends EnvShape,
  const Bucket extends AppProviderBindings["bucket"] = undefined,
  const Cache extends AppProviderBindings["cache"] = undefined,
  const Jobs extends AppProviderBindings["jobs"] = undefined,
  const Event extends AppProviderBindings["event"] = undefined,
  const Model extends AppProviderBindings["model"] = undefined,
  const Realtime extends AppProviderBindings["realtime"] = undefined,
  const AgentState extends AppProviderBindings["agent-state"] = undefined,
  const Exporters extends TelemetryExporterMap = Readonly<
    Record<string, TelemetryExporterDescriptor<string, string, object>>
  >,
>(
  options: DefineAppOptions<
    Shape,
    DefineAppBindings<Bucket, Cache, Jobs, Event, Model, Realtime, AgentState>,
    Exporters
  >,
) => ApplicationDescriptor<
  Shape,
  DefineAppBindings<Bucket, Cache, Jobs, Event, Model, Realtime, AgentState>,
  Exporters
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/define-app.ts#L125)

Since v0.2.0

## Complete reference

## Public imports

- `relkit/effect` — 24 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                                                                                                                             |
| -------------------------------------------------------------------------- | ----- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| [callGraphNodeEffect](/docs/api/functions#callgraphnodeeffect)             | Value | `relkit/effect` | [API example](/docs/api/functions#callgraphnodeeffect)                                                                              |
| [callToolEffect](/docs/api/functions#calltooleffect)                       | Value | `relkit/effect` | [API example](/docs/api/functions#calltooleffect)                                                                                   |
| [defineAgentEffect](/docs/api/agents#defineagenteffect)                    | Value | `relkit/effect` | [Source example](https://github.com/rel-kit/relkit/blob/main/integrations/packages/langchain/tests/define-agent-effect.test.ts#L26) |
| [defineAppEffect](/docs/api/app#defineappeffect)                           | Value | `relkit/effect` | [API example](/docs/api/app#defineappeffect)                                                                                        |
| [defineBucketEffect](/docs/api/buckets#definebucketeffect)                 | Value | `relkit/effect` | [API example](/docs/api/buckets#definebucketeffect)                                                                                 |
| [defineCacheEffect](/docs/api/cache#definecacheeffect)                     | Value | `relkit/effect` | [API example](/docs/api/cache#definecacheeffect)                                                                                    |
| [defineChannelEffect](/docs/api/realtime#definechanneleffect)              | Value | `relkit/effect` | [API example](/docs/api/realtime#definechanneleffect)                                                                               |
| [defineConstantsEffect](/docs/api/app#defineconstantseffect)               | Value | `relkit/effect` | [API example](/docs/api/app#defineconstantseffect)                                                                                  |
| [defineEnvEffect](/docs/api/config#defineenveffect)                        | Value | `relkit/effect` | [API example](/docs/api/config#defineenveffect)                                                                                     |
| [defineErrorEffect](/docs/api/functions#defineerroreffect)                 | Value | `relkit/effect` | [API example](/docs/api/functions#defineerroreffect)                                                                                |
| [defineFunctionEffect](/docs/api/functions#definefunctioneffect)           | Value | `relkit/effect` | [API example](/docs/api/functions#definefunctioneffect)                                                                             |
| [defineJobEffect](/docs/api/jobs#definejobeffect)                          | Value | `relkit/effect` | [API example](/docs/api/jobs#definejobeffect)                                                                                       |
| [defineMiddlewareEffect](/docs/api/routes#definemiddlewareeffect)          | Value | `relkit/effect` | [API example](/docs/api/routes#definemiddlewareeffect)                                                                              |
| [definePromptEffect](/docs/api/app#defineprompteffect)                     | Value | `relkit/effect` | [API example](/docs/api/app#defineprompteffect)                                                                                     |
| [defineRouteEffect](/docs/api/routes#definerouteeffect)                    | Value | `relkit/effect` | [API example](/docs/api/routes#definerouteeffect)                                                                                   |
| [defineServiceEffect](/docs/api/services#defineserviceeffect)              | Value | `relkit/effect` | [API example](/docs/api/services#defineserviceeffect)                                                                               |
| [defineServiceRoutesEffect](/docs/api/routes#defineservicerouteseffect)    | Value | `relkit/effect` | [API example](/docs/api/routes#defineservicerouteseffect)                                                                           |
| [defineTaskEffect](/docs/api/jobs#definetaskeffect)                        | Value | `relkit/effect` | [API example](/docs/api/jobs#definetaskeffect)                                                                                      |
| [defineToolEffect](/docs/api/tools#definetooleffect)                       | Value | `relkit/effect` | [API example](/docs/api/tools#definetooleffect)                                                                                     |
| [defineTransformEffect](/docs/api/routes#definetransformeffect)            | Value | `relkit/effect` | [API example](/docs/api/routes#definetransformeffect)                                                                               |
| [failEffect](/docs/api/functions#faileffect)                               | Value | `relkit/effect` | [API example](/docs/api/functions#faileffect)                                                                                       |
| [FunctionOperationError](/docs/api/functions#functionoperationerror-class) | Value | `relkit/effect` | [API example](/docs/api/functions#functionoperationerror-class)                                                                     |
| [httpEffects](/docs/api/routes#httpeffects)                                | Value | `relkit/effect` | [API example](/docs/api/routes#httpeffects)                                                                                         |
| [streamOfEffect](/docs/api/functions#streamofeffect)                       | Value | `relkit/effect` | [API example](/docs/api/functions#streamofeffect)                                                                                   |

## `agents.ts`

### "../agents/index.js" (namespace export)

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

**Signature**

```ts
export * from "../agents/index.js";
```

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

## `app-config.types.ts`

Declares server exposure and optional HTTP capability selection without loading
native SDKs. Compiler validation supplies defaults before runtime generation;
inspector settings select only the development bridge, independently of a tool.

### ApiDocsConfig (interface)

API documentation visibility and domain exclusions.

**Example**

```ts
const docs: ApiDocsConfig = { enabledInProduction: false };
```

**Signature**

```ts
export interface ApiDocsConfig {
  /** Explicitly selects Scalar; omitted/false keeps JSON OpenAPI only. */
  readonly ui?: "scalar" | false;
  /** Serves the OpenAPI document and the reference in production too. Defaults to `false`. */
  readonly enabledInProduction?: boolean;
  /** Services left out of the served document; their routes still answer. */
  readonly excludeDomains?: readonly string[];
}
```

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

### InspectorConfig (interface)

Development bridge selection; installing or running the UI is independent.

**Example**

```ts
const inspector: InspectorConfig = { enabled: true };
```

**Signature**

```ts
export interface InspectorConfig extends InspectorConfigurationInput {
  /** Starts the bridge the Inspector connects to. Defaults to `false`. */
  readonly enabled?: boolean;
  /** Address the bridge listens on; port `0` takes a free port. */
  readonly connection?: { readonly host?: string; readonly port?: number };
  /** Largest payload preview the bridge returns, in bytes. Defaults to 1,048,576. */
  readonly maxPreviewBytes?: number;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/app-config.types.ts#L45)

### ServerConfig (interface)

HTTP server settings attached to an application descriptor.

**Example**

```ts
const server: ServerConfig = { port: 3000, apiDocs: { enabledInProduction: false } };
```

**Signature**

```ts
export interface ServerConfig {
  /** Port the HTTP server listens on. */
  readonly port?: number;
  /** Largest request body in bytes; a larger one is answered `413`. A route can set its own. */
  readonly maxBodyBytes?: number;
  /** The served OpenAPI document and its reference page. */
  readonly apiDocs?: ApiDocsConfig;
  /** Serves the contract that the generated client reads. */
  readonly clientContract?: boolean;
  /** Enables the MCP endpoint; `{ auth: "required" }` limits it to signed-in callers. */
  readonly mcp?: boolean | { readonly auth?: "required" };
  /** Explicitly selects the optional AG-UI HTTP protocol independently of agent RPC. */
  readonly agUi?: boolean;
  /** Runs once after the application's providers are ready and before the server accepts
   * requests; `getRelkit()` returns the application's handle inside it. A rejection stops startup.
   * @example onStart: async () => { await getRelkit().functions.catalog.warmPrices({}); }
   */
  readonly onStart?: () => void | Promise<void>;
}
```

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

## `app-observability.ts`

### AppTelemetry (class)

Injectable observer for application authoring operations.

**Example**

```ts
Effect.provide(defineAppEffect(options), AppTelemetryLive);
```

**Signature**

```ts
declare class AppTelemetry
```

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

### AppTelemetryLive

Live spans, counts, failures, and durations for application operations.

**Example**

```ts
Effect.provide(defineAppEffect(options), AppTelemetryLive);
```

**Signature**

```ts
declare const AppTelemetryLive: Layer.Layer<AppTelemetry, never, never>;
```

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

### observeApp

Applies an injected observer or the live observer to one operation.

**Example**

```ts
observeApp("define", Effect.succeed(app));
```

**Signature**

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

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

## `app-observability.types.ts`

Defines bounded application-authoring operation labels and the injectable
observer contract. Observers preserve each operation's success/error/services
while the live implementation records its spans and outcomes.

### AppOperation (type alias)

Fixed operation labels used for application authoring telemetry.

**Example**

```ts
const operation: AppOperation = "define";
```

**Signature**

```ts
type AppOperation =
  | "define"
  | "env.isDefinition"
  | "id.derive"
  | "runtimeMetadata.normalize"
  | "constants.define"
  | "prompt.define"
  | "context.create"
  | "context.resolve";
```

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

### AppTelemetryService (interface)

A replaceable observer for application authoring operations.

**Example**

```ts
const observer: AppTelemetryService = { observe: (_name, effect) => effect };
```

**Signature**

```ts
export interface AppTelemetryService {
  /** Surrounds one operation without changing its result.
   * @param operation - A fixed operation label.
   * @param effect - The operation to observe.
   * @returns The observed Effect with its success and error channels intact.
   * @example observer.observe("define", Effect.succeed(app));
   */
  readonly observe: <A, E, R>(
    operation: AppOperation,
    effect: Effect.Effect<A, E, R>,
  ) => Effect.Effect<A, E, R>;
}
```

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

## `app-provider-capabilities.ts`

Provider capabilities accepted by application descriptors.

### APP_PROVIDER_CAPABILITIES

Provider capabilities accepted by application descriptors.

**Signature**

```ts
declare const APP_PROVIDER_CAPABILITIES: readonly [
  "bucket",
  "cache",
  "job",
  "event",
  "model",
  "realtime",
  "agent-state",
];
```

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

## `app-provider-normalization.ts`

### copyEffect

Copies a serializable configuration value through RelKit's serializer.

**Example**

```ts
Effect.runSync(copyEffect({ port: 3000 }));
```

**Signature**

```ts
declare const copyEffect: <Value>(
  value: Value,
) => Effect.Effect<Value, AppValidationFailure, never>;
```

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

### normalizeDefaultsEffect

Checks default profile selections and returns an immutable copy.

**Example**

```ts
Effect.runSync(normalizeDefaultsEffect({}, undefined));
```

**Signature**

```ts
declare const normalizeDefaultsEffect: <Providers extends AppProviderBindings>(
  providers: Partial<
    Record<
      "bucket" | "cache" | "job" | "event" | "model" | "realtime" | "agent-state",
      NormalizedProviderProfiles<ProviderAdapter>
    >
  >,
  defaults: AppProviderDefaults<Providers> | undefined,
) => Effect.Effect<
  Readonly<{
    bucket?: ProfileFor<Providers, "bucket">;
    cache?: ProfileFor<Providers, "cache">;
    job?: ProfileFor<Providers, "job">;
    event?: ProfileFor<Providers, "event">;
    model?: ProfileFor<Providers, "model">;
    realtime?: ProfileFor<Providers, "realtime">;
    "agent-state"?: ProfileFor<Providers, "agent-state">;
  }>,
  AppValidationFailure,
  never
>;
```

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

### normalizeProvidersEffect

Normalizes configured provider profiles in capability order.

**Example**

```ts
Effect.runSync(normalizeProvidersEffect({}));
```

**Signature**

```ts
declare const normalizeProvidersEffect: (
  options: AppProviderBindings,
) => Effect.Effect<
  Partial<
    Record<
      "bucket" | "cache" | "job" | "event" | "model" | "realtime" | "agent-state",
      NormalizedProviderProfiles<ProviderAdapter>
    >
  >,
  AppValidationFailure,
  never
>;
```

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

## `app-provider.types.ts`

### AppProviderBinding (type alias)

The binding of one capability among the bindings of a `defineApp` call, or `undefined`.

**Example**

```ts
type Cache = AppProviderBinding<{ cache: typeof redisAdapter }, "cache">;
```

**Signature**

```ts
type AppProviderBinding<Providers, Key> = Key extends keyof Providers ? Providers[Key] : undefined;
```

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

### AppProviderBindings (type alias)

Provider bindings as one `defineApp` call infers them: a capability the call leaves out is
`undefined`, which is how a default for it is told apart from a default for a bound one.

**Example**

```ts
const bindings: AppProviderBindings = { cache: redisAdapter, bucket: undefined };
```

**Signature**

```ts
type AppProviderBindings = {
  readonly [Key in keyof AppProviderInputs]?: AppProviderInputs[Key] | undefined;
};
```

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

### AppProviderCapability (type alias)

Provider capabilities accepted by the application descriptor.

**Example**

```ts
const capability: AppProviderCapability = "cache";
```

**Signature**

```ts
type AppProviderCapability = (typeof APP_PROVIDER_CAPABILITIES)[number];
```

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

### AppProviderDefaults (type alias)

Default profile per capability, named as the options are (`jobs`, not `job`). Each entry
accepts the profile names of that capability's binding, or `"default"` for a single adapter.

**Example**

```ts
const defaults: AppProviderDefaults<typeof providers> = { cache: "default" };
```

**Signature**

```ts
type AppProviderDefaults<Providers extends AppProviderBindings> = {
  // NoInfer: a default never decides what a binding is; it is only checked against it.
  readonly [Key in keyof AppProviderInputs]?: NoInfer<
    DefaultProfile<AppProviderBinding<Providers, Key>, Key>
  >;
};
```

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

### AppProviderInputs (interface)

Optional provider bindings for every supported capability.

**Example**

```ts
const providers: AppProviderInputs = { cache: redisAdapter };
```

**Signature**

```ts
export interface AppProviderInputs {
  /** Object storage for buckets: one adapter, or a map of named profiles. */
  readonly bucket?: CapabilityInput<"bucket">;
  /** Key-value storage for caches: one adapter, or a map of named profiles. */
  readonly cache?: CapabilityInput<"cache">;
  /** The backend that runs jobs and tasks: one adapter, or a map of named profiles. */
  readonly jobs?: CapabilityInput<"job">;
  /** The transport that delivers events: one adapter, or a map of named profiles. */
  readonly event?: CapabilityInput<"event">;
  /** Language models for agents: one adapter, or a map of named profiles. */
  readonly model?: CapabilityInput<"model">;
  /** The transport of realtime channels: one adapter, or a map of named profiles. */
  readonly realtime?: CapabilityInput<"realtime">;
  /** Storage for agent threads and runs: one adapter, or a map of named profiles. */
  readonly "agent-state"?: CapabilityInput<"agent-state">;
}
```

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

### AppProviderOptions (type alias)

The provider options of `defineApp`, one property per capability so that each binding is
inferred from its own property.

**Example**

```ts
const options: AppProviderOptions<{ cache: typeof redisAdapter }> = { cache: redisAdapter };
```

**Signature**

```ts
type AppProviderOptions<Providers extends AppProviderBindings> = {
  readonly [Key in keyof AppProviderInputs]?: AppProviderBinding<Providers, Key>;
};
```

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

### ApplicationProfilesOf (type alias)

The profile names of an application per capability, from the type of its descriptor. The
generated context registry uses it to type `profile` in buckets, caches, events and channels.
A capability without a provider has no names.

**Example**

```ts
interface ApplicationProfiles extends ApplicationProfilesOf<typeof app> {}
```

**Signature**

```ts
type ApplicationProfilesOf<Application> = Application extends {
  readonly defaults: infer Defaults;
}
  ? { readonly [Capability in keyof Defaults]-?: NonNullable<Defaults[Capability]> }
  : {};
```

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

### NoProviderConfigured (interface)

The type a `defaults` entry has when the application binds no provider to its capability, so
the type error on that entry names the capability.

**Example**

```ts
const missing: NoProviderConfigured<"cache"> = { capability: "cache" };
```

**Signature**

```ts
export interface NoProviderConfigured<Capability extends string> {
  readonly capability: Capability;
}
```

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

### NormalizedAppProviderDefaults (type alias)

Validated default profiles keyed by normalized capability names.

**Example**

```ts
const defaults: NormalizedAppProviderDefaults<typeof providers> = { cache: "default" };
```

**Signature**

```ts
type NormalizedAppProviderDefaults<Providers extends AppProviderBindings> = Readonly<{
  [Capability in AppProviderCapability]?: ProfileFor<Providers, Capability>;
}>;
```

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

### NormalizedProviders (type alias)

Provider profiles inferred from the authored provider bindings.

**Example**

```ts
type Profiles = NormalizedProviders<typeof providers>;
```

**Signature**

```ts
type NormalizedProviders<Providers extends AppProviderBindings> = {
  readonly [
    Capability in AppProviderCapability as [ProviderInputFor<Providers, Capability>] extends [never]
      ? never
      : Capability
  ]: NormalizedProviderProfiles<AdapterOf<ProviderInputFor<Providers, Capability>>>;
};
```

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

## `app-runtime-metadata.ts`

Copies application server/deployment metadata and validates optional inspection
selection before descriptor freezing. These pure authoring effects acquire no
listeners or providers; invalid input retains the public validation cause.

### normalizeAppRuntimeMetadataEffect

Normalizes immutable runtime policy without starting its selected features.

**Signature**

```ts
declare const normalizeAppRuntimeMetadataEffect: (
  options: Pick<ApplicationDescriptor, "server" | "inspector" | "deployment" | "check">,
) => Effect.Effect<
  {
    server:
      | {
          port?: number;
          maxBodyBytes?: number;
          apiDocs?: ApiDocsConfig;
          clientContract?: boolean;
          mcp?: boolean | { readonly auth?: "required" };
          agUi?: boolean;
        }
      | undefined;
    inspector: InspectorConfiguration | undefined;
    deployment: Readonly<Record<string, JsonValue>> | undefined;
    check: AppCheckConfig | undefined;
  },
  AppValidationFailure,
  never
>;
```

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

## `app-validation.ts`

### AppValidationFailure (class)

Expected invalid application input with the original cause preserved.

**Example**

```ts
if (error._tag === "AppValidationFailure") console.error(error.message);
```

**Signature**

```ts
declare class AppValidationFailure
```

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

### deriveApplicationId

Synchronous package-name ID adapter.

**Throws**

The original normalization error for invalid input.

**Example**

```ts
deriveApplicationId("@acme/orders");
```

**Signature**

```ts
declare const deriveApplicationId: (packageName: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/app-validation.ts#L74)

### deriveApplicationIdEffect

Derives an application ID from a package name in Effect.

**Example**

```ts
Effect.runSync(deriveApplicationIdEffect("@acme/orders"));
```

**Signature**

```ts
declare const deriveApplicationIdEffect: (
  packageName: string,
) => Effect.Effect<StableId, AppValidationFailure, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/app-validation.ts#L54)

### isEnvDefinition

Synchronous environment descriptor guard.

**Example**

```ts
if (isEnvDefinition(value)) console.log(value.shape);
```

**Signature**

```ts
declare const isEnvDefinition: (value: unknown) => value is EnvDefinition<EnvShape>;
```

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

### isEnvDefinitionEffect

Checks the complete environment descriptor shape in Effect.

**Example**

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

**Signature**

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

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

## `buckets.ts`

### "../buckets/index.js" (namespace export)

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

**Signature**

```ts
export * from "../buckets/index.js";
```

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

## `cache.ts`

### "../cache/index.js" (namespace export)

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

**Signature**

```ts
export * from "../cache/index.js";
```

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

## `config.ts`

### "../config/index.js" (namespace export)

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

**Signature**

```ts
export * from "../config/index.js";
```

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

### "./app-validation.js" (namespace export)

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

**Signature**

```ts
export * from "./app-validation.js";
```

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

### "./context-descriptors.js" (namespace export)

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

**Signature**

```ts
export * from "./context-descriptors.js";
```

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

### "./define-app.js" (namespace export)

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

**Signature**

```ts
export * from "./define-app.js";
```

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

### AppTelemetry

**Signature**

```ts
declare const AppTelemetry: typeof AppTelemetry;
```

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

### AppTelemetryLive

**Signature**

```ts
declare const AppTelemetryLive: Layer<AppTelemetry, never, never>;
```

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

## `context-descriptors.ts`

### "./context-descriptors.types.js" (namespace export)

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

**Signature**

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

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

### ContextDescriptorFailure (class)

Expected invalid constant or prompt descriptor input.

**Example**

```ts
if (error._tag === "ContextDescriptorFailure") console.error(error.message);
```

**Signature**

```ts
declare class ContextDescriptorFailure
```

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

### defineConstants

Synchronous constants descriptor adapter.

**Throws**

The original validation error for invalid values.

**Example**

```ts
import { defineConstants, defineEnv, env } from "relkit";
const environment = defineEnv({ REGION: env.string() });
const limits = defineConstants({ maxItems: 20, region: environment.REGION });
// Literal values are immutable; the environment reference resolves with the context.
```

**See**

- https://relkit.dev/docs/modules/service/context-values

**Signature**

```ts
declare const defineConstants: <const Values extends ConstantsShape>(
  values: Values,
  options?: ContextDescriptorOptions,
) => ConstantsDescriptor<Values>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-descriptors.ts#L69)

### defineConstantsEffect

Defines a frozen constants descriptor in Effect.

**Example**

```ts
Effect.runSync(defineConstantsEffect({ region: "eu" }));
```

**Signature**

```ts
declare const defineConstantsEffect: <const Values extends ConstantsShape>(
  values: Values,
  options?: ContextDescriptorOptions | undefined,
) => Effect.Effect<ConstantsDescriptor<Values>, ContextDescriptorFailure, never>;
```

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

### definePrompt

Synchronous prompt descriptor adapter.

**Throws**

The original validation error for invalid text.

**Example**

```ts
import { definePrompt } from "relkit";
const support = definePrompt(["Use the order details.", "Do not invent delivery dates."]);
// support.value preserves the two fragments in order.
```

**See**

- https://relkit.dev/docs/modules/service/context-values

**Signature**

```ts
declare const definePrompt: <const Value extends PromptValue>(
  value: Value,
  options?: ContextDescriptorOptions,
) => PromptDescriptor<Value>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-descriptors.ts#L121)

### definePromptEffect

Defines a frozen prompt descriptor in Effect.

**Example**

```ts
Effect.runSync(definePromptEffect("Be concise."));
```

**Signature**

```ts
declare const definePromptEffect: <const Value extends PromptValue>(
  value: Value,
  options?: ContextDescriptorOptions | undefined,
) => Effect.Effect<PromptDescriptor<Value>, ContextDescriptorFailure, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-descriptors.ts#L81)

## `context-descriptors.types.ts`

### ConstantResolver (type alias)

Computes one constant for each context resolution.

**Example**

```ts
const region: ConstantResolver<string> = ({ env }) => String(env.REGION);
```

**Signature**

```ts
type ConstantResolver<Value = unknown> = (options: ContextResolverOptions) => MaybePromise<Value>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-descriptors.types.ts#L17)

### ConstantValue (type alias)

Accepted static, environment, or dynamic constant input.

**Example**

```ts
const value: ConstantValue = "eu-west-1";
```

**Signature**

```ts
type ConstantValue = JsonValue | EnvRef | ConstantResolver;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-descriptors.types.ts#L24)

### ConstantsDescriptor (interface)

Immutable descriptor for one set of constants.

**Example**

```ts
const descriptor: ConstantsDescriptor = defineConstants({ region: "eu" });
```

**Signature**

```ts
export interface ConstantsDescriptor<
  Values extends ConstantsShape = ConstantsShape,
> extends DescriptorBase<"constants", string> {
  readonly values: Values;
}
```

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

### ConstantsShape (type alias)

Named constant inputs for one descriptor.

**Example**

```ts
const values: ConstantsShape = { region: "eu-west-1" };
```

**Signature**

```ts
type ConstantsShape = Readonly<Record<string, ConstantValue>>;
```

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

### ContextDescriptorOptions (interface)

Optional stable identity for a context descriptor.

**Example**

```ts
const options: ContextDescriptorOptions = { id: "support.prompt" };
```

**Signature**

```ts
export interface ContextDescriptorOptions {
  readonly id?: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-descriptors.types.ts#L58)

### ContextResolverOptions (interface)

Inputs available to a dynamic constant resolver.

**Example**

```ts
const options: ContextResolverOptions = { env: {}, signal, log };
```

**Signature**

```ts
export interface ContextResolverOptions {
  readonly env: Readonly<Record<string, unknown>>;
  readonly signal: AbortSignal;
  readonly log: PublicLogger;
}
```

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

### PromptDescriptor (interface)

Immutable descriptor for one prompt.

**Example**

```ts
const descriptor: PromptDescriptor = definePrompt("Be concise.");
```

**Signature**

```ts
export interface PromptDescriptor<Value extends PromptValue = PromptValue> extends DescriptorBase<
  "prompt",
  string
> {
  readonly value: Value;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-descriptors.types.ts#L48)

### PromptValue (type alias)

Prompt text or an ordered list of prompt fragments.

**Example**

```ts
const prompt: PromptValue = ["Be concise.", "Use tools."];
```

**Signature**

```ts
type PromptValue = string | readonly string[];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-descriptors.types.ts#L43)

### ResolvedConstants (type alias)

Resolved values inferred from a constants descriptor.

**Example**

```ts
type Values = ResolvedConstants<typeof constants>;
```

**Signature**

```ts
type ResolvedConstants<Descriptor extends ConstantsDescriptor> = {
  readonly [Key in keyof Descriptor["values"]]: ResolveConstant<Descriptor["values"][Key]>;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-descriptors.types.ts#L65)

### ResolvedPrompt (type alias)

Resolved prompt text inferred from a prompt descriptor.

**Example**

```ts
type Text = ResolvedPrompt<typeof prompt>;
```

**Signature**

```ts
type ResolvedPrompt<Descriptor extends PromptDescriptor> = Descriptor["value"];
```

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

## `context-resolution-service.ts`

### AppConstantRunner (class)

Replaceable boundary for dynamic constant callback execution.

**Example**

```ts
Effect.provide(resolver.resolveEffect(context), AppConstantRunnerLive);
```

**Signature**

```ts
declare class AppConstantRunner
```

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

### AppConstantRunnerLive

Live runner that propagates Effect interruption into callback AbortSignals.

**Example**

```ts
Effect.provide(resolver.resolveEffect(context), AppConstantRunnerLive);
```

**Signature**

```ts
declare const AppConstantRunnerLive: Layer.Layer<AppConstantRunner, never, never>;
```

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

### AppConstantRunnerPromiseLive

Compatibility runner that passes the caller's exact signal to callbacks.

**Signature**

```ts
declare const AppConstantRunnerPromiseLive: Layer.Layer<AppConstantRunner, never, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-resolution-service.ts#L27)

### AppConstantRunnerService

Replaceable execution boundary for dynamic constant callbacks.

**Example**

```ts
const runner: AppConstantRunnerService = { run: () => Effect.succeed("eu") };
```

**Signature**

```ts
export interface AppConstantRunnerService {
  /** Invokes a dynamic constant resolver.
   * @param resolver - User supplied constant callback.
   * @param options - Environment, logger, and caller signal available to the callback.
   * @returns The callback result or ContextResolutionFailure.
   * @example runner.run(() => "eu", { env: {}, log });
   */
  readonly run: (
    resolver: ConstantResolver,
    options: {
      readonly env: Readonly<Record<string, unknown>>;
      readonly log: PublicLogger;
      readonly signal: AbortSignal;
    },
  ) => Effect.Effect<unknown, ContextResolutionFailure>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-resolution-service.types.ts#L9)

## `context-resolution-service.types.ts`

### AppConstantRunnerService (interface)

Replaceable execution boundary for dynamic constant callbacks.

**Example**

```ts
const runner: AppConstantRunnerService = { run: () => Effect.succeed("eu") };
```

**Signature**

```ts
export interface AppConstantRunnerService {
  /** Invokes a dynamic constant resolver.
   * @param resolver - User supplied constant callback.
   * @param options - Environment, logger, and caller signal available to the callback.
   * @returns The callback result or ContextResolutionFailure.
   * @example runner.run(() => "eu", { env: {}, log });
   */
  readonly run: (
    resolver: ConstantResolver,
    options: {
      readonly env: Readonly<Record<string, unknown>>;
      readonly log: PublicLogger;
      readonly signal: AbortSignal;
    },
  ) => Effect.Effect<unknown, ContextResolutionFailure>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-resolution-service.types.ts#L9)

## `context-resolver.ts`

### "./context-resolver.types.js" (namespace export)

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

**Signature**

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

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

### ContextResolutionFailure (class)

Expected context registration or resolution failure with its original cause.

**Example**

```ts
if (error._tag === "ContextResolutionFailure") console.error(error.message);
```

**Signature**

```ts
declare class ContextResolutionFailure
```

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

### createApplicationContextResolver

Builds a context resolver synchronously for existing application callers.

**Throws**

TypeError when constant names collide.

**Example**

```ts
createApplicationContextResolver({ env: {} });
```

**Signature**

```ts
declare const createApplicationContextResolver: (
  options: ApplicationContextOptions,
) => ApplicationContextResolver;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-resolver.ts#L111)

### createApplicationContextResolverEffect

Builds an application context resolver in Effect.

**Example**

```ts
Effect.runSync(createApplicationContextResolverEffect({ env: {} }));
```

**Signature**

```ts
declare const createApplicationContextResolverEffect: (
  options: ApplicationContextOptions,
) => Effect.Effect<ApplicationContextResolver, ContextResolutionFailure, never>;
```

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

## `context-resolver.types.ts`

### ApplicationContextOptions (interface)

Static and dynamic descriptor inputs for one context resolver.

**Example**

```ts
const options: ApplicationContextOptions = { env: {} };
```

**Signature**

```ts
export interface ApplicationContextOptions {
  readonly constants?: Readonly<Record<string, ConstantsDescriptor>>;
  readonly prompts?: Readonly<Record<string, PromptDescriptor>>;
  readonly env: Readonly<Record<string, unknown>>;
}
```

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

### ApplicationContextResolver (interface)

Resolves the current application constants and prompts.

**Example**

```ts
const resolver: ApplicationContextResolver = createApplicationContextResolver({ env: {} });
```

**Signature**

```ts
export interface ApplicationContextResolver {
  /** Resolves values in Effect with a replaceable constant runner.
   * @param options - Logger and cancellation signal.
   * @returns Resolved values or ContextResolutionFailure; requires AppConstantRunner.
   * @example Effect.runPromise(resolver.resolveEffect(context).pipe(Effect.provide(AppConstantRunnerLive)));
   */
  readonly resolveEffect: (
    options: ApplicationResolveOptions,
  ) => Effect.Effect<ResolvedApplicationContext, ContextResolutionFailure, AppConstantRunner>;
  /** Promise compatibility adapter for application handlers.
   * @param options - Logger and cancellation signal.
   * @returns Resolved values or a rejection with the original resolver error.
   * @example await resolver.resolve({ signal, log });
   */
  readonly resolve: (options: ApplicationResolveOptions) => Promise<ResolvedApplicationContext>;
}
```

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

### ApplicationResolveOptions (interface)

Invocation inputs required to resolve dynamic constants.

**Example**

```ts
const context: ApplicationResolveOptions = { signal, log };
```

**Signature**

```ts
export interface ApplicationResolveOptions {
  readonly signal: AbortSignal;
  readonly log: PublicLogger;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-resolver.types.ts#L23)

### ResolvedApplicationContext (interface)

Context values produced by a resolver invocation.

**Example**

```ts
const constants = resolved.constants;
```

**Signature**

```ts
export interface ResolvedApplicationContext {
  readonly constants: Readonly<Record<string, unknown>>;
  readonly prompts: Readonly<Record<string, PromptValue>>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/context-resolver.types.ts#L31)

## `define-app.ts`

Constructs immutable application descriptors without acquiring providers or
optional tools. Shared bridge validation rejects obsolete inspection settings;
the synchronous facade preserves original validation errors for authors.

### "./define-app.types.js" (namespace export)

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

**Signature**

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

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

### APP_PROVIDER_CAPABILITIES

**Signature**

```ts
declare const APP_PROVIDER_CAPABILITIES: readonly [
  "bucket",
  "cache",
  "job",
  "event",
  "model",
  "realtime",
  "agent-state",
];
```

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

### defineAppEffect

Defines one immutable application topology in Effect.

**Example**

```ts
Effect.runSync(defineAppEffect({ env: defineEnv({}) }));
```

**Signature**

```ts
declare const defineAppEffect: <
  const Shape extends EnvShape,
  const Bucket extends AppProviderBindings["bucket"] = undefined,
  const Cache extends AppProviderBindings["cache"] = undefined,
  const Jobs extends AppProviderBindings["jobs"] = undefined,
  const Event extends AppProviderBindings["event"] = undefined,
  const Model extends AppProviderBindings["model"] = undefined,
  const Realtime extends AppProviderBindings["realtime"] = undefined,
  const AgentState extends AppProviderBindings["agent-state"] = undefined,
  const Exporters extends TelemetryExporterMap = Readonly<
    Record<string, TelemetryExporterDescriptor<string, string, object>>
  >,
>(
  options: DefineAppOptions<
    Shape,
    DefineAppBindings<Bucket, Cache, Jobs, Event, Model, Realtime, AgentState>,
    Exporters
  >,
) => Effect.Effect<
  ApplicationDescriptor<
    Shape,
    DefineAppBindings<Bucket, Cache, Jobs, Event, Model, Realtime, AgentState>,
    Exporters
  >,
  AppValidationFailure,
  never
>;
```

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

## `define-app.types.ts`

### ApiDocsConfig

API documentation visibility and domain exclusions.

**Example**

```ts
const docs: ApiDocsConfig = { enabledInProduction: false };
```

**Signature**

```ts
export interface ApiDocsConfig {
  /** Explicitly selects Scalar; omitted/false keeps JSON OpenAPI only. */
  readonly ui?: "scalar" | false;
  /** Serves the OpenAPI document and the reference in production too. Defaults to `false`. */
  readonly enabledInProduction?: boolean;
  /** Services left out of the served document; their routes still answer. */
  readonly excludeDomains?: readonly string[];
}
```

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

### AppCheckConfig (interface)

Opt-in `relkit check` rules.

**Example**

```ts
const check: AppCheckConfig = { unusedErrors: true };
```

**Signature**

```ts
export interface AppCheckConfig {
  /** Warn when a function declares an error that its handler never raises. Defaults to `false`. */
  readonly unusedErrors?: boolean;
}
```

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

### AppDeploymentConfig (type alias)

JSON deployment metadata attached to the application descriptor.

**Example**

```ts
const deployment: AppDeploymentConfig = { engine: "pulumi" };
```

**Signature**

```ts
type AppDeploymentConfig = Readonly<Record<string, JsonValue>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/define-app.types.ts#L47)

### AppProviderBinding

The binding of one capability among the bindings of a `defineApp` call, or `undefined`.

**Example**

```ts
type Cache = AppProviderBinding<{ cache: typeof redisAdapter }, "cache">;
```

**Signature**

```ts
type AppProviderBinding<Providers, Key> = Key extends keyof Providers ? Providers[Key] : undefined;
```

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

### AppProviderBindings

Provider bindings as one `defineApp` call infers them: a capability the call leaves out is
`undefined`, which is how a default for it is told apart from a default for a bound one.

**Example**

```ts
const bindings: AppProviderBindings = { cache: redisAdapter, bucket: undefined };
```

**Signature**

```ts
type AppProviderBindings = {
  readonly [Key in keyof AppProviderInputs]?: AppProviderInputs[Key] | undefined;
};
```

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

### AppProviderCapability

**Signature**

```ts
declare const AppProviderCapability:
  "bucket" | "cache" | "job" | "event" | "model" | "realtime" | "agent-state";
```

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

### AppProviderDefaults

Default profile per capability, named as the options are (`jobs`, not `job`). Each entry
accepts the profile names of that capability's binding, or `"default"` for a single adapter.

**Example**

```ts
const defaults: AppProviderDefaults<typeof providers> = { cache: "default" };
```

**Signature**

```ts
type AppProviderDefaults<Providers extends AppProviderBindings> = {
  // NoInfer: a default never decides what a binding is; it is only checked against it.
  readonly [Key in keyof AppProviderInputs]?: NoInfer<
    DefaultProfile<AppProviderBinding<Providers, Key>, Key>
  >;
};
```

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

### AppProviderInputs

Optional provider bindings for every supported capability.

**Example**

```ts
const providers: AppProviderInputs = { cache: redisAdapter };
```

**Signature**

```ts
export interface AppProviderInputs {
  /** Object storage for buckets: one adapter, or a map of named profiles. */
  readonly bucket?: CapabilityInput<"bucket">;
  /** Key-value storage for caches: one adapter, or a map of named profiles. */
  readonly cache?: CapabilityInput<"cache">;
  /** The backend that runs jobs and tasks: one adapter, or a map of named profiles. */
  readonly jobs?: CapabilityInput<"job">;
  /** The transport that delivers events: one adapter, or a map of named profiles. */
  readonly event?: CapabilityInput<"event">;
  /** Language models for agents: one adapter, or a map of named profiles. */
  readonly model?: CapabilityInput<"model">;
  /** The transport of realtime channels: one adapter, or a map of named profiles. */
  readonly realtime?: CapabilityInput<"realtime">;
  /** Storage for agent threads and runs: one adapter, or a map of named profiles. */
  readonly "agent-state"?: CapabilityInput<"agent-state">;
}
```

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

### AppProviderOptions

The provider options of `defineApp`, one property per capability so that each binding is
inferred from its own property.

**Example**

```ts
const options: AppProviderOptions<{ cache: typeof redisAdapter }> = { cache: redisAdapter };
```

**Signature**

```ts
type AppProviderOptions<Providers extends AppProviderBindings> = {
  readonly [Key in keyof AppProviderInputs]?: AppProviderBinding<Providers, Key>;
};
```

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

### AppTelemetryConfig (interface)

Application telemetry settings parameterized by exporters.

**Example**

```ts
const telemetry: AppTelemetryConfig = { redaction: { mode: "off" } };
```

**Signature**

```ts
export interface AppTelemetryConfig<
  Exporters extends TelemetryExporterMap = TelemetryExporterMap,
> extends TelemetryConfiguration<Exporters> {
  /** Which signals are recorded; all of them when omitted. */
  readonly capture?: NonNullable<TelemetryConfiguration<Exporters>["capture"]>;
  /** How recorded payloads are redacted, and the largest payload kept. */
  readonly redaction?: NonNullable<TelemetryConfiguration<Exporters>["redaction"]>;
  /** Limits of the local store: records, age and bytes. */
  readonly localRetention?: NonNullable<TelemetryConfiguration<Exporters>["localRetention"]>;
  /** Share of traces and lowest log level sent to exporters. */
  readonly exportSampling?: NonNullable<TelemetryConfiguration<Exporters>["exportSampling"]>;
  /** Exporters by name, such as `otlp()` or `sentry()`. */
  readonly exporters?: Exporters;
}
```

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

### ApplicationDescriptor (type alias)

Immutable normalized application descriptor returned by `defineApp`.

**Example**

```ts
const descriptor: ApplicationDescriptor = defineApp({ env: defineEnv({}) });
```

**Signature**

```ts
type ApplicationDescriptor<
  Shape extends EnvShape = EnvShape,
  Providers extends AppProviderBindings = AppProviderBindings,
  Exporters extends TelemetryExporterMap = TelemetryExporterMap,
> = DescriptorBase<"app", string> &
  NormalizedProviders<Providers> & {
    readonly env: EnvDefinition<Shape>;
    readonly defaults: NormalizedAppProviderDefaults<Providers>;
    readonly telemetry?: AppTelemetryConfig<Exporters>;
    readonly server?: ServerConfig;
    readonly inspector?: InspectorConfig;
    readonly deployment?: AppDeploymentConfig;
    readonly check?: AppCheckConfig;
  };
```

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

### ApplicationProfilesOf

The profile names of an application per capability, from the type of its descriptor. The
generated context registry uses it to type `profile` in buckets, caches, events and channels.
A capability without a provider has no names.

**Example**

```ts
interface ApplicationProfiles extends ApplicationProfilesOf<typeof app> {}
```

**Signature**

```ts
type ApplicationProfilesOf<Application> = Application extends {
  readonly defaults: infer Defaults;
}
  ? { readonly [Capability in keyof Defaults]-?: NonNullable<Defaults[Capability]> }
  : {};
```

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

### DefineAppBindings (interface)

The bindings of one `defineApp` call, from its one type parameter per capability.

**Example**

```ts
type Bindings = DefineAppBindings<typeof s3Adapter>;
```

**Signature**

```ts
export interface DefineAppBindings<
  Bucket = undefined,
  Cache = undefined,
  Jobs = undefined,
  Event = undefined,
  Model = undefined,
  Realtime = undefined,
  AgentState = undefined,
> {
  readonly bucket: Bucket;
  readonly cache: Cache;
  readonly jobs: Jobs;
  readonly event: Event;
  readonly model: Model;
  readonly realtime: Realtime;
  readonly "agent-state": AgentState;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/define-app.types.ts#L100)

### DefineAppOptions (type alias)

Authored application topology and runtime settings.

**Example**

```ts
const options: DefineAppOptions<{}, {}> = { env: defineEnv({}) };
```

**Signature**

```ts
type DefineAppOptions<
  Shape extends EnvShape,
  Providers extends AppProviderBindings,
  Exporters extends TelemetryExporterMap = TelemetryExporterMap,
> = DescriptorMetadata & {
  /** Stable name of the application in graphs, telemetry and deployment. */
  readonly id?: string;
  /** The environment contract from `defineEnv`; handlers read it as `context.env`. */
  readonly env: EnvDefinition<Shape>;
  /** Object storage for buckets: one adapter, or a map of named profiles. */
  readonly bucket?: AppProviderBinding<Providers, "bucket">;
  /** Key-value storage for caches: one adapter, or a map of named profiles. */
  readonly cache?: AppProviderBinding<Providers, "cache">;
  /** The backend that runs jobs and tasks: one adapter, or a map of named profiles. */
  readonly jobs?: AppProviderBinding<Providers, "jobs">;
  /** The transport that delivers events: one adapter, or a map of named profiles. */
  readonly event?: AppProviderBinding<Providers, "event">;
  /** Language models for agents: one adapter, or a map of named profiles. */
  readonly model?: AppProviderBinding<Providers, "model">;
  /** The transport of realtime channels: one adapter, or a map of named profiles. */
  readonly realtime?: AppProviderBinding<Providers, "realtime">;
  /** Storage for agent threads and runs: one adapter, or a map of named profiles. */
  readonly "agent-state"?: AppProviderBinding<Providers, "agent-state">;
  /** The profile a descriptor uses when it names none, per capability. */
  readonly defaults?: AppProviderDefaults<Providers>;
  /** Redaction, local retention, sampling and exporters of telemetry. */
  readonly telemetry?: AppTelemetryConfig<Exporters>;
  /** The HTTP server: port, body limit, API reference, MCP and startup hook. */
  readonly server?: ServerConfig;
  /** The development Inspector's bridge; off unless `enabled` is `true`. */
  readonly inspector?: InspectorConfig;
  /** JSON metadata for the deployment engine, such as `{ engine: "pulumi" }`. */
  readonly deployment?: AppDeploymentConfig;
  /** Opt-in rules of `relkit check`. */
  readonly check?: AppCheckConfig;
};
```

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

### InspectorConfig

Development bridge selection; installing or running the UI is independent.

**Example**

```ts
const inspector: InspectorConfig = { enabled: true };
```

**Signature**

```ts
export interface InspectorConfig extends InspectorConfigurationInput {
  /** Starts the bridge the Inspector connects to. Defaults to `false`. */
  readonly enabled?: boolean;
  /** Address the bridge listens on; port `0` takes a free port. */
  readonly connection?: { readonly host?: string; readonly port?: number };
  /** Largest payload preview the bridge returns, in bytes. Defaults to 1,048,576. */
  readonly maxPreviewBytes?: number;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/app-config.types.ts#L45)

### NoProviderConfigured

The type a `defaults` entry has when the application binds no provider to its capability, so
the type error on that entry names the capability.

**Example**

```ts
const missing: NoProviderConfigured<"cache"> = { capability: "cache" };
```

**Signature**

```ts
export interface NoProviderConfigured<Capability extends string> {
  readonly capability: Capability;
}
```

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

### NormalizedAppProviderDefaults

**Signature**

```ts
declare const NormalizedAppProviderDefaults: Readonly<{
  bucket?: ProfileFor<Providers, "bucket">;
  cache?: ProfileFor<Providers, "cache">;
  job?: ProfileFor<Providers, "job">;
  event?: ProfileFor<Providers, "event">;
  model?: ProfileFor<Providers, "model">;
  realtime?: ProfileFor<Providers, "realtime">;
  "agent-state"?: ProfileFor<Providers, "agent-state">;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/define-app.types.ts#L23)

### ServerConfig

HTTP server settings attached to an application descriptor.

**Example**

```ts
const server: ServerConfig = { port: 3000, apiDocs: { enabledInProduction: false } };
```

**Signature**

```ts
export interface ServerConfig {
  /** Port the HTTP server listens on. */
  readonly port?: number;
  /** Largest request body in bytes; a larger one is answered `413`. A route can set its own. */
  readonly maxBodyBytes?: number;
  /** The served OpenAPI document and its reference page. */
  readonly apiDocs?: ApiDocsConfig;
  /** Serves the contract that the generated client reads. */
  readonly clientContract?: boolean;
  /** Enables the MCP endpoint; `{ auth: "required" }` limits it to signed-in callers. */
  readonly mcp?: boolean | { readonly auth?: "required" };
  /** Explicitly selects the optional AG-UI HTTP protocol independently of agent RPC. */
  readonly agUi?: boolean;
  /** Runs once after the application's providers are ready and before the server accepts
   * requests; `getRelkit()` returns the application's handle inside it. A rejection stops startup.
   * @example onStart: async () => { await getRelkit().functions.catalog.warmPrices({}); }
   */
  readonly onStart?: () => void | Promise<void>;
}
```

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

## `dev-handler-table.ts`

Holds the function handler table of a generated server behind a stable registry object,
so `relkit dev` can replace every handler at once without restarting the process. The
generated server passes the stable registry to invocation and keeps its executable
manifest object; `swap` replaces the registry and the manifest's `functions` and
`targets` entries in one synchronous step, so a request sees either the old table or the
new one, never a mix. Requests already running keep the handler they resolved.

### HandlerTable

A stable registry whose table can be replaced atomically.

**Signature**

```ts
export interface HandlerTable {
  /** Registry object handed to invocation; it always delegates to the current table. */
  readonly registry: SwappableRegistry;
  /** Number of swaps applied since startup. */
  readonly generation: number;
  /**
   * Replaces the registry and the manifest's function and target entries in one step.
   * @param next - Registry verified against the new graph and manifest.
   * @param manifest - The new generation's manifest maps.
   */
  readonly swap: (next: SwappableRegistry, manifest: SwappableManifest) => void;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L38)

### SwappableManifest

The manifest maps the running server reads handlers and targets from.

**Signature**

```ts
export interface SwappableManifest {
  readonly functions?: Record<string, SwappableHandler>;
  readonly targets?: Record<string, object>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L19)

### createHandlerTable

Wraps a verified registry and the manifest whose entries routes resolve per request.

**Signature**

```ts
declare const createHandlerTable: (
  initial: SwappableRegistry,
  manifest: SwappableManifest,
) => HandlerTable;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.ts#L23)

## `dev-handler-table.types.ts`

Contracts of the development handler table and its reload hook.

### DevelopmentReloadOptions (interface)

Inputs the generated server supplies to the reload hook.

**Signature**

```ts
export interface DevelopmentReloadOptions {
  readonly projectRoot: string;
  /** Directory of the running server's `index.ts`. */
  readonly serverDirectory: string;
  readonly table: HandlerTable;
  /** Manifest the server started with; later reloads compare against the last one applied. */
  readonly runtimeManifest: ReloadedManifest;
  /**
   * Verifies a graph and manifest pair the same way startup does.
   * @param graph - Graph of the new generation.
   * @param manifest - Manifest module's `runtimeManifest` export.
   * @returns The verified registry.
   */
  readonly createRegistry: (
    graph: ApplicationGraph,
    manifest: SwappableManifest,
  ) => SwappableRegistry;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L81)

### DevelopmentReloadReply (type alias)

The server's answer to a reload request.

**Signature**

```ts
type DevelopmentReloadReply =
  | {
      readonly type: "relkit.dev.reloaded";
      readonly id: number;
      readonly ok: true;
      /** Application modules evaluated again, project-relative. */
      readonly reimported: readonly string[];
      readonly pid: number;
    }
  | {
      readonly type: "relkit.dev.reloaded";
      readonly id: number;
      readonly ok: false;
      readonly error: string;
      readonly pid: number;
    };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L63)

### DevelopmentReloadRequest (interface)

A request from `relkit dev` to load a new handler table.

**Signature**

```ts
export interface DevelopmentReloadRequest {
  readonly type: "relkit.dev.reload";
  /** Correlates the acknowledgement. */
  readonly id: number;
  /** Manifest module file name in the server directory. */
  readonly manifest: string;
  /** Graph JSON file name in the server directory. */
  readonly graph: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L52)

### HandlerTable (interface)

A stable registry whose table can be replaced atomically.

**Signature**

```ts
export interface HandlerTable {
  /** Registry object handed to invocation; it always delegates to the current table. */
  readonly registry: SwappableRegistry;
  /** Number of swaps applied since startup. */
  readonly generation: number;
  /**
   * Replaces the registry and the manifest's function and target entries in one step.
   * @param next - Registry verified against the new graph and manifest.
   * @param manifest - The new generation's manifest maps.
   */
  readonly swap: (next: SwappableRegistry, manifest: SwappableManifest) => void;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L38)

### ReloadedManifest (interface)

Manifest maps that a reload must leave untouched; a re-evaluated entry forces a restart.

**Signature**

```ts
export interface ReloadedManifest extends SwappableManifest {
  readonly middleware?: Readonly<Record<string, object>>;
  readonly hooks?: Readonly<Record<string, object>>;
  readonly requestTransforms?: Readonly<Record<string, object>>;
  readonly agents?: Readonly<Record<string, object>>;
  readonly tools?: Readonly<Record<string, object>>;
  readonly channels?: Readonly<Record<string, object>>;
  readonly tasks?: Readonly<Record<string, object>>;
  readonly jobs?: Readonly<Record<string, object>>;
  readonly application?: object;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L25)

### SwappableHandler (type alias)

A handler as the generated server stores it: a function or a handler-bearing descriptor.

**Signature**

```ts
type SwappableHandler = object;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L5)

### SwappableManifest (interface)

The manifest maps the running server reads handlers and targets from.

**Signature**

```ts
export interface SwappableManifest {
  readonly functions?: Record<string, SwappableHandler>;
  readonly targets?: Record<string, object>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L19)

### SwappableRegistry (interface)

The function registry shape the engine's verified registry has; declared structurally
here because `relkit/host` may not depend on the engine.

**Signature**

```ts
export interface SwappableRegistry extends ReadonlyMap<string, SwappableHandler> {
  readonly graphHash: string;
  readonly functionIds: readonly string[];
  readonly handlers: Readonly<Record<string, SwappableHandler>>;
  readonly targets: Readonly<Record<string, object>>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L11)

## `dev-module-reload.ts`

Tracks the application modules a development process has loaded and evicts the changed
ones, together with every loaded module that imports them, from the runtime's module registry.
The warm evaluator and the development server both use it: after eviction the next
import evaluates a fresh module record for each evicted file while every other module
keeps its cached instance. Bun keys ES modules by path, and a fresh query string alone
would still bind static imports to the old dependency, so eviction is what makes a
re-import observe the edit. Only files below the project root and outside
`node_modules` and `.relkit` are tracked. Development-only; the registry comes from the runtime
adapter, and runtimes without one (Node) restart the process instead.

### ModuleReloader

Loaded-module tracking and eviction for one project root.

**Signature**

```ts
export interface ModuleReloader {
  /**
   * Records the modification stamp of every loaded application module.
   * @param before - Stamps taken with {@link ModuleReloader.stamps} before the modules were
   * imported; a file changed while they loaded keeps its earlier stamp, so the next `changed`
   * reports it instead of the loaded module silently standing for the newer file.
   */
  readonly record: (before?: ReadonlyMap<string, string>) => void;
  /** @returns The current modification stamp of every loaded application module. */
  readonly stamps: () => ReadonlyMap<string, string>;
  /** @returns Every application module currently in the registry, sorted. */
  readonly loaded: () => readonly string[];
  /** @returns Loaded application modules whose file changed or disappeared since `record`. */
  readonly changed: () => readonly string[];
  /**
   * Drops, by path, every file evicted since it last loaded, and the new files it imports,
   * whether loaded or not. Call it after an import fails: a module that failed to parse stays in
   * the runtime's loader without appearing in the registry keys, and a later import of it, or of
   * a module importing it, never settles; one that threw at the top level stays half-initialized.
   * `invalidate` first drops the ones that are not loaded, which covers the next reload.
   * @returns The dropped absolute files, sorted.
   */
  readonly discardFailed: () => readonly string[];
  /**
   * Evicts files and every loaded module that transitively imports them.
   * @param files - Absolute or project-relative changed files.
   * @returns Every evicted absolute file, sorted.
   */
  readonly invalidate: (files: readonly string[]) => readonly string[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-module-reload.types.ts#L4)

### createModuleReloader

Creates a reloader for one project root.

**Signature**

```ts
declare const createModuleReloader: (
  projectRoot: string,
  modules: RuntimeModules,
) => ModuleReloader;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-module-reload.ts#L40)

## `dev-module-reload.types.ts`

Loaded-module tracking and eviction for one project root.

### ModuleReloader (interface)

Loaded-module tracking and eviction for one project root.

**Signature**

```ts
export interface ModuleReloader {
  /**
   * Records the modification stamp of every loaded application module.
   * @param before - Stamps taken with {@link ModuleReloader.stamps} before the modules were
   * imported; a file changed while they loaded keeps its earlier stamp, so the next `changed`
   * reports it instead of the loaded module silently standing for the newer file.
   */
  readonly record: (before?: ReadonlyMap<string, string>) => void;
  /** @returns The current modification stamp of every loaded application module. */
  readonly stamps: () => ReadonlyMap<string, string>;
  /** @returns Every application module currently in the registry, sorted. */
  readonly loaded: () => readonly string[];
  /** @returns Loaded application modules whose file changed or disappeared since `record`. */
  readonly changed: () => readonly string[];
  /**
   * Drops, by path, every file evicted since it last loaded, and the new files it imports,
   * whether loaded or not. Call it after an import fails: a module that failed to parse stays in
   * the runtime's loader without appearing in the registry keys, and a later import of it, or of
   * a module importing it, never settles; one that threw at the top level stays half-initialized.
   * `invalidate` first drops the ones that are not loaded, which covers the next reload.
   * @returns The dropped absolute files, sorted.
   */
  readonly discardFailed: () => readonly string[];
  /**
   * Evicts files and every loaded module that transitively imports them.
   * @param files - Absolute or project-relative changed files.
   * @returns Every evicted absolute file, sorted.
   */
  readonly invalidate: (files: readonly string[]) => readonly string[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-module-reload.types.ts#L4)

## `dev-reload.ts`

The development reload hook a generated server installs when `relkit dev` starts it with
an IPC channel. On a `relkit.dev.reload` message it evicts the application modules that
changed since the last load, together with their importers, imports the new generation's
manifest module from the server directory (which re-evaluates exactly those modules),
verifies it against the new graph like startup does, and swaps the handler table. The
reply says whether the swap happened; on failure the previous table keeps serving and
`relkit dev` falls back to starting a new generation.

### DevelopmentReloadOptions

Inputs the generated server supplies to the reload hook.

**Signature**

```ts
export interface DevelopmentReloadOptions {
  readonly projectRoot: string;
  /** Directory of the running server's `index.ts`. */
  readonly serverDirectory: string;
  readonly table: HandlerTable;
  /** Manifest the server started with; later reloads compare against the last one applied. */
  readonly runtimeManifest: ReloadedManifest;
  /**
   * Verifies a graph and manifest pair the same way startup does.
   * @param graph - Graph of the new generation.
   * @param manifest - Manifest module's `runtimeManifest` export.
   * @returns The verified registry.
   */
  readonly createRegistry: (
    graph: ApplicationGraph,
    manifest: SwappableManifest,
  ) => SwappableRegistry;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L81)

### DevelopmentReloadReply

The server's answer to a reload request.

**Signature**

```ts
type DevelopmentReloadReply =
  | {
      readonly type: "relkit.dev.reloaded";
      readonly id: number;
      readonly ok: true;
      /** Application modules evaluated again, project-relative. */
      readonly reimported: readonly string[];
      readonly pid: number;
    }
  | {
      readonly type: "relkit.dev.reloaded";
      readonly id: number;
      readonly ok: false;
      readonly error: string;
      readonly pid: number;
    };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L63)

### DevelopmentReloadRequest

A request from `relkit dev` to load a new handler table.

**Signature**

```ts
export interface DevelopmentReloadRequest {
  readonly type: "relkit.dev.reload";
  /** Correlates the acknowledgement. */
  readonly id: number;
  /** Manifest module file name in the server directory. */
  readonly manifest: string;
  /** Graph JSON file name in the server directory. */
  readonly graph: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L52)

### installDevelopmentReload

Listens for reload requests on the process IPC channel.

**Signature**

```ts
declare const installDevelopmentReload: (options: DevelopmentReloadOptions) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-reload.ts#L44)

## `effect.ts`

The Effect form of each root API, for applications written with Effect. Handlers may return an
Effect without importing anything from here; these helpers build descriptors and failures as
Effects instead of plain values.

### FunctionOperationError

**Signature**

```ts
declare const FunctionOperationError: typeof FunctionOperationError;
```

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

### callGraphNodeEffect

**Signature**

```ts
declare const callGraphNodeEffect: <
  Id extends string,
  FunctionId extends string,
  Input,
  Output,
  Errors extends readonly ErrorDescriptorAny[],
  InputSchema extends StandardSchemaV1,
  OutputSchema extends StandardSchemaV1,
  Dependencies extends FunctionDependencies,
>(
  node: FunctionGraphNodeDescriptor<
    Id,
    FunctionId,
    Input,
    Output,
    Errors,
    InputSchema,
    OutputSchema,
    Dependencies
  >,
  input: InferInput<InputSchema>,
) => Effect<Output, FunctionOperationError>;
```

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

### callToolEffect

**Signature**

```ts
declare const callToolEffect: <const Id extends string, const Target extends FunctionRefAny>(
  tool: FunctionToolDescriptor<Id, Target>,
  input: InferInput<Target["input"]>,
  options?: FunctionToolInvokeOptions,
) => ReturnType<FunctionToolInvokeEffect<Target>>;
```

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

### defineAgentEffect

**Signature**

```ts
declare const defineAgentEffect: <
  const Id extends string,
  const InputSchema extends StandardSchemaV1,
  const OutputSchema extends StandardSchemaV1,
  const Tools extends readonly ToolRefAny[],
  const Runtime extends AgentRuntimeAdapterAny,
>(
  options: DefineAgentOptions<Id, InputSchema, OutputSchema, Tools, Runtime>,
) => Effect<
  AgentDefinition<Id, InputSchema, OutputSchema, Tools, Runtime>,
  AgentDefinitionFailure,
  never
>;
```

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

### defineAppEffect

**Signature**

```ts
declare const defineAppEffect: <
  const Shape extends EnvShape,
  const Bucket extends AppProviderBindings["bucket"] = undefined,
  const Cache extends AppProviderBindings["cache"] = undefined,
  const Jobs extends AppProviderBindings["jobs"] = undefined,
  const Event extends AppProviderBindings["event"] = undefined,
  const Model extends AppProviderBindings["model"] = undefined,
  const Realtime extends AppProviderBindings["realtime"] = undefined,
  const AgentState extends AppProviderBindings["agent-state"] = undefined,
  const Exporters extends TelemetryExporterMap = Readonly<
    Record<string, TelemetryExporterDescriptor<string, string, object>>
  >,
>(
  options: DefineAppOptions<
    Shape,
    DefineAppBindings<Bucket, Cache, Jobs, Event, Model, Realtime, AgentState>,
    Exporters
  >,
) => Effect<
  ApplicationDescriptor<
    Shape,
    DefineAppBindings<Bucket, Cache, Jobs, Event, Model, Realtime, AgentState>,
    Exporters
  >,
  AppValidationFailure,
  never
>;
```

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

### defineBucketEffect

**Signature**

```ts
declare const defineBucketEffect: <const Id extends string>(
  options: DefineBucketOptions<Id>,
) => Effect<BucketDescriptor<Id>, BucketValidationError, never>;
```

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

### defineCacheEffect

**Signature**

```ts
declare const defineCacheEffect: <
  const Id extends string,
  const KeySchema extends StandardSchemaV1,
  const ValueSchema extends StandardSchemaV1,
>(
  options: DefineCacheOptions<Id, KeySchema, ValueSchema>,
) => Effect<
  CacheDescriptor<Id, InferInput<KeySchema>, InferOutput<ValueSchema>, KeySchema, ValueSchema>,
  CacheDescriptorError,
  never
>;
```

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

### defineChannelEffect

**Signature**

```ts
declare const defineChannelEffect: <
  const Id extends string,
  const ParamsSchema extends StandardSchemaV1,
  const Events extends Readonly<Record<string, StandardSchemaV1>>,
  const Client extends ChannelClientPolicy<ChannelGuard<InferOutput<ParamsSchema>>> | undefined,
  const Presence extends ChannelPresence<InferOutput<ParamsSchema>> | undefined = undefined,
>(
  options: DefineChannelOptions<Id, ParamsSchema, Events, Client, Presence>,
) => Effect<
  ChannelDescriptor<Id, ParamsSchema, Events, Client, Presence>,
  ChannelValidationError,
  never
>;
```

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

### defineConstantsEffect

**Signature**

```ts
declare const defineConstantsEffect: <const Values extends ConstantsShape>(
  values: Values,
  options?: ContextDescriptorOptions | undefined,
) => Effect<ConstantsDescriptor<Values>, ContextDescriptorFailure, never>;
```

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

### defineEnvEffect

**Signature**

```ts
declare const defineEnvEffect: <const S extends EnvShape>(
  shape: S & { readonly PORT?: never; readonly RELKIT_ENV?: never },
) => Effect<EnvDefinition<S>, ConfigValidationError>;
```

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

### defineErrorEffect

**Signature**

```ts
declare const defineErrorEffect: <
  const Id extends string,
  const DataSchema extends StandardSchemaV1,
>(
  options: DefineErrorOptions<Id, DataSchema>,
) => Effect<
  ErrorDescriptor<Id, InferOutput<DataSchema>, DataSchema>,
  FunctionOperationError,
  never
>;
```

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

### defineFunctionEffect

**Signature**

```ts
declare const defineFunctionEffect: DefineFunctionEffect;
```

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

### defineJobEffect

**Signature**

```ts
declare const defineJobEffect: <
  const Name extends string,
  const Task extends TaskDescriptorAny,
  const Id extends string = Name,
>(
  options: DefineJobOptions<Name, Task, Id>,
) => Effect<JobDescriptor<Name, Id, Task>, JobDefinitionFailure, never>;
```

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

### defineMiddlewareEffect

**Signature**

```ts
declare const defineMiddlewareEffect: (
  path: string,
  definition: MiddlewareHandler | TypedMiddlewareOptions<StandardSchemaV1<unknown, unknown>>,
) => Effect<MiddlewareDescriptor<string, any>, RouteOperationError, never>;
```

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

### definePromptEffect

**Signature**

```ts
declare const definePromptEffect: <const Value extends PromptValue>(
  value: Value,
  options?: ContextDescriptorOptions | undefined,
) => Effect<PromptDescriptor<Value>, ContextDescriptorFailure, never>;
```

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

### defineRouteEffect

**Signature**

```ts
declare const defineRouteEffect: <
  const Id extends string,
  const Target extends FunctionRefAny | undefined = undefined,
  const Request extends HttpRequestMapping | undefined = undefined,
  const Handler extends RawHttpHandler = RawHttpHandler,
>(
  options: DefineRouteOptions<Id, Target, Request, Handler>,
) => Effect<DefinedRoute<Id, Target, Request, Handler>, RouteOperationError>;
```

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

### defineServiceEffect

**Signature**

```ts
declare const defineServiceEffect: <
  const Id extends string,
  const Functions extends ServiceFunctionMap = Readonly<Record<never, never>>,
  const Events extends ServiceEventMap = Readonly<Record<never, never>>,
  const Tasks extends ServiceTaskMap = Readonly<Record<never, never>>,
  const Jobs extends ServiceJobMap = Readonly<Record<never, never>>,
>(
  options: DefineServiceOptions<Id, Functions, Events, Tasks, Jobs>,
) => Effect<ServiceDescriptor<Id, Functions, Events, Tasks, Jobs>, ServiceValidationError, never>;
```

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

### defineServiceRoutesEffect

**Signature**

```ts
declare const defineServiceRoutesEffect: <
  const Service extends ServiceDescriptor<string, any, any>,
  const Options extends Partial<Readonly<Record<ServiceRouteMethod, ServiceRouteEntry<Service>>>>,
>(
  service: Service,
  options: Options & Record<Exclude<keyof Options, ServiceRouteMethod>, never>,
) => Effect<
  Readonly<{
    [Method in keyof Options]: FunctionRouteDescriptor<
      string,
      Extract<
        ServiceFunctions<Service>[Extract<
          EntryName<Options[Method]>,
          Extract<keyof ServiceFunctions<Service>, string>
        >],
        FunctionRefAny
      >,
      EntryRequest<Options[Method]>
    > &
      ServiceRouteMethodMarker<Method>;
  }>,
  RouteOperationError,
  never
>;
```

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

### defineTaskEffect

**Signature**

```ts
declare const defineTaskEffect: <
  const Id extends string,
  const Version extends string,
  const InputSchema extends StandardSchemaV1,
  const OutputSchema extends StandardSchemaV1,
  const Dependencies extends TaskDependencies = {},
  const Errors extends readonly ErrorDescriptorAny[] = readonly [],
  const ProgressSchema extends StandardSchemaV1 | undefined = undefined,
  const Streams extends Readonly<Record<string, StandardSchemaV1<unknown, unknown>>> = {},
  const Execution extends TaskExecution = TaskExecution,
>(
  options: DefineTaskCallOptions<
    Id,
    Version,
    InputSchema,
    OutputSchema,
    Dependencies,
    Errors,
    ProgressSchema,
    Streams,
    Execution
  >,
) => Effect<
  TaskDescriptor<
    Id,
    Version,
    InputSchema,
    OutputSchema,
    Dependencies,
    Errors,
    ProgressSchema,
    Streams,
    TaskForm<Execution>
  >,
  TaskDefinitionFailure,
  never
>;
```

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

### defineToolEffect

**Signature**

```ts
declare const defineToolEffect: <const Id extends string, const Target extends FunctionRefAny>(
  options: DefineToolOptions<Id, Target>,
) => Effect<ToolDescriptor<Id, Target>, ToolOperationFailure, never>;
```

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

### defineTransformEffect

**Signature**

```ts
declare const defineTransformEffect: <
  const Id extends string,
  const Schema extends StandardSchemaV1,
>(
  options: DefineTransformOptions<Id, Schema>,
) => Effect<HttpTransformDescriptor<Id, Schema>, RouteOperationError, never>;
```

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

### failEffect

**Signature**

```ts
declare const failEffect: <const Descriptor extends ErrorDescriptorAny>(
  descriptor: Descriptor,
  data: Parameters<Descriptor["create"]>[0],
) => Effect<never, DeclaredErrorOf<Descriptor>>;
```

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

### httpEffects

**Signature**

```ts
declare const httpEffects: {
  constant: <const V extends JsonValue>(
    value: V,
  ) => Effect<HttpConstantMapping<V>, RouteOperationError, never>;
  optional: <const M extends HttpMappingNode>(
    value: M,
  ) => Effect<HttpOptionalMapping<M>, RouteOperationError, never>;
  default: <const M extends HttpMappingNode, const V extends JsonValue>(
    value: M,
    fallback: V,
  ) => Effect<HttpDefaultMapping<M, V>, RouteOperationError, never>;
  transform: <const T extends HttpTransformRef | string, const M extends HttpMappingNode>(
    transform: T,
    value?: M | undefined,
  ) => Effect<HttpTransformMapping<TransformOutput<T>>, RouteOperationError, never>;
  success: (
    status: number,
    schema?: StandardSchemaV1<unknown, unknown> | undefined,
  ) => Effect<HttpResponseMapping, RouteOperationError, never>;
  error: (
    errorId: string,
    status: number,
    schema?: StandardSchemaV1<unknown, unknown> | undefined,
  ) => Effect<HttpResponseMapping, RouteOperationError, never>;
  validationError: (
    status?: number | undefined,
    schema?: StandardSchemaV1<unknown, unknown> | undefined,
  ) => Effect<HttpResponseMapping, RouteOperationError, never>;
  response: (
    id: string,
    status: number,
    schema?: StandardSchemaV1<unknown, unknown> | undefined,
  ) => Effect<HttpResponseMapping, RouteOperationError, never>;
  continue: () => Effect<ContinueMapping, RouteOperationError, never>;
  respond: (
    response: string | HttpResponseMapping,
    body?: HttpMappingNode | undefined,
  ) => Effect<RespondMapping, RouteOperationError, never>;
  input: <const S extends HttpMappingShape>(
    fields: S,
  ) => Effect<HttpInputMapping<S>, RouteOperationError, never>;
  nested: <const S extends HttpMappingShape>(
    fields: S,
  ) => Effect<HttpNestedMapping<S>, RouteOperationError, never>;
  path: (
    name: string,
    options?: HttpSourceOptions | undefined,
  ) => Effect<HttpMappingNode, RouteOperationError, never>;
  pathSegments: (
    name: string,
    options?: HttpSourceOptions | undefined,
  ) => Effect<HttpMappingNode, RouteOperationError, never>;
  query: (
    name: string,
    options?: HttpSourceOptions | undefined,
  ) => Effect<HttpMappingNode, RouteOperationError, never>;
  header: (
    name: string,
    options?: HttpSourceOptions | undefined,
  ) => Effect<HttpMappingNode, RouteOperationError, never>;
  cookie: (
    name: string,
    options?: HttpSourceOptions | undefined,
  ) => Effect<HttpMappingNode, RouteOperationError, never>;
  body: (
    name?: string | undefined,
    options?: HttpSourceOptions | undefined,
  ) => Effect<HttpMappingNode, RouteOperationError, never>;
  wholeBody: () => Effect<HttpWholeBodyMapping<unknown>, RouteOperationError, never>;
  multipart: (
    name: string,
    options?: HttpSourceOptions | undefined,
  ) => Effect<HttpMappingNode, RouteOperationError, never>;
  multipartAll: (
    name: string,
    options?: HttpSourceOptions | undefined,
  ) => Effect<HttpMappingNode, RouteOperationError, never>;
};
```

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

### streamOfEffect

**Signature**

```ts
declare const streamOfEffect: <const ItemSchema extends StandardSchemaV1>(
  item: ItemSchema,
) => Effect<StreamOutputSchema<ItemSchema>, FunctionOperationError, never>;
```

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

## `events.ts`

### "../events/index.js" (namespace export)

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

**Signature**

```ts
export * from "../events/index.js";
```

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

## `functions.ts`

### "../functions/index.js" (namespace export)

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

**Signature**

```ts
export * from "../functions/index.js";
```

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

## `host.ts`

Exposes the framework-owned descriptor identity and application context wiring
needed by emitted hosts, including selected dependency preflight. Re-exports
preserve identity while resolving framework dependencies from their owning app.

### "./context-resolver.js" (namespace export)

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

**Signature**

```ts
export * from "./context-resolver.js";
```

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

### AppConstantRunner

**Signature**

```ts
declare const AppConstantRunner: typeof AppConstantRunner;
```

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

### AppConstantRunnerLive

**Signature**

```ts
declare const AppConstantRunnerLive: Layer<AppConstantRunner, never, never>;
```

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

### DevelopmentReloadOptions

Inputs the generated server supplies to the reload hook.

**Signature**

```ts
export interface DevelopmentReloadOptions {
  readonly projectRoot: string;
  /** Directory of the running server's `index.ts`. */
  readonly serverDirectory: string;
  readonly table: HandlerTable;
  /** Manifest the server started with; later reloads compare against the last one applied. */
  readonly runtimeManifest: ReloadedManifest;
  /**
   * Verifies a graph and manifest pair the same way startup does.
   * @param graph - Graph of the new generation.
   * @param manifest - Manifest module's `runtimeManifest` export.
   * @returns The verified registry.
   */
  readonly createRegistry: (
    graph: ApplicationGraph,
    manifest: SwappableManifest,
  ) => SwappableRegistry;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L81)

### DevelopmentReloadReply

The server's answer to a reload request.

**Signature**

```ts
type DevelopmentReloadReply =
  | {
      readonly type: "relkit.dev.reloaded";
      readonly id: number;
      readonly ok: true;
      /** Application modules evaluated again, project-relative. */
      readonly reimported: readonly string[];
      readonly pid: number;
    }
  | {
      readonly type: "relkit.dev.reloaded";
      readonly id: number;
      readonly ok: false;
      readonly error: string;
      readonly pid: number;
    };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L63)

### DevelopmentReloadRequest

A request from `relkit dev` to load a new handler table.

**Signature**

```ts
export interface DevelopmentReloadRequest {
  readonly type: "relkit.dev.reload";
  /** Correlates the acknowledgement. */
  readonly id: number;
  /** Manifest module file name in the server directory. */
  readonly manifest: string;
  /** Graph JSON file name in the server directory. */
  readonly graph: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L52)

### HandlerTable

A stable registry whose table can be replaced atomically.

**Signature**

```ts
export interface HandlerTable {
  /** Registry object handed to invocation; it always delegates to the current table. */
  readonly registry: SwappableRegistry;
  /** Number of swaps applied since startup. */
  readonly generation: number;
  /**
   * Replaces the registry and the manifest's function and target entries in one step.
   * @param next - Registry verified against the new graph and manifest.
   * @param manifest - The new generation's manifest maps.
   */
  readonly swap: (next: SwappableRegistry, manifest: SwappableManifest) => void;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L38)

### ModuleReloader

Loaded-module tracking and eviction for one project root.

**Signature**

```ts
export interface ModuleReloader {
  /**
   * Records the modification stamp of every loaded application module.
   * @param before - Stamps taken with {@link ModuleReloader.stamps} before the modules were
   * imported; a file changed while they loaded keeps its earlier stamp, so the next `changed`
   * reports it instead of the loaded module silently standing for the newer file.
   */
  readonly record: (before?: ReadonlyMap<string, string>) => void;
  /** @returns The current modification stamp of every loaded application module. */
  readonly stamps: () => ReadonlyMap<string, string>;
  /** @returns Every application module currently in the registry, sorted. */
  readonly loaded: () => readonly string[];
  /** @returns Loaded application modules whose file changed or disappeared since `record`. */
  readonly changed: () => readonly string[];
  /**
   * Drops, by path, every file evicted since it last loaded, and the new files it imports,
   * whether loaded or not. Call it after an import fails: a module that failed to parse stays in
   * the runtime's loader without appearing in the registry keys, and a later import of it, or of
   * a module importing it, never settles; one that threw at the top level stays half-initialized.
   * `invalidate` first drops the ones that are not loaded, which covers the next reload.
   * @returns The dropped absolute files, sorted.
   */
  readonly discardFailed: () => readonly string[];
  /**
   * Evicts files and every loaded module that transitively imports them.
   * @param files - Absolute or project-relative changed files.
   * @returns Every evicted absolute file, sorted.
   */
  readonly invalidate: (files: readonly string[]) => readonly string[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-module-reload.types.ts#L4)

### SwappableManifest

The manifest maps the running server reads handlers and targets from.

**Signature**

```ts
export interface SwappableManifest {
  readonly functions?: Record<string, SwappableHandler>;
  readonly targets?: Record<string, object>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/dev-handler-table.types.ts#L19)

### bindDescriptorIdentity

**Signature**

```ts
declare const bindDescriptorIdentity: <T extends object>(descriptor: T, id: string) => T;
```

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

### checkRuntimeIntegrations

**Signature**

```ts
declare const checkRuntimeIntegrations: (
  plan: RuntimeIntegrationPlan,
  options: { readonly projectRoot: string; readonly phase: IntegrationDependencyPhase },
) => Promise<void>;
```

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

### createHandlerTable

**Signature**

```ts
declare const createHandlerTable: (
  initial: SwappableRegistry,
  manifest: SwappableManifest,
) => HandlerTable;
```

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

### createModuleReloader

**Signature**

```ts
declare const createModuleReloader: (
  projectRoot: string,
  modules: RuntimeModules,
) => ModuleReloader;
```

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

### installDevelopmentReload

**Signature**

```ts
declare const installDevelopmentReload: (options: DevelopmentReloadOptions) => boolean;
```

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

### loadRuntimeIntegration

**Signature**

```ts
declare const loadRuntimeIntegration: <Module>(
  packageName: string,
  load: () => Promise<Module>,
) => Promise<Module>;
```

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

## `index.ts`

The surface the `relkit` root had before it became a curated list. The curated root picks its
names from here, and the deprecated `@relkit/app` re-exports all of it as `relkit/app`.

### "../agents/index.js" (namespace export)

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

**Signature**

```ts
export * from "../agents/index.js";
```

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

### "../buckets/index.js" (namespace export)

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

**Signature**

```ts
export * from "../buckets/index.js";
```

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

### "../cache/index.js" (namespace export)

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

**Signature**

```ts
export * from "../cache/index.js";
```

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

### "../events/index.js" (namespace export)

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

**Signature**

```ts
export * from "../events/index.js";
```

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

### "../functions/index.js" (namespace export)

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

**Signature**

```ts
export * from "../functions/index.js";
```

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

### "../jobs/index.js" (namespace export)

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

**Signature**

```ts
export * from "../jobs/index.js";
```

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

### "../realtime/index.js" (namespace export)

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

**Signature**

```ts
export * from "../realtime/index.js";
```

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

### "../routes/index.js" (namespace export)

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

**Signature**

```ts
export * from "../routes/index.js";
```

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

### "../services/index.js" (namespace export)

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

**Signature**

```ts
export * from "../services/index.js";
```

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

### "../tools/index.js" (namespace export)

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

**Signature**

```ts
export * from "../tools/index.js";
```

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

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

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

**Signature**

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

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

### "./context-resolver.js" (namespace export)

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

**Signature**

```ts
export * from "./context-resolver.js";
```

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

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

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

**Signature**

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

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

### AppConstantRunner

**Signature**

```ts
declare const AppConstantRunner: typeof AppConstantRunner;
```

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

### AppConstantRunnerLive

**Signature**

```ts
declare const AppConstantRunnerLive: Layer<AppConstantRunner, never, never>;
```

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

### EventAttributeValue

**Signature**

```ts
declare const EventAttributeValue: EventAttributeValue;
```

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

### EventPublishOptions

**Signature**

```ts
declare const EventPublishOptions: EventPublishOptions;
```

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

### EventPublishResult

**Signature**

```ts
declare const EventPublishResult: EventPublishResult<Id, Version, Payload>;
```

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

### TaskClientFor

**Signature**

```ts
declare const TaskClientFor: TaskClientFor<T>;
```

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

### TaskClients

**Signature**

```ts
declare const TaskClients: TaskClients<M>;
```

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

### TaskTriggerOptions

**Signature**

```ts
declare const TaskTriggerOptions: TaskTriggerOptions<Task>;
```

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

### bindDescriptorIdentity

**Signature**

```ts
declare const bindDescriptorIdentity: <T extends object>(descriptor: T, id: string) => T;
```

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

## `jobs.ts`

### "../jobs/index.js" (namespace export)

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

**Signature**

```ts
export * from "../jobs/index.js";
```

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

### RunStatus

**Signature**

```ts
declare const RunStatus: JobRunStatus;
```

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

## `realtime.ts`

### "../realtime/index.js" (namespace export)

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

**Signature**

```ts
export * from "../realtime/index.js";
```

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

## `routes.ts`

### "../routes/index.js" (namespace export)

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

**Signature**

```ts
export * from "../routes/index.js";
```

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

## `schema.ts`

### "../schema/index.js" (namespace export)

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

**Signature**

```ts
export * from "../schema/index.js";
```

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

## `services.ts`

### "../services/index.js" (namespace export)

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

**Signature**

```ts
export * from "../services/index.js";
```

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

## `tasks.ts`

### DefineTaskCallOptions

**Signature**

```ts
declare const DefineTaskCallOptions: DefineTaskCallOptions<
  Id,
  Version,
  InputSchema,
  OutputSchema,
  Dependencies,
  Errors,
  ProgressSchema,
  Streams,
  Execution
>;
```

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

### DefineTaskOptions

**Signature**

```ts
declare const DefineTaskOptions: DefineTaskOptions<
  Id,
  Version,
  InputSchema,
  OutputSchema,
  Dependencies,
  Errors,
  ProgressSchema,
  Streams,
  Execution
>;
```

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

### JobDescriptorForThisTask

**Signature**

```ts
declare const JobDescriptorForThisTask: JobDescriptorForThisTask<Task>;
```

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

### NormalizedTaskRetryPolicy

**Signature**

```ts
declare const NormalizedTaskRetryPolicy: NormalizedTaskRetryPolicy;
```

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

### RunResultOptions

**Signature**

```ts
declare const RunResultOptions: RunResultOptions;
```

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

### ServerTriggerOptions

**Signature**

```ts
declare const ServerTriggerOptions: ServerTriggerOptions;
```

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

### TaskAuthContext

**Signature**

```ts
declare const TaskAuthContext: TaskAuthContext<Session>;
```

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

### TaskCallerInput

**Signature**

```ts
declare const TaskCallerInput: TaskCallerInput<T>;
```

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

### TaskCanonicalInput

**Signature**

```ts
declare const TaskCanonicalInput: TaskCanonicalInput<T>;
```

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

### TaskConcurrency

**Signature**

```ts
declare const TaskConcurrency: TaskConcurrency<InputKey>;
```

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

### TaskContext

**Signature**

```ts
declare const TaskContext: TaskContext<Execution, Dependencies, ProgressSchema, Streams>;
```

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

### TaskContextBase

**Signature**

```ts
declare const TaskContextBase: TaskContextBase<Dependencies>;
```

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

### TaskDependencies

**Signature**

```ts
declare const TaskDependencies: TaskDependencies;
```

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

### TaskDescriptor

**Signature**

```ts
declare const TaskDescriptor: TaskDescriptor<
  Id,
  Version,
  InputSchema,
  OutputSchema,
  Dependencies,
  Errors,
  ProgressSchema,
  Streams,
  Execution
>;
```

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

### TaskDescriptorAny

**Signature**

```ts
declare const TaskDescriptorAny: TaskDescriptorAny;
```

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

### TaskExecution

**Signature**

```ts
declare const TaskExecution: TaskExecution;
```

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

### TaskFailureHook

**Signature**

```ts
declare const TaskFailureHook: TaskFailureHook<Dependencies>;
```

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

### TaskForm

**Signature**

```ts
declare const TaskForm: TaskForm<Execution>;
```

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

### TaskHandler

**Signature**

```ts
declare const TaskHandler: TaskHandler<
  InputSchema,
  OutputSchema,
  Execution,
  Dependencies,
  Errors,
  ProgressSchema,
  Streams
>;
```

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

### TaskHandlerResult

**Signature**

```ts
declare const TaskHandlerResult: TaskHandlerResult<Output, Errors>;
```

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

### TaskHookContext

**Signature**

```ts
declare const TaskHookContext: TaskHookContext<Dependencies>;
```

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

### TaskInput

**Signature**

```ts
declare const TaskInput: TaskInput<T>;
```

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

### TaskLogging

**Signature**

```ts
declare const TaskLogging: TaskLogging;
```

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

### TaskOutput

**Signature**

```ts
declare const TaskOutput: TaskOutput<T>;
```

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

### TaskProgressEmitter

**Signature**

```ts
declare const TaskProgressEmitter: TaskProgressEmitter<Value>;
```

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

### TaskProgressInput

**Signature**

```ts
declare const TaskProgressInput: TaskProgressInput<Schema>;
```

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

### TaskProgressOutput

**Signature**

```ts
declare const TaskProgressOutput: TaskProgressOutput<Schema>;
```

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

### TaskRawHandlerOutput

**Signature**

```ts
declare const TaskRawHandlerOutput: TaskRawHandlerOutput<T>;
```

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

### TaskResources

**Signature**

```ts
declare const TaskResources: TaskResources;
```

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

### TaskRetryPolicy

**Signature**

```ts
declare const TaskRetryPolicy: TaskRetryPolicy;
```

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

### TaskRunContext

**Signature**

```ts
declare const TaskRunContext: TaskRunContext;
```

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

### TaskSleepOptions

**Signature**

```ts
declare const TaskSleepOptions: TaskSleepOptions;
```

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

### TaskStartHook

**Signature**

```ts
declare const TaskStartHook: TaskStartHook<InputSchema, Dependencies>;
```

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

### TaskStreamEmitter

**Signature**

```ts
declare const TaskStreamEmitter: TaskStreamEmitter<Value>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/tasks.ts#L35)

### TaskStreamEmitters

**Signature**

```ts
declare const TaskStreamEmitters: TaskStreamEmitters<Streams>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/tasks.ts#L36)

### TaskStreamFrames

**Signature**

```ts
declare const TaskStreamFrames: TaskStreamFrames<Streams>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/tasks.ts#L37)

### TaskStreamInput

**Signature**

```ts
declare const TaskStreamInput: TaskStreamInput<Schema>;
```

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

### TaskStreamItem

**Signature**

```ts
declare const TaskStreamItem: TaskStreamItem<Schema>;
```

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

### TaskStreamOutput

**Signature**

```ts
declare const TaskStreamOutput: TaskStreamOutput<Schema>;
```

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

### TaskStreamSchemas

**Signature**

```ts
declare const TaskStreamSchemas: Readonly<Record<string, StandardSchemaV1<unknown, unknown>>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/tasks.ts#L41)

### TaskSuccessHook

**Signature**

```ts
declare const TaskSuccessHook: TaskSuccessHook<OutputSchema, Dependencies>;
```

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

### TaskTriggerOptions

**Signature**

```ts
declare const TaskTriggerOptions: TaskTriggerOptions<Task>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/relkit/src/app/tasks.ts#L43)

### TaskValidatedOutput

**Signature**

```ts
declare const TaskValidatedOutput: TaskValidatedOutput<T>;
```

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

### TriggerOptions

**Signature**

```ts
declare const TriggerOptions: TriggerOptions;
```

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

### assertTaskDescriptor

**Signature**

```ts
declare const assertTaskDescriptor: (value: unknown) => asserts value is TaskDescriptorAny;
```

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

### defineTask

**Signature**

```ts
declare const defineTask: <
  const Id extends string,
  const Version extends string,
  const InputSchema extends StandardSchemaV1,
  const OutputSchema extends StandardSchemaV1,
  const Dependencies extends TaskDependencies = {},
  const Errors extends readonly ErrorDescriptorAny[] = readonly [],
  const ProgressSchema extends StandardSchemaV1 | undefined = undefined,
  const Streams extends TaskStreamSchemas = {},
  const Execution extends TaskExecution = TaskExecution,
>(
  options: DefineTaskCallOptions<
    Id,
    Version,
    InputSchema,
    OutputSchema,
    Dependencies,
    Errors,
    ProgressSchema,
    Streams,
    Execution
  >,
) => TaskDescriptor<
  Id,
  Version,
  InputSchema,
  OutputSchema,
  Dependencies,
  Errors,
  ProgressSchema,
  Streams,
  TaskForm<Execution>
>;
```

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

### isTaskDescriptor

**Signature**

```ts
declare const isTaskDescriptor: (value: unknown) => value is TaskDescriptorAny;
```

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

## `tools.ts`

### "../tools/index.js" (namespace export)

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

**Signature**

```ts
export * from "../tools/index.js";
```

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