Skip to content

feat(sdk): Plugin interface and runner#548

Open
SilanHe wants to merge 9 commits into
mainfrom
plugin-interface-and-runner
Open

feat(sdk): Plugin interface and runner#548
SilanHe wants to merge 9 commits into
mainfrom
plugin-interface-and-runner

Conversation

@SilanHe
Copy link
Copy Markdown
Contributor

@SilanHe SilanHe commented May 20, 2026

Issue #, if available: #545

Description of changes:

Introduce the plugin system foundation for the durable execution SDK:

  • DurableInstrumentationPlugin interface with lifecycle hooks for
    execution, invocation, operation, and attempt-level events
  • Plugin runner that composes multiple plugins with fire-and-forget and callback-wrapping execution semantics
  • Operation utility helpers (toOperationInfo, toAttemptInfo, etc.)
  • Export plugin types from the public API
  • Add plugins config field to DurableExecutionConfig

This is a pure additive change with no wiring into the SDK handlers.
Subsequent PRs will wire the hooks into the execution lifecycle and
individual operation handlers.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

hsilan added 4 commits May 20, 2026 14:01
Introduce the plugin system foundation for the durable execution SDK:

- DurableInstrumentationPlugin interface with lifecycle hooks for
  execution, invocation, operation, and attempt-level events
- Plugin runner that composes multiple plugins with fire-and-forget,
  awaited, and callback-wrapping execution semantics
- Operation utility helpers (toOperationInfo, toAttemptInfo, etc.)
- shouldSampleExecution utility for deterministic sampling
- Export plugin types from the public API
- Add plugins config field to DurableExecutionConfig

This is a pure additive change with no wiring into the SDK handlers.
Subsequent PRs will wire the hooks into the execution lifecycle and
individual operation handlers.
@SilanHe SilanHe changed the title Plugin interface and runner feat(sdk): Plugin interface and runner May 20, 2026
@SilanHe SilanHe closed this May 20, 2026
@SilanHe SilanHe reopened this May 20, 2026
@SilanHe SilanHe marked this pull request as ready for review May 20, 2026 23:24
@SilanHe SilanHe requested a review from ParidelPooya May 21, 2026 17:02
info: T,
defaults: Partial<OperationInfo>,
): T {
info.Id = defaults.Id ?? "";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we overriding this always?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's because the Id we get back from getStepData is different from the raw Id, it's hashed once it's returned from getStepData. I'm trying to always provide a consistent Id and I chose to provide the unhashed Id.

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.

3 participants