Skip to content

[Brook] Added generic call methods to the Worker extension. - #200

Closed
moetemp wants to merge 4 commits into
moe/brook/v3/c2-history-factsfrom
moe/brook/v3/c3-extension-call
Closed

moetemp wants to merge 4 commits into
moe/brook/v3/c2-history-factsfrom
moe/brook/v3/c3-extension-call

Conversation

@moetemp

@moetemp moetemp commented Oct 21, 2026

Copy link
Copy Markdown
Owner

What changed?

This PR adds call and call_async to WorkerExtension. Each takes a method name and encoded input, and returns encoded output or an ExtensionError with a tonic::Code, a message and encoded details. Both default to Unimplemented. Core never calls them.

Why?

Lang code must reach a plugin's native code in the same library as Core, and the bridge should not have a function for each plugin. With these methods a bridge exposes one generic extension_call, and lang maps the code and details to its own errors.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

Unit tests for the default methods and for an extension that routes by method name and returns details.

A bridge can route one generic lang call to the extension by method name, so a plugin's native code needs no bridge function of its own.
@moetemp moetemp changed the title [Brook] Added generic call methods to the worker extension. [Brook] Added generic call methods to the Worker extension. Oct 21, 2026
@moetemp

moetemp commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

Closing as stale. This layer is folded into the v5 tip, #209, and the upstream review uses one fresh PR instead. Plan: https://www.notion.so/4048fc567738814990b7c796ac28fe3f

@moetemp moetemp closed this Oct 25, 2026
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