Compare commits

...

1 Commits

Author SHA1 Message Date
AFredefon
aa50787869 fix(hub): increase StreamReader limit and add volumes/expandvars support 2026-03-02 02:19:08 +01:00
2 changed files with 6 additions and 1 deletions

View File

@@ -243,7 +243,7 @@ class HubClient:
# Add volumes # Add volumes
for volume in config.volumes: for volume in config.volumes:
cmd.extend(["-v", os.path.expanduser(volume)]) cmd.extend(["-v", os.path.expandvars(os.path.expanduser(volume))])
# Add environment variables # Add environment variables
for key, value in config.environment.items(): for key, value in config.environment.items():
@@ -256,6 +256,7 @@ class HubClient:
stdin=subprocess.PIPE, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
limit=4 * 1024 * 1024, # 4 MB — default 64 KB breaks large YARA/capa results
) )
try: try:
@@ -300,6 +301,7 @@ class HubClient:
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
env=env, env=env,
limit=4 * 1024 * 1024, # 4 MB — default 64 KB breaks large tool results
) )
try: try:

View File

@@ -237,6 +237,7 @@ async def add_hub_server(
description: str | None = None, description: str | None = None,
capabilities: list[str] | None = None, capabilities: list[str] | None = None,
environment: dict[str, str] | None = None, environment: dict[str, str] | None = None,
volumes: list[str] | None = None,
) -> dict[str, Any]: ) -> dict[str, Any]:
"""Add a new MCP server to the hub. """Add a new MCP server to the hub.
@@ -252,6 +253,7 @@ async def add_hub_server(
:param description: Human-readable description. :param description: Human-readable description.
:param capabilities: Docker capabilities to add (e.g., ["NET_RAW"]). :param capabilities: Docker capabilities to add (e.g., ["NET_RAW"]).
:param environment: Environment variables to pass. :param environment: Environment variables to pass.
:param volumes: Docker volume mounts (e.g., ["~/.fuzzforge/hub/workspace:/data"]).
:return: Information about the added server. :return: Information about the added server.
Examples: Examples:
@@ -290,6 +292,7 @@ async def add_hub_server(
description=description, description=description,
capabilities=capabilities or [], capabilities=capabilities or [],
environment=environment or {}, environment=environment or {},
volumes=volumes or [],
) )
server = executor.add_server(config) server = executor.add_server(config)