npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@apache-airflow/ts-sdk

v1.0.0

Published

TypeScript Task SDK for Apache Airflow task handlers

Readme

Airflow TypeScript SDK

Write Apache Airflow Dags in TypeScript, and run them on Node.js.

Status: 1.0.0 · API may change · Node 22+ · ESM-only

Installation

npm install @apache-airflow/[email protected]
npm install --save-dev esbuild

Quick start

Declare a Dag in src/main.ts:

import { Bundle, Dag } from "@apache-airflow/ts-sdk";

const dag = new Dag("ts_hello", { schedule: "@daily", queue: "typescript" });

const extract = dag.task("extract", async (): Promise<number> => 42);
const report = dag.task("report", async ({ rows }: { rows: number }) => {
  console.log(`extracted ${rows} rows`);
});

report({ rows: extract() });

await new Bundle(dag).serve();

Build it into a single file:

npx airflow-ts-pack src/main.ts --outdir dist

Put dist/bundle.min.mjs in a Dag bundle, such as the default dags-folder bundle, and send the typescript queue to the Node.js coordinator in airflow.cfg:

[sdk]
coordinators = {"ts": {"classpath": "airflow.sdk.coordinators.node.NodeCoordinator"}}
queue_to_coordinator = {"typescript": "ts"}

Airflow reads the bundle like any other Dag file: ts_hello shows up in the UI, runs on its schedule, and report receives the value extract returned.

Learn more

The TypeScript SDK guide covers:

| Topic | Guide section | | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | | Task inputs, options, order-only dependencies, task groups, branching, triggering another Dag | Declaring a Dag in TypeScript | | approval and hitl tasks that wait for a person | Human-in-the-loop tasks | | getContext(), getClient() and the TaskClient | Writing tasks | | Building a bundle with airflow-ts-pack | Building a bundle | | Where to deploy a bundle, and the NodeCoordinator options | Deploying | | What a Dag declared in TypeScript cannot do yet | Limitations |

See example/ for a working project.

Compatibility matrix

Which Airflow TaskInstance states and capabilities this SDK supports. This table is generated from capabilities.yaml; the conformance dimensions are defined in the Language SDK conformance spec. Do not edit the table by hand. Update the manifest and run the update-ts-sdk-readme-matrix prek hook.

Min. Airflow version: 3.4.0 · supervisor schema: 2026-10-30

| Dimension | Tier | Supported | Since (Airflow) | Since (SDK) | Notes | |---|---|---|---|---|---| | TaskInstance states | | | | | | | state: success | MUST | ✓ | 3.4.0 | 1.0.0 | | | state: failed | MUST | ✓ | 3.4.0 | 1.0.0 | | | state: up_for_retry | MUST | ✓ | 3.4.0 | 1.0.0 | RetryTask | | state: skipped | SHOULD | ✓ | 3.4.0 | 1.0.0 | triggerDagRun with skipWhenAlreadyExists only | | state: deferred | MAY | ✓ | 3.4.0 | 1.0.0 | triggerDagRun with deferrable only | | state: up_for_reschedule | MAY | ✗ | – | – | runtime does not emit RescheduleTask yet | | state: awaiting_input | MAY | ✓ | 3.4.0 | 1.0.0 | approval() / hitl() in a Dag definition | | state: removed | MAY | ✓ | 3.4.0 | 1.0.0 | | | Task runtime | | | | | | | capability: task-logging | MUST | ✓ | 3.4.0 | 1.0.0 | structured records over the log socket | | capability: xcom-read-write | MUST | ✓ | 3.4.0 | 1.0.0 | getXCom / setXCom | | capability: connection-read | MUST | ✓ | 3.4.0 | 1.0.0 | getConnection | | capability: variable-read-write | MUST | ✓ | 3.4.0 | 1.0.0 | getVariable / setVariable / deleteVariable | | capability: self-contained-bundle | MUST | ✓ | 3.4.0 | 1.0.0 | Airflow metadata embedded in the bundle | | capability: retry-policy | MAY | ✗ | – | – | no task-facing retry-policy API yet | | capability: task-state-store | MAY | ✓ | 3.4.0 | 1.0.0 | taskStateStore.get / set / delete / clear | | capability: asset-state-store | MAY | ✗ | – | – | no task-facing asset state-store API yet | | capability: asset-event-emit | MAY | ✗ | – | – | runtime does not emit asset events yet | | capability: asset-event-read | MAY | ✗ | – | – | no task-facing asset-event API yet | | capability: object-store | MAY | ✗ | – | – | no object-storage API yet | | capability: listeners | MAY | ✗ | – | – | no hook into the Python listener API, so a task emits no OpenLineage facets of its own | | Dag definition | | | | | | | capability: dag-definition-authoring | SHOULD | ✓ | 3.4.0 | 1.0.0 | new Dag | | capability: dag-args | MUST † | ✓ | 3.4.0 | 1.0.0 | | | capability: task-args | MUST † | ✓ | 3.4.0 | 1.0.0 | | | capability: dag-params | MUST † | ✗ | – | – | | | capability: dag-callbacks | MAY † | ✗ | – | – | | | capability: explicit-dependencies | MUST † | ✓ | 3.4.0 | 1.0.0 | before / after | | capability: edge-labels | MAY † | ✓ | 3.4.0 | 1.0.0 | label(task, text) | | capability: taskflow-dependencies | MUST † | ✓ | 3.4.0 | 1.0.0 | | | capability: task-group | MAY † | ✓ | 3.4.0 | 1.0.0 | dag.taskGroup | | capability: task-loops | MAY † | ✗ | – | – | | | capability: if-else-branching | SHOULD † | ✓ | 3.4.0 | 1.0.0 | dag.if | | capability: switch-case-branching | SHOULD † | ✓ | 3.4.0 | 1.0.0 | dag.switch | | capability: trigger-dag-run | MAY † | ✓ | 3.4.0 | 1.0.0 | triggerDagRun | | capability: dynamic-dag-generation | MAY † | ✓ | 3.4.0 | 1.0.0 | | | capability: human-in-the-loop | MAY † | ✓ | 3.4.0 | 1.0.0 | approval() / hitl() | | capability: dag-test | SHOULD † | ✗ | – | – | | | capability: asset-definition | MAY † | ✗ | – | – | | | capability: asset-scheduling | MAY † | ✗ | – | – | | | capability: mapped-tasks | MAY † | ✗ | – | – | | | capability: asset-inlets-outlets | MAY † | ✗ | – | – | | | capability: task-callbacks | MAY † | ✗ | – | – | no SDK-defined task callbacks | | Python Dag with stub TaskHandler | | | | | | | capability: mixed-lang-stub-target | MUST | ✓ | 3.4.0 | 1.0.0 | @task.stub | | capability: taskflow-binding | MUST | ✓ | 3.4.0 | 1.0.0 | mapped stubs excluded | | capability: mapped-tasks | MAY | ✗ | – | – | Airflow does not bind arguments to mapped stubs yet | | capability: asset-inlets-outlets | MAY | ✗ | – | – | runtime does not report task outlets yet | | capability: task-callbacks | MAY | ✗ | – | – | a Python-declared task callback does not run for a stub task |

Marks: ✓ supported · ✗ not supported · n/a not applicable. A tier marked † applies only when dag-definition-authoring is supported.

Links