-
Notifications
You must be signed in to change notification settings - Fork 863
Inject env var in headers + better type annotations #3142
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
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 |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| from typing import Dict, List, Literal, TypedDict, Union | ||
|
|
||
|
|
||
| # Input config | ||
| class InputConfig(TypedDict, total=False): | ||
| id: str | ||
| description: str | ||
| type: str | ||
| password: bool | ||
|
|
||
|
|
||
| # stdio server config | ||
| class StdioServerConfig(TypedDict, total=False): | ||
| command: str | ||
| args: List[str] | ||
| env: Dict[str, str] | ||
| cwd: str | ||
|
|
||
|
|
||
| class StdioServer(TypedDict): | ||
| type: Literal["stdio"] | ||
| config: StdioServerConfig | ||
|
|
||
|
|
||
| # http server config | ||
| class HTTPRequestInit(TypedDict, total=False): | ||
| headers: Dict[str, str] | ||
|
|
||
|
|
||
| class HTTPServerOptions(TypedDict, total=False): | ||
| requestInit: HTTPRequestInit | ||
| sessionId: str | ||
|
|
||
|
|
||
| class HTTPServerConfig(TypedDict, total=False): | ||
| url: str | ||
| options: HTTPServerOptions | ||
|
|
||
|
|
||
| class HTTPServer(TypedDict): | ||
| type: Literal["http"] | ||
| config: HTTPServerConfig | ||
|
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. i think we should switch now to the standard server config schema https://code.visualstudio.com/docs/copilot/chat/mcp-servers and remove the nested cc @julien-c
Member
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. yep probably... (no super strong opinion) |
||
|
|
||
|
|
||
| # sse server config | ||
| class SSEServerOptions(TypedDict, total=False): | ||
| requestInit: HTTPRequestInit | ||
|
|
||
|
|
||
| class SSEServerConfig(TypedDict): | ||
| url: str | ||
| options: SSEServerOptions | ||
|
|
||
|
|
||
| class SSEServer(TypedDict): | ||
| type: Literal["sse"] | ||
| config: SSEServerConfig | ||
|
|
||
|
|
||
| # AgentConfig root object | ||
| class AgentConfig(TypedDict): | ||
| model: str | ||
| provider: str | ||
| inputs: List[InputConfig] | ||
| servers: List[Union[StdioServer, HTTPServer, SSEServer]] | ||
Uh oh!
There was an error while loading. Please reload this page.