Add TypeScript Task SDK#67908
Open
shivaam wants to merge 6 commits into
Open
Conversation
Adds `ts-sdk/` — a TypeScript SDK for authoring and running Airflow tasks in Node.js. Supports two execution modes: - **Coordinator mode** (AIP-108): spawned as a subprocess by `TypescriptCoordinator`; communicates over TCP with the Airflow supervisor using the same 4-byte length-prefixed msgpack protocol as the Python and Java SDKs. Supports all 13 `TaskClient` APIs (Variables, XCom, Connections, Dag operations, secret masking) and DAG serialization. - **Edge Worker mode** (AIP-69/72): long-lived HTTPS worker using JWT authentication; picks up tasks from the edge executor queue. Wire types are generated from the supervisor schema (introduced in PR apache#67235) at `ts-sdk/schema/supervisor-schema.json`, pinned to `SUPERVISOR_API_VERSION = "2026-06-16"`. Includes unit tests (180 tests) and integration test workers.
- Remove references to internal dev notes (COORDINATOR.md, TESTING.md, SDK_COMPARISON.md, REVIEW_OBSERVATIONS.md, REFACTOR_NOTES.md) that are not part of this PR - Add esbuild bundling command and coordinator config example - Add mode-limitation table documenting which TaskClient methods are edge-only vs coordinator-only - Add logging section explaining coordinator structured logs vs edge stdout - Add @throws JSDoc to 5 coordinator-only TaskClient methods so IDEs surface the limitation on hover
…ing docs Update the default provider version fallback from 3.5.0 to 3.7.0 to match current breeze/Airflow releases; set via AIRFLOW__EDGE__PROVIDER_VERSION if your deployment uses a different version. Expand edge-mode E2E testing docs with required env vars, per-scenario worker commands, and a breeze-specific note about the is_stale scheduler gate that can strand queued runs when DAG files are freshly copied.
Contributor
Author
|
@jason810496 @uranusjr Appreciate your feedback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add `ts-sdk/` — a TypeScript SDK for authoring and running Airflow tasks in Node.js. Supports two execution modes:
Coordinator mode (AIP-108): spawned as a one-shot subprocess per task by `TypescriptCoordinator` (companion PR); communicates over TCP with the Airflow supervisor using the same 4-byte length-prefixed msgpack protocol as the Python and Java SDKs. Supports all 13 `TaskClient` APIs (Variables, XCom, Connections, Dag operations, secret masking) and DAG serialization.
Edge Worker mode (AIP-69/72): long-lived HTTPS worker using JWT authentication; picks up tasks from the edge executor queue.
Both modes share `registerTask()` and the same `TaskClient` interface — handlers are mode-agnostic.
What's included
What's deferred (follow-up PRs)
Testing
```bash
cd ts-sdk
pnpm install
pnpm test # 180 tests, all pass
pnpm run typecheck
```
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Sonnet 4.6) following the guidelines
Drafted-by: Claude Code (Sonnet 4.6) (no human review before posting)