Skip to content

docs: add plugins page to SDK reference#208

Open
nvasiu wants to merge 1 commit into
mainfrom
plugins-docs
Open

docs: add plugins page to SDK reference#208
nvasiu wants to merge 1 commit into
mainfrom
plugins-docs

Conversation

@nvasiu

@nvasiu nvasiu commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available:

#205

Description of changes:

New Page

durable-execution/sdk-reference/plugins/plugins/:

  • Description of the plugin interfaces for our SDKs
  • How to define plugins
  • How to use plugins
  • Description of interface hooks
  • How to log from plugins
  • A section for Typescript only hooks that we aren't planning to add to the other SDKs

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

Comment thread docs/sdk-reference/index.md Outdated
Comment thread docs/sdk-reference/plugins/plugins.md Outdated
Comment thread docs/sdk-reference/plugins/plugins.md
Comment thread docs/sdk-reference/plugins/plugins.md Outdated
@nvasiu nvasiu force-pushed the plugins-docs branch 2 times, most recently from dcafd15 to f2341fa Compare June 24, 2026 18:47
Comment thread docs/sdk-reference/plugins/plugins.md
Comment thread docs/sdk-reference/plugins/plugins.md
Comment thread docs/sdk-reference/plugins/plugins.md
Comment thread docs/sdk-reference/plugins/plugins.md Outdated
--8<-- "examples/java/sdk-reference/plugins/use-plugin.java"
```

## Logging from a plugin

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The section should describe how you can enhance logs for each SDK via the plugin. You'll have to be more descriptive in each of these sections.

Namely, for Python and Java I don't know if this happens within a hook (I'm not sure how it works, but the description right now looks wrong).

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.

Rewrote the logging section for each language, need to confirm if they are correct.

Comment thread docs/sdk-reference/plugins/plugins.md

### Checkpoint-change hook

`onOperationChange` fires when a checkpoint response reports that operations

@SilanHe SilanHe Jun 24, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We should add this hook to all SDK plugin interfaces @zhongkechen @wangyb-A @ayushiahjolia

Comment thread docs/sdk-reference/plugins/plugins.md Outdated
Comment on lines +73 to +74
The SDK awaits `onInvocationEnd` before continuing the execution. All other
hooks are fire-and-forget.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is this true for Java? I thought all plugin hooks were awaited/synchronous/on the user thread

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.

Misunderstood the comments from the Java hooks, "fire-and-forgot" just refers to how they swallow errors / ignore returns. Removing this sentence.

--8<-- "examples/typescript/sdk-reference/plugins/invocation-hooks.ts"
```

`onInvocationStart` and `onInvocationEnd` both return `Promise<void>`, and

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

all hooks are awaited in Javascript

Comment thread examples/typescript/sdk-reference/plugins/wrapper-hooks.ts
Comment thread examples/typescript/sdk-reference/plugins/complete-plugin.ts

=== "Java"

The `onUserFunctionStart` and `onUserFunctionEnd` hooks run on the same

Copy link
Copy Markdown

Choose a reason for hiding this comment

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


=== "Python"

A plugin can enrich logs by installing a standard `logging.Filter` on the

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

4 participants