Uh oh!
There was an error while loading. Please reload this page.
Add TypeScript task SDK public interface - #67908
Conversation
shivaam
commented
Jun 3, 2026
@jason810496@uranusjr Appreciate your feedback |
Require TypeScript task handlers to register with separate dagId and taskId fields instead of a flat task id string. Store handlers in a Dag-scoped registry so task ids only need to be unique within a Dag, matching the Java and Go SDK registration model. Update README examples and public API type tests to use the explicit registration shape.
shivaam
commented
Jun 6, 2026
Addressed feedback from @ashb offline just on the user interface. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
uranusjr
commented
Jun 15, 2026
I think in general this is good. We should add a pre-commit hook to lint ts files in here. |
shivaam
commented
Jun 17, 2026
@uranusjr I have added a root prek hook for the TS SDK, following the existing Airflow TS/UI hooks. It runs the SDK’s local lint/format/typecheck scripts and auto-fixes lint/format issues where possible. |
jason810496
left a comment
There was a problem hiding this comment.
Thanks a lot for being patient and continue one TS-SDK, and sorry for pushing back on the user interface.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
shivaam
left a comment
There was a problem hiding this comment.
Addressed all 3 comments form @jason810496
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jason810496
left a comment
There was a problem hiding this comment.
Thanks for the update. LGTM.
@uranusjr Thanks for the reviews. Would it be possible to merge this PR so I can build upon it and add the protocol PR. |
Uh oh!
There was an error while loading. Please reload this page.
Adds a minimal
@apache-airflow/ts-sdkpackage that defines the public TypeScript task-handler contract.Summary:
dagIdandtaskIdfields.TaskClientinterfaces.dagId,taskId,runId,mapIndex, andconnId; coordinator/runtime code will map those names to Airflow schema fields.This PR has intentionally been narrowed to the user-facing SDK interface only. It does not include coordinator-mode execution, edge-worker execution, generated supervisor schema types, or Python coordinator registration. Those are intended as follow-up PRs built on this public interface.
Example intent:
The Python stub defines the Dag dependency graph. The TypeScript handler does the work and uses
TaskClientfor task-time Airflow data access. The follow-up coordinator runtime will launch Node.js, find the registered handler for that Dag/task pair, and run it.Next steps:
TaskClientimplementation, supervisor protocol/schema wiring, logging, cancellation handling, and PythonTypescriptCoordinatorregistration.Testing:
pnpm -C ts-sdk format:checkpnpm -C ts-sdk lintpnpm -C ts-sdk typecheckpnpm -C ts-sdk testpnpm -C ts-sdk run buildpnpm -C ts-sdk pack --dry-run~/.local/bin/prek run --from-ref upstream/main --stage pre-commit~/.local/bin/prek run --from-ref upstream/main --stage manualWas generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-5) following the guidelines
Drafted-by: Codex (GPT-5) (no human review before posting)