Files
ServerKit/builtin-extensions/serverkit-gpu
Juan DenisandClaude Opus 4.8 dcde6ab64a fix(extensions): gate GPU auto-install on a present GPU; purge em dashes from manifests
Move serverkit-gpu from CONVERTED_BUILTIN_SLUGS into GATED_BUILTIN_SLUGS behind
a _gpu_present() predicate (shutil.which('nvidia-smi')), mirroring the email
gate: fresh installs stay marketplace-only, upgraded panels without a GPU no
longer get it, upgraded panels with a GPU keep it (D3 continuity). Rewrite the
12 builtin + baked extension descriptions that used em dashes into plain
sentences, keeping every pair in sync. New test_extension_manifests.py walks
both manifest trees to assert no em/en dashes and per-slug description parity.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 23:12:48 -04:00
..

serverkit-gpu

Live NVIDIA GPU metrics (utilization, VRAM, temperature, power, fan) for servers with a GPU. The first CORE_SLIM slice (plan 32 #7): both halves now live in this extension.

Layout

serverkit-gpu/
  plugin.json                     # entry_point gpu:gpu_bp, url_prefix /api/v1/gpu, sdk_version ^1.0.0
  backend/
    __init__.py
    gpu.py                        # blueprint (gpu_bp) — thin routing over the service
    gpu_service.py                # nvidia-smi parsing (no app.* imports)
  frontend/
    index.jsx                     # exports GpuMonitorPage (matched by contributions.routes)
    components/GpuMonitor.jsx      # the page UI (SDK + @/ imports)

The backend loads in-place as app.plugins.serverkit-gpu (mirrors the CrowdSec/WordPress extraction). The frontend ships baked: pre-bundled into frontend/src/plugins/serverkit-gpu/ by scripts/sync-builtin-frontends.mjs (the CI --check drift gate keeps source ↔ artifact in sync).

Shipping as a runtime-ESM bundle (deferred — plan 32 #9)

This slice is intentionally kept on the baked path for one release (CORE_SLIM dual-path guardrail). To later ship it as an external, no-rebuild runtime bundle (the loader plan 32 hardens), follow docs/EXTENSIONS_CI.md:

  1. Add a frontend/vite.config.mjs (via scripts/new-extension.mjs --template frontend-esm) that externalizes react, react-dom, react/jsx-runtime, react-router-dom, serverkit-sdk and emits dist/index.mjs.
  2. Blocker to resolve first: GpuMonitor.jsx imports EmptyState and Button from the host via the @/ alias — these are NOT on the SDK surface, so an externalized build can't resolve them. Either promote both into serverkit-sdk (a deliberate SDK minor bump) or bundle equivalents into the extension. _gpu.scss (core design-system SCSS) must likewise move into the bundle's inlined CSS.
  3. Set frontend_entry: dist/index.mjs, cut a release + sha256, and swap the registry entry — the operator runbook docs/runbooks/extension-release-and-tamper-e2e.md covers publishing + the tamper e2e.

Until then the baked path serves the page and the runtime loader is unaffected.