resonate-basic-durable-world-usage-typescript
OfficialDurable, recoverable TypeScript workflows
Software Engineering#typescript#human-in-the-loop#determinism#structured-concurrency#durable-workflows#resonate#ctx.run
Authorresonatehq
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides clear, practical guidance for writing durable generator functions with the Resonate TypeScript SDK so developers can build recoverable, deterministic workflows that survive crashes and replays. It eliminates common replay bugs caused by misuse of async/await, non-deterministic APIs, or improper serialization across process boundaries.
Core Features & Use Cases
- Durable Context API patterns: how to use ctx.run, ctx.beginRun, ctx.rpc, ctx.beginRpc, ctx.detached, ctx.sleep, and ctx.promise correctly to checkpoint execution and coordinate local or remote work.
- Determinism and serialization rules: guidance on deterministic helpers for time and randomness, serializable RPC arguments, and promise ID strategies for human-in-the-loop and webhook-driven flows.
- Structured concurrency and error handling: fork-join patterns, implicit awaiting of started work, assert/panic usage, and anti-patterns to avoid unintended side effects on replay.
- Real-world scenarios: order processing with parallel validation and RPCs, human approval flows with externally resolvable promises, long-duration scheduling with durable sleeps, and safe side-effect wrapping.
Quick Start
Create a generator function that uses yield* ctx.run to call an async helper, yield* ctx.sleep to wait a specific duration, and yield* ctx.promise with a deterministic ID if an external system must resolve it.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: resonate-basic-durable-world-usage-typescript Download link: https://github.com/resonatehq/resonate-skills/archive/main.zip#resonate-basic-durable-world-usage-typescript Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.