b4fbd6fe9f
Deploy Site / deploy-vercel (push) Has been skipped
Deploy Site / deploy-docs (push) Has been skipped
Build Skills Index / build-index (push) Has been skipped
Build Skills Index / trigger-deploy (push) Waiting to run
CI / Deny unrelated histories (push) Has been skipped
CI / CI timing report (push) Blocked by required conditions
CI / Detect affected areas (push) Successful in 27m35s
CI / OSV scan (push) Failing after 4s
CI / Build&Test Docker image (push) Successful in 9s
CI / Supply-chain scan (push) Has been skipped
CI / Lint Docker scripts (push) Failing after 5m13s
CI / Check contributors (push) Failing after 12m8s
CI / Docs Site (push) Failing after 12m8s
CI / TypeScript (push) Failing after 12m8s
CI / Python lints (push) Failing after 12m9s
CI / Python tests (push) Failing after 12m9s
CI / Check uv.lock (push) Failing after 23m22s
CI / All required checks pass (push) Waiting to run
25 lines
1.0 KiB
Python
25 lines
1.0 KiB
Python
"""Example dashboard plugin — backend API routes (test fixture).
|
|
|
|
This plugin lives under ``tests/fixtures/plugins/`` so it is NOT shipped as
|
|
part of the bundled-plugins set; a stock hermes-agent install does not see
|
|
an "Example" tab in its sidebar. The ``_install_example_plugin`` pytest
|
|
fixture in ``tests/hermes_cli/test_web_server.py`` copies this directory
|
|
into ``$HERMES_HOME/plugins/example-dashboard/`` and forces the dashboard
|
|
plugin discovery cache to rescan, so tests that need a stable, side-effect-
|
|
free GET endpoint to verify plugin API auth + static-asset behaviour can
|
|
hit ``/api/plugins/example/hello`` (and ``/dashboard-plugins/example/
|
|
manifest.json``) without depending on any production-facing plugin.
|
|
|
|
Mounted at /api/plugins/example/ by the dashboard plugin system.
|
|
"""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/hello")
|
|
async def hello():
|
|
"""Simple greeting endpoint to demonstrate plugin API routes."""
|
|
return {"message": "Hello from the example plugin!", "plugin": "example", "version": "1.0.0"}
|