-
Notifications
You must be signed in to change notification settings - Fork 819
simplify backend protocol #209
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: harrison/cli-pluggable
Are you sure you want to change the base?
Conversation
| default: BackendProtocol | StateBackend, | ||
| routes: dict[str, BackendProtocol], | ||
| default: Backend, | ||
| routes: dict[str, Backend], |
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.
Why is routes a dictionary? Why so general?
| ... | ||
| # Backend factory function types | ||
| BackendProvider = Callable[[ToolRuntime], Backend] | ||
| AsyncBackendProvider = Callable[[ToolRuntime], Awaitable[Backend]] |
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.
We'll need async support at some point for all operations + the factory itself. Would suggest not adding it until we're ready to add full async support
| checkpointer: Checkpointer | None = None, | ||
| store: BaseStore | None = None, | ||
| backend: BackendProtocol | None = None, | ||
| backend: BackendProvider | None = None, |
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.
This should be Backend
Simplify backend protocol