opencode
opencode copied to clipboard
feat(plugin): expose server URL to plugins
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 tohttp://localhost:4096 - Add
serverUrl: URLtoPluginInputso plugins receive the actual server address - Include
urlin health endpoint response for external clients
Test plan
- [x]
bun testpasses - [x] TypeScript compiles without errors