Runlane
ReferenceApplication API

Defaults

Read the shared defaults used by Runlane's application APIs.

contractDefaults from @runlane/core is the source of shared runtime defaults. Read it when your application needs to reuse a default. Do not copy a fallback value into your own configuration.

import { contractDefaults } from '@runlane/core'

const { dispatch, environment, idempotency, lease, maintenance, pagination, pruning, retry, sort, worker } =
  contractDefaults

console.log(
  JSON.stringify(
    { dispatch, environment, idempotency, lease, maintenance, pagination, pruning, retry, sort, worker },
    null,
    2,
  ),
)

The current values are shown below. They are generated from contractDefaults; a documentation check compares this block with the exported values.

{
  "dispatch": {
    "onTrigger": "eager"
  },
  "environment": {
    "name": "default"
  },
  "idempotency": {
    "defaultTTL": "30d"
  },
  "lease": {
    "duration": "5m"
  },
  "maintenance": {
    "cancellationFinalizationLimit": 100,
    "clockSkewTolerance": "5s",
    "deliveryRequestLimit": 100,
    "outboxClaimLimit": 100,
    "outboxRetryDelay": "30s",
    "scheduleMaterializationLimit": 100,
    "services": {
      "interval": "1s",
      "maximumFailureBackoff": "1m",
      "minimumLeaseDuration": "1m"
    },
    "timeoutFinalizationLimit": 100,
    "waitTokenResumeLimit": 100,
    "waitTokenTimeoutLimit": 100
  },
  "pagination": {
    "defaultLimit": 50,
    "maxLimit": 500
  },
  "pruning": {
    "batchLimit": 500
  },
  "retry": {
    "backoff": "30s"
  },
  "sort": {
    "runEvents": {
      "direction": "desc",
      "field": "occurred_at"
    },
    "runs": {
      "direction": "desc",
      "field": "created_at"
    },
    "tokens": {
      "direction": "desc"
    }
  },
  "worker": {
    "concurrency": 1
  }
}
GroupWhere it applies
dispatchPublishing policy after a trigger.
environmentDefault namespace for a runtime.
idempotencyTerminal retention for a run's idempotency key when no TTL is supplied.
leaseWorker ownership duration between renewals.
maintenanceLimits for each pass, service timing, and recovery delays.
paginationDefault and maximum page sizes for operator lists.
pruningBatch size for retention cleanup.
retryDelay used when a task has a retry policy but omits backoff.
sortDefault order for run, event, and token lists.
workerParallel attempts within one delivery worker.

Settings without an automatic policy

  • Omitting task retry disables automatic retries. Setting it requires maxAttempts; there is no default attempt budget.
  • Omitting maxAttemptDuration from both the task and execution options leaves the attempt without a deadline. Its lease still applies.
  • Omitting queue.concurrencyLimit leaves that queue unbounded. A worker's local concurrency setting still applies.
  • Omitting token timeout leaves that token without a deadline.
  • Omitting a token's idempotencyKeyTTL keeps terminal key ownership until the token is pruned. Run keys use contractDefaults.idempotency.defaultTTL when no TTL is supplied.

Provider-specific limits belong to the selected lane or adapter. See choose a lane and the provider's configuration guide.

On this page