Warning, /swf-remote/AGENTS.md is written in an unsupported language. File is not indexed.
0001 # swf-remote
0002
0003 Start from the SWF workspace guide, `../swf-testbed/CLAUDE.md`
0004 (<https://github.com/BNLNPPS/swf-testbed/blob/main/CLAUDE.md>): the
0005 system, the workspace, how to work, production and collaboration. This
0006 file adds what is particular to swf-remote, the external face of the
0007 platform at epic-devcloud.org: it consumes swf-monitor's pages, REST
0008 endpoints and MCP server through an SSH tunnel from pandaserver02 at BNL,
0009 and adds devcloud sign-in, per-user tokens and TeamComms.
0010
0011 TeamComms authentication, proxying and deployment: `docs/teamcomms.md`.
0012
0013 ## Architecture
0014
0015 - **Web pages**: most (hub, PanDA, PCS, Alarms, System) are full rendered HTML proxied from
0016 swf-monitor via monitor_client.proxy(), with swf-monitor URLs rewritten to
0017 local /prod/ paths. The MCP setup page, the tokens page, and the auth
0018 pages render locally with swf-remote's own base.html. Old local alarm code remains for
0019 rollback/reference, but live /prod/alarms/ proxies to swf-monitor.
0020 - **MCP relay**: /prod/mcp/ forwards swf-monitor's MCP endpoint through the
0021 tunnel as the signed-in user; headless clients use per-user tokens
0022 (remote_app/token_auth.py, docs/live-data-access.md).
0023 - **Data source**: Thin REST endpoints on swf-monitor wrapping panda/queries.py.
0024 - **No local PanDA data**: All data comes from swf-monitor through the tunnel.
0025
0026 ## Conventions
0027
0028 Follow swf-monitor conventions: python-decouple, single settings.py, same
0029 URL structure under /panda/.
0030
0031 ## Nav
0032
0033 swf-remote holds no nav markup. `base.html` renders `{% monitor_nav %}`,
0034 which takes the nav element from swf-monitor's production hub through the
0035 tunnel (`monitor_client.nav_html`), rewritten and with local auth controls
0036 like every proxied page, cached for a minute. A nav change on the monitor
0037 appears on every devcloud page without a change here.