opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(plugin): expose server URL to plugins

Open EduSantosBrito opened this issue 3 weeks ago • 0 comments

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

EduSantosBrito avatar Dec 29 '25 17:12 EduSantosBrito