[PR #11784] fix: experimental enterprise share hook for auth headers #13929

Open
opened 2026-02-16 18:18:45 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11784

State: open
Merged: No


What does this PR do?

Adds experimental.share.fetch hook to allow enterprise users to to provide auth headers for session share.

Fixes: https://github.com/anomalyco/opencode/issues/11690

How did you verify your code works?

export const ShareAuthPlugin = async () => {
  return {
    "experimental.share.fetch": async (_input, output) => {
      output.headers.Authorization = "Bearer xxx";
    }
  }
};

Ran against instance requiring auth.

No existing tests for share-next so wasn't sure how you would like them done - ie how much to mock?

lmk how you would like them done. Thank v much!

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11784 **State:** open **Merged:** No --- ### What does this PR do? Adds `experimental.share.fetch` hook to allow enterprise users to to provide auth headers for session share. Fixes: https://github.com/anomalyco/opencode/issues/11690 ### How did you verify your code works? ```ts export const ShareAuthPlugin = async () => { return { "experimental.share.fetch": async (_input, output) => { output.headers.Authorization = "Bearer xxx"; } } }; ``` Ran against instance requiring auth. No existing tests for `share-next` so wasn't sure how you would like them done - ie how much to mock? lmk how you would like them done. Thank v much!
yindo added the pull-request label 2026-02-16 18:18:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13929