31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
"""Cortex OS Plugin Hermes WebUI Host Adapter extraction surface."""
|
|
|
|
from routes import cortex_os_runtime_health
|
|
|
|
PACKAGE_ID = "cortex-os-extension"
|
|
MEMBER_ID = "s23-runtime-health-read-only-slice"
|
|
ACTIVE_DEVELOPMENT_MOUNT_TARGET = "hermes-webui"
|
|
SURFACE_ID = "hermes-webui-host-adapter"
|
|
RUNTIME_HEALTH_ROUTE = "/api/cortex-os/runtime-health"
|
|
RUNTIME_HEALTH_METHOD = "GET"
|
|
RUNTIME_HEALTH_STYLESHEET = "/plugins/{static_prefix}/cortex-os/runtime-health/runtime_health.css"
|
|
RUNTIME_HEALTH_SCRIPT = "/plugins/{static_prefix}/cortex-os/runtime-health/runtime_health.js"
|
|
|
|
|
|
def register(api, static_prefix):
|
|
"""Register only the Cortex OS Runtime Health member for Hermes WebUI."""
|
|
log = api.logger("svrnty.routes.cortex_os_extension")
|
|
stylesheet = RUNTIME_HEALTH_STYLESHEET.format(static_prefix=static_prefix)
|
|
script = RUNTIME_HEALTH_SCRIPT.format(static_prefix=static_prefix)
|
|
|
|
api.inject_stylesheet(stylesheet)
|
|
api.inject_script(script)
|
|
cortex_os_runtime_health.register(api)
|
|
|
|
log.info(
|
|
"cortex-os-extension mounted: %s %s via %s",
|
|
RUNTIME_HEALTH_METHOD,
|
|
RUNTIME_HEALTH_ROUTE,
|
|
SURFACE_ID,
|
|
)
|