refactor: reorganize internal modules into sub-packages#10
Merged
Conversation
…kages Group scattered underscore-prefixed modules into logical sub-packages: - _crypto/: _aes.py, _aes_openssl.py, _crypto.py (AES encryption) - _cli/: _banner.py, _hook.py, _setup.py (CLI-only utilities) Public API unchanged. Backward-compat shim kept at _hook.py for deployed codex hook scripts. Closes #9
Add _BearerAuthMiddleware and token parameter to run_mcp() so that SSE and streamable-http transports can require Authorization header. Stdio transport ignores the token (no HTTP layer).
Owner
Author
|
Note: This PR includes an unrelated commit ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
_aes.py,_aes_openssl.py,_crypto.py) into_crypto/sub-package_banner.py,_hook.py,_setup.py) into_cli/sub-package_hook.pyfor deployed codex hook scriptsCloses #9
Test plan
pytest tests/— 331 passedfrom weilink import WeiLink, ILinkError, Message)_cryptosub-package works (from weilink._crypto import ...)_clisub-package works (from weilink._cli import ...)from weilink._hook import hook_poll)ruff checkandruff formatpass