How temporalio/sdk-typescript works
Project Identification and Purpose
• This is a monorepo for the Temporal TypeScript SDK. Its purpose is to provide a comprehensive framework (SDK) for writing durable, fault‑tolerant workflows and activities in TypeScript/JavaScript.
• The README makes clear that it supports complex workflow execution and contains multiple packages (client, worker, workflow, etc.) which together interface with the Temporal backend.
Analyzing the File Structure
• The repository is organized into many top‑level directories. Key folders include:
– packages/client: Implements the client APIs to communicate with a Temporal server.
– packages/worker: Contains the workflow worker implementation, including logic to process and manage workflows and activities.
– packages/workflow: Provides APIs and runtime components to define workflows.
– packages/activity: Contains the code for workflow activities.
– packages/common: Shared utilities that are leveraged across other packages.
– packages/proto: Houses protocol buffer (protobuf) definitions and scripts to compile them.
– packages/testing: Contains the SDK’s internal tests to simulate workflows, client interactions, and worker behavior.
– Additional packages (e.g., create-project, docs, interceptors-opentelemetry, meta) provide scaffolding, documentation, or integration points.