Skip to content

Conversation

@EduSantosBrito
Copy link
Contributor

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

@EduSantosBrito EduSantosBrito force-pushed the feat/expose-server-url-to-plugins branch from 1af1185 to ae72a72 Compare December 29, 2025 22:12
@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

The PR description mentions "Include url in health endpoint response for external clients" but this change is not present in the diff. The health endpoint still returns only { healthy: true, version: Installation.VERSION }. Is this intentional, or was this part of the feature not implemented?

Otherwise, the code changes look good and follow the style guide. The let _url usage is justified since it needs to be assigned after server startup.

@rekram1-node rekram1-node merged commit 4657fa8 into sst:dev Dec 30, 2025
2 checks passed
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.

2 participants