Skip to content

feat: add abort signal support - #8

Merged
ahmed-hashi-01 merged 1 commit into
mainfrom
feat/add-abort-signal
Jun 18, 2026
Merged

ahmed-hashi-01 merged 1 commit into
mainfrom
feat/add-abort-signal

Conversation

@ahmed-hashi-01

Copy link
Copy Markdown
Contributor

Summary

Adds AbortSignal support to DeadlineKit operations.

What changed

  • Added DeadlineExceededError
  • Added isAbortError
  • Updated budget.run() to pass an AbortSignal into operations
  • Aborts operations when the step timeout expires
  • Caps per-step timeout by the remaining total deadline
  • Updated tests for abort-aware timeout behavior
  • Updated examples to use the new AbortSignal API

Notes

AbortSignal communicates cancellation to the operation. The operation must pass the signal into an API that supports aborting, or handle the signal itself.

Checks

  • npm run example:basic
  • npm run example:fallback
  • npm run example:expired
  • npm run typecheck
  • npm test -- --run
  • npm run build

@ahmed-hashi-01
ahmed-hashi-01 merged commit a9daa19 into main Jun 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant