MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / get_server_capabilities_api

Function get_server_capabilities_api

webapp_modern.py:16728–16755  ·  view source on GitHub ↗

Get server capabilities and feature availability

()

Source from the content-addressed store, hash-verified

16726 }
16727
16728 return jsonify(response_data)
16729 except Exception as e:
16730 logger.error(f"Error getting netkb JSON: {e}")
16731 return jsonify({'error': str(e)}), 500
16732
16733
16734# ============================================================================
16735# WEBSOCKET EVENTS
16736# ============================================================================
16737
16738# ============================================================================
16739# WEB TERMINAL (interactive PTY over Socket.IO, /terminal namespace)
16740#
16741# Off by default (config 'terminal_enabled'). Runs a shell as the non-root
16742# 'ragnar' user in the repo dir. Gated by login AND the config flag; the
16743# service runs as root only to drop to 'ragnar' via `su`.
16744# ============================================================================
16745
16746_TERM_USER = 'ragnar'
16747_TERM_CWD = '/home/ragnar/Ragnar'
16748_term_sessions = {} # socket sid -> {'fd': int, 'pid': int}
16749_term_lock = threading.Lock()
16750
16751
16752def _terminal_enabled():
16753 try:
16754 return bool(shared_data.config.get('terminal_enabled', False))
16755 except Exception:
16756 return False
16757
16758

Callers

nothing calls this directly

Calls 5

get_server_capabilitiesFunction · 0.90
get_capabilitiesMethod · 0.80
get_feature_statusMethod · 0.80
errorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected