Production contracts
Jeston also exposes provider-agnostic contracts for migrations, retries, circuit breakers, metrics, tracing, cache invalidation, and streaming storage. The built-in implementations are reference implementations for local development and conformance tests; distributed production state should use a managed provider adapter.SQL migrations
Create a migration pair with the CLI:.down.sql file is present.
Jobs and resilience
InMemoryJobQueue demonstrates the queue contract with idempotency keys, bounded concurrency, retries, backoff, and dead-letter capture. Use a Redis, SQS, or RabbitMQ adapter for durable multi-instance execution. withRetry, createCircuitBreaker, and fetchWithPolicy make retry budgets, timeouts, and upstream limits explicit.
Metrics and tracing
createMetricsRegistry records counter and histogram samples, while withSpan and TraceAdapter provide a small integration surface for OpenTelemetry or another tracing provider. Never attach credentials, cookies, raw request bodies, or other secrets to spans.
Cache
ACacheAdapter provides get, set, and delete. Include an explicit TTL. Treat cache as disposable and never rely on it as the only source of truth.
Jobs
AJobQueue accepts a name, payload, delay, and optional idempotency key. Workers must be idempotent, retry transient failures, and send permanently failing work to a dead-letter workflow.
Storage
AStorageAdapter supports streaming uploads, reads, and deletes. Use object storage for production files rather than local disk when the application can scale horizontally.
Provider selection
The core does not ship provider SDKs. Choose an adapter that documents its Node version, failure behavior, retries, security policy, and operational limits.

