feat: implement raycast backend
This commit is contained in:
@@ -7,6 +7,7 @@ discriminated-union members so downstream code can ``match`` on ``kind``.
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable # noqa: TC003 — runtime use by pydantic
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Annotated, Literal
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
@@ -27,7 +28,7 @@ class StdioMcp(_BaseMcp):
|
||||
kind: Literal["stdio"] = "stdio"
|
||||
command: tuple[str, ...]
|
||||
env: dict[str, str] | None = None
|
||||
cwd: str | None = None
|
||||
cwd: Path | None = None
|
||||
|
||||
|
||||
class HttpMcp(_BaseMcp):
|
||||
@@ -60,9 +61,14 @@ class McpServer:
|
||||
name: str,
|
||||
command: Iterable[str],
|
||||
env: dict[str, str] | None = None,
|
||||
cwd: str | None = None,
|
||||
cwd: Path | str | None = None,
|
||||
) -> StdioMcp:
|
||||
return StdioMcp(name=name, command=tuple(command), env=env, cwd=cwd)
|
||||
return StdioMcp(
|
||||
name=name,
|
||||
command=tuple(command),
|
||||
env=env,
|
||||
cwd=Path(cwd) if isinstance(cwd, str) else cwd,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def http(
|
||||
|
||||
Reference in New Issue
Block a user