-
-
Notifications
You must be signed in to change notification settings - Fork 2
Redesign transport #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Redesign transport #143
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| from .factory import create_transport_with_auth | ||
| from .factory import build_driver_with_auth | ||
|
|
||
| __all__ = ["create_transport_with_auth"] | ||
| __all__ = ["build_driver_with_auth"] |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,28 +1,64 @@ | ||||||||
| from .base import TransportProtocol | ||||||||
| from .http import HTTPTransport | ||||||||
| from .sse import SSETransport | ||||||||
| from .stdio import StdioTransport | ||||||||
| from .streamable_http import StreamableHTTPTransport | ||||||||
| from .factory import create_transport | ||||||||
| from .manager import TransportManager, TransportProcessState | ||||||||
| from .custom import ( | ||||||||
| CustomTransportRegistry, | ||||||||
| register_custom_transport, | ||||||||
| create_custom_transport, | ||||||||
| list_custom_transports, | ||||||||
| """Transport subsystem composed of interfaces, drivers, catalogs, and controllers.""" | ||||||||
|
|
||||||||
| from .interfaces import ( | ||||||||
| TransportDriver, | ||||||||
| DriverState, | ||||||||
| ParsedEndpoint, | ||||||||
| DriverBaseBehavior, | ||||||||
| HttpClientBehavior, | ||||||||
| ResponseParserBehavior, | ||||||||
| LifecycleBehavior, | ||||||||
| TransportError, | ||||||||
| NetworkError, | ||||||||
| PayloadValidationError, | ||||||||
| JsonRpcAdapter, | ||||||||
| ) | ||||||||
| from .drivers import ( | ||||||||
| HttpDriver, | ||||||||
| SseDriver, | ||||||||
| StdioDriver, | ||||||||
| StreamHttpDriver, | ||||||||
| ) | ||||||||
| from .catalog import ( | ||||||||
| DriverCatalog, | ||||||||
| driver_catalog, | ||||||||
| build_driver, | ||||||||
| EndpointResolver, | ||||||||
| CustomDriverCatalog, | ||||||||
| register_custom_driver, | ||||||||
| build_custom_driver, | ||||||||
| list_custom_drivers, | ||||||||
| custom_driver_catalog, | ||||||||
| ) | ||||||||
| from .controller.coordinator import TransportCoordinator | ||||||||
| from .controller.process_supervisor import ProcessSupervisor, ProcessState | ||||||||
|
Comment on lines
+33
to
+34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial 🧩 Analysis chain🏁 Script executed: cat mcp_fuzzer/transport/controller/__init__.py 2>/dev/null || echo "File not found"Repository: Agent-Hellboy/mcp-server-fuzzer Length of output: 711 Import from The -from .controller.coordinator import TransportCoordinator
-from .controller.process_supervisor import ProcessSupervisor, ProcessState
+from .controller import TransportCoordinator, ProcessSupervisor, ProcessState📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
|
|
||||||||
| __all__ = [ | ||||||||
| "TransportProtocol", | ||||||||
| "HTTPTransport", | ||||||||
| "SSETransport", | ||||||||
| "StdioTransport", | ||||||||
| "StreamableHTTPTransport", | ||||||||
| "TransportManager", | ||||||||
| "TransportProcessState", | ||||||||
| "create_transport", | ||||||||
| "CustomTransportRegistry", | ||||||||
| "register_custom_transport", | ||||||||
| "create_custom_transport", | ||||||||
| "list_custom_transports", | ||||||||
| "TransportDriver", | ||||||||
| "DriverState", | ||||||||
| "ParsedEndpoint", | ||||||||
| "DriverBaseBehavior", | ||||||||
| "HttpClientBehavior", | ||||||||
| "ResponseParserBehavior", | ||||||||
| "LifecycleBehavior", | ||||||||
| "TransportError", | ||||||||
| "NetworkError", | ||||||||
| "PayloadValidationError", | ||||||||
| "JsonRpcAdapter", | ||||||||
| "HttpDriver", | ||||||||
| "SseDriver", | ||||||||
| "StdioDriver", | ||||||||
| "StreamHttpDriver", | ||||||||
| "DriverCatalog", | ||||||||
| "driver_catalog", | ||||||||
| "build_driver", | ||||||||
| "EndpointResolver", | ||||||||
| "CustomDriverCatalog", | ||||||||
| "register_custom_driver", | ||||||||
| "build_custom_driver", | ||||||||
| "list_custom_drivers", | ||||||||
| "custom_driver_catalog", | ||||||||
| "TransportCoordinator", | ||||||||
| "ProcessSupervisor", | ||||||||
| "ProcessState", | ||||||||
| ] | ||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| """Driver catalog, builders, and custom driver helpers.""" | ||
|
|
||
| from .catalog import DriverCatalog | ||
| from .builder import driver_catalog, build_driver | ||
| from .resolver import EndpointResolver | ||
| from .custom_catalog import ( | ||
| CustomDriverCatalog, | ||
| register_custom_driver, | ||
| build_custom_driver, | ||
| list_custom_drivers, | ||
| custom_driver_catalog, | ||
| ) | ||
|
|
||
| __all__ = [ | ||
| "DriverCatalog", | ||
| "driver_catalog", | ||
| "build_driver", | ||
| "EndpointResolver", | ||
| "CustomDriverCatalog", | ||
| "register_custom_driver", | ||
| "build_custom_driver", | ||
| "list_custom_drivers", | ||
| "custom_driver_catalog", | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Custom transport loading correctly targets the new TransportDriver interface
The loader now cleanly aligns with the redesigned transport layer: it imports
TransportDriver, validates custom classes withissubclass(transport_class, TransportDriver), and registers them throughregister_custom_driver, with the schema text updated to referencebuild_driver. This tightens type safety around the new driver abstraction; just be aware this is a breaking change for any external custom transports that previously subclassed the old protocol base and will now need to adoptTransportDriver.Also applies to: 137-257, 330-376
🤖 Prompt for AI Agents