Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,14 @@ runtime/

# ---------- Not needed inside the Docker image ----------

# Desktop app source (Tauri/Electron); never installed in the container
apps/
# Desktop app source (Tauri/Electron). Most of apps/ is never installed in the
# container, BUT the `webchat_build` Dockerfile stage compiles apps/desktop (which
# imports apps/shared) into the /webchat bundle, so those two MUST stay in the
# build context. A blanket `apps/` ignore (re-introduced by an upstream sync) makes
# `cd apps/desktop` fail in that stage and breaks the whole image build.
apps/*
!apps/desktop
!apps/shared

# Test suite — not shipped in production images
tests/
Expand Down
25 changes: 25 additions & 0 deletions tui_gateway/slash_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,31 @@ def main():
with contextlib.redirect_stdout(io.StringIO()), contextlib.redirect_stderr(io.StringIO()):
cli = HermesCLI(model=args.model or None, compact=True, resume=args.session_key, verbose=False)

# The webchat turn assembles its tool list via cli.get_tool_definitions() ->
# wait_for_mcp_discovery(), but nothing in the slash-worker path ever STARTS
# discovery: the eager TUI / api_server startup that normally kicks it off is
# bypassed here, and the deferred fallback is gated on HERMES_DEFER_AGENT_STARTUP
# (unset). Without this, every webchat turn is served with ZERO MCP tools, so
# connected Pipedream apps (google_calendar, gmail, ...) are invisible to the
# agent even though the box has them configured. Kick discovery off and BLOCK
# until it finishes before we accept the first command, so the very first turn
# already has the MCP tools in its selection (a bare start would race the 0.75s
# wait_for_mcp_discovery timeout inside the turn and lose).
try:
import logging as _mcp_log
from hermes_cli.mcp_startup import (
start_background_mcp_discovery,
wait_for_mcp_discovery,
)

start_background_mcp_discovery(
logger=_mcp_log.getLogger("slash_worker"),
thread_name="slash-worker-mcp-discovery",
)
wait_for_mcp_discovery(timeout=25.0)
except Exception:
pass

for raw in sys.stdin:
line = raw.strip()
if not line:
Expand Down
Loading