Files
ruflo/.github/workflows
rUvandr 058943b053 fix(chat-ui): local-only by default; bridge tools gated by reviewed capability (#5236)
Docker chat UI
- nginx publishes on 127.0.0.1:3000. The chat UI has no sign-in and the
  bridge token authenticates the app, not the browser user. Remote access
  needs an HTTPS sign-in proxy on the compose network with the host mapping
  removed (documented in docker-compose.yml).
- nginx forwards Host with its port ($http_host), so the chat UI's origin
  check accepts the browser's own origin. Chat through nginx returned
  "Invalid referer" before.
- CI fails if any published compose port is not loopback.

MCP bridges (src/mcp-bridge and src/ruvocal/mcp-bridge)
- Replace the terminal-name check with tool-policy.js, a shared table that
  assigns each (backend, tool) a capability: read, state, search, network,
  file or shell. Unknown tools are denied, including Claude Code tools and
  anything a backend adds later.
- read, state and search are allowed by default. MCP_ALLOW_CAPABILITIES opts
  into more; MCP_ENABLE_TERMINAL=true still adds shell.
- The policy is applied when the tool list is built, so listing, every
  /mcp/<group> endpoint, autopilot and execution share one decision, and a
  denied call is refused before anything reaches a backend.
- test-tool-policy.mjs runs both bridges against stub backends and a stub
  model: denied and unknown calls never reach a backend on any path, and
  approved read calls still do (123 checks). It fails on the old gate.

Validated on a local compose stack built from this tree: ports 3000/3001
refuse the LAN and tailnet addresses; the bridge rejects a missing token;
the real ruflo/ruvector tool lists contain no shell, file or network tool;
denied calls return TOOL_DISABLED; chat streams through nginx.

Co-authored-by: r <r@x>
2026-12-02 11:51:24 -05:00
..