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

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

For configuration and examples, read [docker](/docs/modules/jobs/docker), [providers](/docs/modules/jobs/providers).

## Public imports

- `@relkit/trigger` — 7 exports
- `@relkit/trigger/runtime` — 22 exports
- `@relkit/trigger/local-recipe` — 1 exports
- `@relkit/trigger/deployment` — 4 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                                                                                                               |
| ------------------------------------------------------------------------------------------------------------- | ----- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| [createTriggerHttpClient](/docs/api/integrations/trigger#createtriggerhttpclient)                             | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [createTriggerRuntime](/docs/api/integrations/trigger#createtriggerruntime)                                   | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [createTriggerTask](/docs/api/integrations/trigger#createtriggertask)                                         | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [createTriggerTaskConfig](/docs/api/integrations/trigger#createtriggertaskconfig)                             | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [createTriggerWorker](/docs/api/integrations/trigger#createtriggerworker)                                     | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [deploymentProfile](/docs/api/integrations/trigger#deploymentprofile)                                         | Value | `@relkit/trigger/deployment`   | [Module example](/docs/modules/jobs/docker)                                                                           |
| [loadTriggerSdk](/docs/api/integrations/trigger#loadtriggersdk)                                               | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [localRecipe](/docs/api/integrations/trigger#localrecipe-1)                                                   | Value | `@relkit/trigger/local-recipe` | [Module example](/docs/modules/jobs/docker)                                                                           |
| [nativeWorkerPublication](/docs/api/integrations/trigger#nativeworkerpublication)                             | Value | `@relkit/trigger/deployment`   | [Module example](/docs/modules/jobs/docker)                                                                           |
| [observeTriggerRun](/docs/api/integrations/trigger#observetriggerrun)                                         | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [runtimeIntegration](/docs/api/integrations/trigger#runtimeintegration)                                       | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [statusOf](/docs/api/integrations/trigger#statusof-1)                                                         | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [trigger](/docs/api/integrations/trigger#trigger)                                                             | Value | `@relkit/trigger`              | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/jobs/providers/trigger-config.ts#L12) |
| [TriggerAdapter](/docs/api/integrations/trigger#triggeradapter-type-alias)                                    | Type  | `@relkit/trigger`              | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerBehavior](/docs/api/integrations/trigger#triggerbehavior-type-alias)                                  | Type  | `@relkit/trigger`              | [Module example](/docs/modules/jobs/docker)                                                                           |
| [triggerConnectionContract](/docs/api/integrations/trigger#triggerconnectioncontract)                         | Value | `@relkit/trigger`              | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerDeploymentProfile](/docs/api/integrations/trigger#triggerdeploymentprofile-interface)                 | Type  | `@relkit/trigger/deployment`   | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerHttpClientOptions](/docs/api/integrations/trigger#triggerhttpclientoptions-interface)                 | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [triggerIntegration](/docs/api/integrations/trigger#triggerintegration)                                       | Value | `@relkit/trigger`              | [Module example](/docs/modules/jobs/docker)                                                                           |
| [triggerLocalRecipe](/docs/api/integrations/trigger#triggerlocalrecipe)                                       | Value | `@relkit/trigger`              | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerNativeClient](/docs/api/integrations/trigger#triggernativeclient-interface)                           | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerObservationOptions](/docs/api/integrations/trigger#triggerobservationoptions-interface)               | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerOptions](/docs/api/integrations/trigger#triggeroptions-interface)                                     | Type  | `@relkit/trigger`              | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerRuntime](/docs/api/integrations/trigger#triggerruntime-interface)                                     | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerRuntimeOptions](/docs/api/integrations/trigger#triggerruntimeoptions-interface)                       | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerSdk](/docs/api/integrations/trigger#triggersdk-interface)                                             | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerSdkApi](/docs/api/integrations/trigger#triggersdkapi-interface)                                       | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [triggerSnapshot](/docs/api/integrations/trigger#triggersnapshot-1)                                           | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerSubscription](/docs/api/integrations/trigger#triggersubscription-interface)                           | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerTaskDefinition](/docs/api/integrations/trigger#triggertaskdefinition-interface)                       | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [triggerTaskIdentifier](/docs/api/integrations/trigger#triggertaskidentifier-1)                               | Value | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerWorkerHandle](/docs/api/integrations/trigger#triggerworkerhandle-interface)                           | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerWorkerPublication](/docs/api/integrations/trigger#triggerworkerpublication-interface)                 | Type  | `@relkit/trigger/deployment`   | [Module example](/docs/modules/jobs/docker)                                                                           |
| [TriggerWorkerRegistrationOptions](/docs/api/integrations/trigger#triggerworkerregistrationoptions-interface) | Type  | `@relkit/trigger/runtime`      | [Module example](/docs/modules/jobs/docker)                                                                           |

## `index.ts`

### TriggerDeploymentProfile (interface)

**Signature**

```ts
export interface TriggerDeploymentProfile {
  readonly provider: "trigger";
  readonly compatibility: "unverified";
  readonly adapterId: "trigger";
  readonly sdk: "4.5.16";
  readonly dockerImageDigest: "sha256:3563088912cf4b880602d99815ddd787274c4ce5fc77738adf1e5bad287fbd1e";
  readonly dockerDurableSleep: false;
  readonly managedStatus: "not-tested";
  readonly scheduleVariants: readonly string[];
  readonly workerRuntime: "bun";
  readonly executionLimits: Readonly<{
    readonly inputBytes: number;
    readonly progressBytes: number;
    readonly maxRunList: number;
  }>;
  readonly policyIdentity: readonly string[];
}
```

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

### TriggerWorkerPublication (interface)

**Signature**

```ts
export interface TriggerWorkerPublication {
  readonly provider: "trigger";
  readonly mechanism: "trigger-sdk";
  readonly taskId: string;
  readonly taskVersion: string;
  readonly buildId: string;
  readonly serviceGeneration: string;
  readonly entrypoint: string;
}
```

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

### deploymentProfile

**Signature**

```ts
declare const deploymentProfile: TriggerDeploymentProfile;
```

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

### nativeWorkerPublication

**Signature**

```ts
declare const nativeWorkerPublication: (
  value: Omit<TriggerWorkerPublication, "provider" | "mechanism">,
) => TriggerWorkerPublication;
```

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

## `index.ts`

### TriggerAdapter (type alias)

**Signature**

```ts
type TriggerAdapter<Options extends TriggerOptions = TriggerOptions> = ProviderAdapter<
  typeof job,
  "trigger",
  ProviderConnectionValues,
  ProviderBehavior<TriggerBehavior>
>;
```

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

### TriggerBehavior (type alias)

**Signature**

```ts
type TriggerBehavior = JobsServiceBehavior;
```

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

### TriggerOptions (interface)

**Signature**

```ts
export interface TriggerOptions extends JobsServiceOptions {
  readonly projectRef?: string | TextReference;
  readonly secretKey?: SecretReference;
  readonly baseUrl?: string | URL | TextReference;
  readonly native?: Readonly<Record<string, import("@relkit/contracts").JsonValue>>;
}
```

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

### trigger

**Signature**

```ts
declare const trigger: <const Options extends TriggerOptions = TriggerOptions>(
  options?: Options,
) => TriggerAdapter<Options>;
```

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

### triggerConnectionContract

**Signature**

```ts
declare const triggerConnectionContract: ProviderConnectionContract;
```

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

### triggerIntegration

**Signature**

```ts
declare const triggerIntegration: IntegrationReference<"trigger">;
```

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

### triggerLocalRecipe

**Signature**

```ts
declare const triggerLocalRecipe: ProviderLocalRecipeReference;
```

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

## `index.ts`

### localRecipe

**Signature**

```ts
declare const localRecipe: Readonly<{
  kind: "local-service-recipe";
  protocolVersion: 2;
  integrationId: "trigger";
  recipeId: "trigger-docker";
  recipeVersion: 2;
  materializerId: "docker";
  containers: ReadonlyArray<
    | Readonly<{
        id: "postgres";
        image: "postgres:16-alpine@sha256:cf78e76683b9ca8c5733cbbdce6c9262b45b6767934dd0a95e671f9a0fc20685";
        ports: Readonly<{}>;
        volumes: ReadonlyArray<{ name: string; mountPath: string }>;
        environment: Readonly<{
          POSTGRES_DB: Readonly<{ value: "trigger" }>;
          POSTGRES_USER: Readonly<{ value: "trigger" }>;
          POSTGRES_PASSWORD: Readonly<{ secret: "postgresPassword" }>;
        }>;
        health: Readonly<{ command: Array<string>; intervalMs: 250; timeoutMs: 2000; retries: 60 }>;
        networkAliases: ReadonlyArray<string>;
      }>
    | Readonly<{
        id: "trigger";
        image: "triggerdotdev/trigger.dev@sha256:3563088912cf4b880602d99815ddd787274c4ce5fc77738adf1e5bad287fbd1e";
        dependsOn: ReadonlyArray<string>;
        ports: Readonly<{ api: 8030 }>;
        health: Readonly<{
          command: Array<string>;
          intervalMs: 500;
          timeoutMs: 2000;
          retries: 120;
        }>;
        networkAliases: ReadonlyArray<string>;
        environment: Readonly<{
          DATABASE_URL: Readonly<{
            value: "postgres://trigger:$POSTGRES_PASSWORD@postgres:5432/trigger";
          }>;
          TRIGGER_ACCOUNT_FREE: Readonly<{ value: "1" }>;
          TRIGGER_PROJECT_REF: Readonly<{ secret: "projectRef" }>;
          TRIGGER_SECRET_KEY: Readonly<{ secret: "secretKey" }>;
        }>;
      }>
  >;
  init: ReadonlyArray<
    Readonly<{
      id: "postgres-ready";
      image: "postgres:16-alpine@sha256:cf78e76683b9ca8c5733cbbdce6c9262b45b6767934dd0a95e671f9a0fc20685";
      dependsOn: ReadonlyArray<string>;
      command: ReadonlyArray<string>;
      environment: Readonly<{ POSTGRES_PASSWORD: Readonly<{ secret: "postgresPassword" }> }>;
    }>
  >;
  workers: ReadonlyArray<
    Readonly<{
      id: "worker";
      image: "oven/bun:1.3.10@sha256:b86c67b531d87b4db11470d9b2bd0c519b1976eee6fcd71634e73abfa6230d2e";
      command: ReadonlyArray<string>;
      dependsOn: ReadonlyArray<string>;
      ports: Readonly<{ api: 3000 }>;
      health: Readonly<{ command: Array<string>; intervalMs: 500; timeoutMs: 2000; retries: 120 }>;
      networkAliases: ReadonlyArray<string>;
    }>
  >;
  volumes: Readonly<{
    postgres: Readonly<{ mountPath: "/var/lib/postgresql/data"; persistent: true }>;
  }>;
  generatedSecrets: Readonly<{
    postgresPassword: Readonly<{ bytes: 24; encoding: "hex" }>;
    projectRef: Readonly<{ bytes: 12; encoding: "hex" }>;
    secretKey: Readonly<{ bytes: 32; encoding: "hex" }>;
  }>;
  network: Readonly<{ internal: false }>;
  ownership: Readonly<{ scope: "project"; retainVolumes: true }>;
  outputs: ({ ports, secrets }: LocalServiceRecipeOutputContext) => Readonly<{
    baseUrl: string;
    projectRef: string;
    secretKey: string;
  }>;
}>;
```

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

## `local.ts`

### localRecipe

**Signature**

```ts
declare const localRecipe: Readonly<{
  kind: "local-service-recipe";
  protocolVersion: 2;
  integrationId: "trigger";
  recipeId: "trigger-docker";
  recipeVersion: 2;
  materializerId: "docker";
  containers: ReadonlyArray<
    | Readonly<{
        id: "postgres";
        image: "postgres:16-alpine@sha256:cf78e76683b9ca8c5733cbbdce6c9262b45b6767934dd0a95e671f9a0fc20685";
        ports: Readonly<{}>;
        volumes: ReadonlyArray<{ name: string; mountPath: string }>;
        environment: Readonly<{
          POSTGRES_DB: Readonly<{ value: "trigger" }>;
          POSTGRES_USER: Readonly<{ value: "trigger" }>;
          POSTGRES_PASSWORD: Readonly<{ secret: "postgresPassword" }>;
        }>;
        health: Readonly<{ command: Array<string>; intervalMs: 250; timeoutMs: 2000; retries: 60 }>;
        networkAliases: ReadonlyArray<string>;
      }>
    | Readonly<{
        id: "trigger";
        image: "triggerdotdev/trigger.dev@sha256:3563088912cf4b880602d99815ddd787274c4ce5fc77738adf1e5bad287fbd1e";
        dependsOn: ReadonlyArray<string>;
        ports: Readonly<{ api: 8030 }>;
        health: Readonly<{
          command: Array<string>;
          intervalMs: 500;
          timeoutMs: 2000;
          retries: 120;
        }>;
        networkAliases: ReadonlyArray<string>;
        environment: Readonly<{
          DATABASE_URL: Readonly<{
            value: "postgres://trigger:$POSTGRES_PASSWORD@postgres:5432/trigger";
          }>;
          TRIGGER_ACCOUNT_FREE: Readonly<{ value: "1" }>;
          TRIGGER_PROJECT_REF: Readonly<{ secret: "projectRef" }>;
          TRIGGER_SECRET_KEY: Readonly<{ secret: "secretKey" }>;
        }>;
      }>
  >;
  init: ReadonlyArray<
    Readonly<{
      id: "postgres-ready";
      image: "postgres:16-alpine@sha256:cf78e76683b9ca8c5733cbbdce6c9262b45b6767934dd0a95e671f9a0fc20685";
      dependsOn: ReadonlyArray<string>;
      command: ReadonlyArray<string>;
      environment: Readonly<{ POSTGRES_PASSWORD: Readonly<{ secret: "postgresPassword" }> }>;
    }>
  >;
  workers: ReadonlyArray<
    Readonly<{
      id: "worker";
      image: "oven/bun:1.3.10@sha256:b86c67b531d87b4db11470d9b2bd0c519b1976eee6fcd71634e73abfa6230d2e";
      command: ReadonlyArray<string>;
      dependsOn: ReadonlyArray<string>;
      ports: Readonly<{ api: 3000 }>;
      health: Readonly<{ command: Array<string>; intervalMs: 500; timeoutMs: 2000; retries: 120 }>;
      networkAliases: ReadonlyArray<string>;
    }>
  >;
  volumes: Readonly<{
    postgres: Readonly<{ mountPath: "/var/lib/postgresql/data"; persistent: true }>;
  }>;
  generatedSecrets: Readonly<{
    postgresPassword: Readonly<{ bytes: 24; encoding: "hex" }>;
    projectRef: Readonly<{ bytes: 12; encoding: "hex" }>;
    secretKey: Readonly<{ bytes: 32; encoding: "hex" }>;
  }>;
  network: Readonly<{ internal: false }>;
  ownership: Readonly<{ scope: "project"; retainVolumes: true }>;
  outputs: ({ ports, secrets }: LocalServiceRecipeOutputContext) => Readonly<{
    baseUrl: string;
    projectRef: string;
    secretKey: string;
  }>;
}>;
```

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

## `index-support.ts`

### observationOptions

**Signature**

```ts
declare const observationOptions: (options: TriggerRuntimeOptions) => TriggerObservationOptions;
```

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

### optionalText

**Signature**

```ts
declare const optionalText: (value: unknown) => string | undefined;
```

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

### text

**Signature**

```ts
declare const text: (value: unknown, label: string) => string;
```

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

### unknown

**Signature**

```ts
declare const unknown: (value: NativeControlReceipt) => boolean;
```

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

### url

**Signature**

```ts
declare const url: (value: string) => void;
```

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

## `index.ts`

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

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

**Signature**

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

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

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

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

**Signature**

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

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

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

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

**Signature**

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

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

### TriggerRuntime (interface)

**Signature**

```ts
export interface TriggerRuntime extends JobsAdapterRuntime {
  readonly registerWorker: (options: TriggerWorkerRegistrationOptions) => TriggerWorkerHandle;
}
```

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

### TriggerRuntimeOptions (interface)

**Signature**

```ts
export interface TriggerRuntimeOptions {
  readonly projectRef: string;
  readonly secretKey?: string;
  readonly baseUrl: string;
  readonly fetch?: typeof globalThis.fetch;
  readonly native?: TriggerNativeClient;
  readonly sdk?: TriggerSdk;
  readonly supportsDurableSleep?: boolean;
  readonly pollIntervalMs?: number;
  readonly maxPolls?: number;
  readonly serviceOptions?: JobsServiceOptions;
}
```

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

### TriggerWorkerRegistrationOptions (interface)

**Signature**

```ts
export interface TriggerWorkerRegistrationOptions {
  readonly definitions: readonly TriggerTaskDefinition[];
  readonly executor: import("@relkit/jobs/adapter").TaskExecutor;
  readonly startWorker?: boolean;
  readonly register?: (tasks: readonly unknown[]) => Promise<void> | void;
}
```

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

### createTriggerRuntime

**Signature**

```ts
declare const createTriggerRuntime: (options: TriggerRuntimeOptions) => TriggerRuntime;
```

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

### runtimeIntegration

**Signature**

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

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

## `native.ts`

### TriggerHttpClientOptions (interface)

**Signature**

```ts
export interface TriggerHttpClientOptions {
  readonly baseUrl: string;
  readonly projectRef: string;
  readonly secretKey?: string;
  readonly fetch?: typeof globalThis.fetch;
  readonly client?: TriggerSdkApi;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/native.ts#L56)

### TriggerNativeClient (interface)

**Signature**

```ts
export interface TriggerNativeClient {
  readonly submit: (request: NativeSubmission, context: OperationContext) => Promise<NativeReceipt>;
  readonly get: (runId: string, context: OperationContext) => Promise<NativeRun>;
  readonly list: (query: NativeRunQuery, context: OperationContext) => Promise<NativeRunPage>;
  readonly cancel: (
    runId: string,
    operationId: string,
    reason: string | undefined,
    context: OperationContext,
  ) => Promise<NativeControlReceipt>;
  readonly retry: (
    request: NativeRetryRequest,
    context: OperationContext,
  ) => Promise<NativeControlReceipt>;
  readonly subscribeToRun?: (
    runId: string,
    context: OperationContext,
    after?: string,
  ) => Promise<TriggerSubscription | undefined>;
  readonly schedules?: NativeScheduleOperations;
  readonly registerTasks?: (tasks: readonly unknown[]) => Promise<void> | void;
  readonly close?: () => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/native.ts#L32)

### TriggerSdkApi (interface)

**Signature**

```ts
export interface TriggerSdkApi {
  readonly tasks: {
    readonly trigger: (...args: readonly unknown[]) => Promise<unknown>;
  };
  readonly runs: {
    readonly retrieve: (...args: readonly unknown[]) => Promise<unknown>;
    readonly list: (...args: readonly unknown[]) => Promise<unknown>;
    readonly cancel: (...args: readonly unknown[]) => Promise<unknown>;
    readonly replay: (...args: readonly unknown[]) => Promise<unknown>;
    readonly subscribeToRun: (...args: readonly unknown[]) => AsyncIterable<unknown>;
  };
}
```

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

### TriggerSubscription (interface)

**Signature**

```ts
export interface TriggerSubscription {
  readonly stream: AsyncIterable<unknown>;
  readonly unsubscribe?: () => Promise<void> | void;
}
```

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

### createTriggerHttpClient

Compatibility name retained for callers; the implementation uses the pinned SDK.

**Signature**

```ts
declare const createTriggerHttpClient: (options: TriggerHttpClientOptions) => TriggerNativeClient;
```

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

### statusOf

**Signature**

```ts
declare const statusOf: (value: unknown) => RunSnapshot["status"];
```

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

### triggerSnapshot

**Signature**

```ts
declare const triggerSnapshot: (
  value: unknown,
  context: OperationContext,
  fallbackRunId?: string,
) => NativeRun;
```

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

### triggerTaskIdentifier

**Signature**

```ts
declare const triggerTaskIdentifier: (
  request: Pick<NativeSubmission, "jobId" | "taskId" | "taskVersion" | "buildId">,
) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/native.ts#L70)

## `sdk-list.ts`

### listRuns

**Signature**

```ts
declare const listRuns: (
  client: TriggerSdkApi,
  projectRef: string,
  query: NativeRunQuery,
  context: OperationContext,
) => Promise<NativeRunPage>;
```

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

## `sdk-mapping.ts`

### isJsonValue

**Signature**

```ts
declare const isJsonValue: (value: unknown) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/sdk-mapping.ts#L107)

### record

**Signature**

```ts
declare const record: (value: unknown) => Record<string, any> | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/sdk-mapping.ts#L116)

### statusOf

**Signature**

```ts
declare const statusOf: (value: unknown) => RunSnapshot["status"];
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/sdk-mapping.ts#L78)

### triggerSnapshot

**Signature**

```ts
declare const triggerSnapshot: (
  value: unknown,
  context: OperationContext,
  fallbackRunId?: string,
) => NativeRun;
```

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

## `sdk-native-support.ts`

### definiteRejection

**Signature**

```ts
declare const definiteRejection: (error: unknown) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/sdk-native-support.ts#L107)

### handle

**Signature**

```ts
declare const handle: (value: unknown, request: NativeSubmission) => RunHandle;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/sdk-native-support.ts#L61)

### loadClient

**Signature**

```ts
declare const loadClient: (options: TriggerHttpClientOptions) => TriggerSdkApi;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/sdk-native-support.ts#L73)

### metadata

**Signature**

```ts
declare const metadata: (
  request: NativeSubmission,
  context: OperationContext,
) => Record<string, string>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/sdk-native-support.ts#L13)

### text

**Signature**

```ts
declare const text: (value: unknown, label: string) => string;
```

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

### triggerOptions

**Signature**

```ts
declare const triggerOptions: (
  request: NativeSubmission,
  context: OperationContext,
) => Record<string, unknown>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/sdk-native-support.ts#L46)

### unknownControl

**Signature**

```ts
declare const unknownControl: (operationId: string) => JobUnknownOutcome;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/sdk-native-support.ts#L98)

### unknownSubmission

**Signature**

```ts
declare const unknownSubmission: (request: NativeSubmission) => JobUnknownOutcome;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/sdk-native-support.ts#L89)

## `sdk-native.ts`

### createTriggerSdkNativeClient

**Signature**

```ts
declare const createTriggerSdkNativeClient: (
  options: TriggerHttpClientOptions,
) => TriggerNativeClient;
```

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

## `sdk-support.ts`

### triggerTaskIdentifier

**Signature**

```ts
declare const triggerTaskIdentifier: (
  request: Pick<NativeSubmission, "jobId" | "taskId" | "taskVersion" | "buildId">,
) => string;
```

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

## `subscription.ts`

### TriggerObservationOptions (interface)

**Signature**

```ts
export interface TriggerObservationOptions {
  readonly pollIntervalMs?: number;
  readonly readTimeoutMs?: number;
  readonly maxPolls?: number;
}
```

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

### observeTriggerRun

**Signature**

```ts
declare const observeTriggerRun: (
  request: NativeWatchRequest,
  context: OperationContext,
  client: TriggerNativeClient,
  options?: TriggerObservationOptions,
) => AsyncGenerator<NativeObservation>;
```

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

## `task-binding-support.ts`

### bindingFrom

**Signature**

```ts
declare const bindingFrom: (
  envelope: TaskExecutionEnvelope,
  context: unknown,
) => TaskExecutionBinding;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/task-binding-support.ts#L48)

### envelopeFrom

**Signature**

```ts
declare const envelopeFrom: (
  payload: unknown,
  context: unknown,
  definition: TriggerTaskDefinition,
) => TaskExecutionEnvelope;
```

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

### number

**Signature**

```ts
declare const number: (value: unknown) => number | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/task-binding-support.ts#L135)

### record

**Signature**

```ts
declare const record: (value: unknown) => Record<string, any> | undefined;
```

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

### text

**Signature**

```ts
declare const text: (value: unknown, label: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/task-binding-support.ts#L130)

## `task-binding.ts`

### TriggerSdk (interface)

**Signature**

```ts
export interface TriggerSdk {
  readonly createTask?: (options: Readonly<Record<string, unknown>>) => unknown;
  readonly task?: (options: Readonly<Record<string, unknown>>) => unknown;
  readonly tasks?:
    ((options: Readonly<Record<string, unknown>>) => unknown) | Readonly<Record<string, unknown>>;
}
```

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

### TriggerTaskDefinition (interface)

**Signature**

```ts
export interface TriggerTaskDefinition {
  readonly id: string;
  readonly jobId?: string;
  readonly taskId?: string;
  readonly version: string;
  readonly buildId: string;
  readonly retries?: number;
  readonly trigger?: Readonly<Record<string, unknown>>;
  readonly policy?: unknown;
  readonly resources?: {
    readonly cpu: number;
    readonly memory: string;
    readonly nativeClass?: string;
  };
}
```

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

### TriggerWorkerHandle (interface)

**Signature**

```ts
export interface TriggerWorkerHandle {
  readonly tasks: readonly unknown[];
  readonly ready: () => Promise<void>;
  readonly close: () => Promise<void>;
}
```

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

### createTriggerTask

**Signature**

```ts
declare const createTriggerTask: (
  sdk: TriggerSdk,
  definition: TriggerTaskDefinition,
  executor: TaskExecutor,
) => unknown;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/task-binding.ts#L43)

### createTriggerTaskConfig

**Signature**

```ts
declare const createTriggerTaskConfig: (
  definition: TriggerTaskDefinition,
) => Readonly<Record<string, unknown>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/task-binding.ts#L60)

### createTriggerWorker

**Signature**

```ts
declare const createTriggerWorker: (options: {
  readonly sdk?: TriggerSdk;
  readonly definitions: readonly TriggerTaskDefinition[];
  readonly executor: TaskExecutor;
  readonly register?: (tasks: readonly unknown[]) => Promise<void> | void;
}) => TriggerWorkerHandle;
```

[Source](https://github.com/rel-kit/relkit/blob/main/integrations/packages/trigger/src/runtime/task-binding.ts#L84)

### loadTriggerSdk

**Signature**

```ts
declare const loadTriggerSdk: () => TriggerSdk;
```

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