[PR #6373] feat(plugin): expose server URL to plugins #11866

Closed
opened 2026-02-16 18:16:48 -05:00 by yindo · 0 comments
Owner

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

State: closed
Merged: Yes


Plugins currently have no way to know the actual server URL. When the server starts on a dynamic port (e.g., if 4096 is unavailable), plugins are unaware of the actual address.

Changes

  • Add Server.url() function to retrieve the running server's URL with fallback to http://localhost:4096
  • Add serverUrl: URL to PluginInput so plugins receive the actual server address
  • Include url in health endpoint response for external clients

Test plan

  • bun test passes
  • TypeScript compiles without errors
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6373 **State:** closed **Merged:** Yes --- Plugins currently have no way to know the actual server URL. When the server starts on a dynamic port (e.g., if 4096 is unavailable), plugins are unaware of the actual address. ### Changes - Add `Server.url()` function to retrieve the running server's URL with fallback to `http://localhost:4096` - Add `serverUrl: URL` to `PluginInput` so plugins receive the actual server address - Include `url` in health endpoint response for external clients ### Test plan - [x] `bun test` passes - [x] TypeScript compiles without errors
yindo added the pull-request label 2026-02-16 18:16:48 -05:00
yindo closed this issue 2026-02-16 18:16:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11866