feat: expose GitHub server instance to npm library #931
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This commit separates the
mainlogic into a separate file, now marked as the binary entry point for the package, and updates the index to export the server instance. This allows the package to be used as a library, enabling the server to be used with custom transports in other projects.Server Details
Motivation and Context
I'd like to be able to import the server in my own
main.tsand provide a custom transport, rather than just stdio/SSE.How Has This Been Tested?
I've tested this with Claude Desktop using the Docker image & command, but I can't tell what the incantation is to test the local checkout with
npxunfortunately. Any advice would be great.Breaking Changes
I don't think so, since the docs for
npxstate:So I'm pretty sure anyone with the
npxcommand configured will get the same usage as before.Types of changes
Checklist
Additional context
This only changes one server to reduce the scope of the PR, but I'm happy to go through all the others and make a similar change, if that's agreeable. Let me know 👍