Securex SECUREXSECURITY ENGINEERING 平台
DEVELOPER CENTER · Store R20.1 · 2026-11-22 · Universal v1.9.121 Fix106 R791

SecureX Core Plugin Developer Docs

Plugin baselineUniversal v1.9.121 Fix106 R791Stable release · System Update preinstalled · other plugins install independently
SecureX Corev0.18.3-a19e23aRecommended baseline
System Updatev1.0.69 / Host v1.0.27Regular plugin ZIP recommended ≤ 16 MB
Kioskv0.3.12Light theme · Chinese/English
01
QUICK START

Create your first plugin in 5 minutes

Start with the smallest working skeleton, then add settings UI, background work, and Store capabilities only when needed.

1Define scopeOne feature per plugin.
2Create skeletonmanifest.json + plugin.py
3Validate locallyFirst-load/update, hot-save, toggle, uninstall.
4PublishZIP and submit for review.
Core ruleIf a feature can live in a plugin, do not patch SecureX Core core. This keeps SecureX Core upgrades substantially easier to maintain.
02
PACKAGE

Package structure

Recommended structure

tynvr_module_example/
├── manifest.json
├── plugin.py
├── config.example.yml
├── README.md
└── assets/
    └── plugin.css

Packaging rules

  • Keep exactly one plugin root at ZIP top level.
  • manifest.json and plugin.py are required.
  • Keep regular plugin ZIPs at or below 16 MB.
  • Do not bundle large models, PyTorch, CUDA, or other heavy runtimes into a regular plugin ZIP.
AvoidDo not ship __pycache__, temporary logs, training outputs, tokens, or database backups in the release ZIP.
03
MANIFEST

manifest.json

Defines plugin identity, version, Settings UI, navigation mounts, and actions.

manifest.jsonMinimal practical example
{
  "id": "tynvr_module_example",
  "name": "Example Plugin",
  "version": "1.0.0",
  "description": "Example SecureX Core plugin",
  "enabled": true,
  "kind": "tynvr_core_module",
  "module_id": "example",
  "order": 50,
  "config_apply": "hot",
  "first_install_restart": true,
  "navigation_user_toggle": true,
  "navigation_default_visible": true,
  "actions": [
    {"id": "reload", "label": "Reload"}
  ],
  "navigation": {
    "key": "example",
    "mount": "settings.sidebar.plugins",
    "label": "Example Plugin",
    "url": "/api/example/?embed=1",
    "view": "iframe",
    "order": 50,
    "icon": "puzzle"
  }
}
idStable unique ID; tynvr_module_xxx is recommended.
versionIncrement for every Store release.
navigationDeclare navigation dynamically; provide a stable key explicitly.
navigation_user_toggleLets users control sidebar visibility; upgrades must preserve the user choice.
config_applyPrefer hot: ordinary settings apply immediately without restarting SecureX Core.
first_install_restartA first install/code update may require one reload; ordinary config saves should not.
actionsExplicit operations exposed to plugin management.
04
PYTHON

plugin.py / class Plugin

Current Universal plugins derive from FrigatePlugin. Keep routes, config, background threads, and shutdown behavior inside the plugin instance.

plugin.pyRecommended skeleton
from pathlib import Path
from typing import Any
from fastapi import APIRouter, Depends
from frigate.api.auth import require_role
from frigate.plugins.base import FrigatePlugin

class Plugin(FrigatePlugin):
    def __init__(self, frigate_config: Any, plugin_dir: Path, stop_event=None):
        super().__init__(frigate_config, plugin_dir, stop_event)
        self._router = APIRouter(tags=["example"])
        self._build_routes()

    @property
    def router(self):
        return self._router

    def _build_routes(self):
        @self._router.get(
            "/api/example/status",
            dependencies=[Depends(require_role(["admin"]))],
        )
        def status():
            return {"ok": True}

    def get_public_config(self):
        return {"enabled": True}

    def update_config(self, payload):
        return {"success": True}

    def run_action(self, action, payload):
        return {"success": action == "reload"}

    def stop(self):
        pass
RecommendationReturn only browser-safe fields from get_public_config(). Never expose full tokens, passwords, or private keys there.
06
CONFIG & DATA

Configuration, state & user data

config.ymlPersistent plugin configuration. Preserve on upgrade.
*.dbQueues, history, and local indexes. Do not delete during upgrades.
*_status.jsonRuntime status and recoverable state.
.runtime/Keep heavy runtimes separate from plugin code so upgrades can reuse them.
Upgrade ruleNew config fields need safe defaults and backward-compatible loading. Ordinary saves should hot-apply; upgrades must not overwrite sidebar visibility, tokens, runtimes, or persistent data.
07
SECURITY

Permissions, secrets & sensitive actions

01

Least privilege: normal reads require authenticated access; config changes, tokens, model deployment, and hardware control require administrator permission.

02

Secret: keep full tokens, passwords, and keys server-side. UI should show only configured state or a masked value.

03

CSRF / POST: never use GET for state changes. Same-origin SecureX Core POST/PUT/PATCH/DELETE should explicitly send X-CSRF-TOKEN: 1 (and preferably X-CACHE-BYPASS: 1). Universal has a generic bridge, but plugins should still implement requests correctly.

04

Input validation: validate paths, URLs, command arguments, and upload names; never concatenate untrusted input directly into shell commands.

08
RUNTIME

Background work, networking & recovery

Do not block requests

Run training, downloads, synchronization, and scans in background threads/workers. Expose status, progress, stop controls, and useful errors.

No blocking loopback HTTP in async routes

Do not call SecureX Core loopback APIs with blocking urllib/requests inside async FastAPI routes; this can deadlock the event loop until timeout. Use a threadpool/async client or reuse already available data.

Network operations must recover

Use bounded timeouts, backoff after failures, chunking plus checksums for large files, and idempotent retry behavior where possible.

Logs & runtimes must be maintainable

Provide log-clear controls using in-place truncation so active Worker/training processes continue. Keep heavy runtimes and artifacts outside plugin code so upgrades replace only plugin code.

09
HOST

Generic Plugin Host Supervisor

Fix68 introduced Generic Plugin Host, and Fix69 makes every Universal installation path deploy it automatically. Plugins that need a host Docker sidecar, ports, volumes, or GPU only declare host-manifest.json.

R20.1 current baselineNovember 22, 2026: SecureX NVR 0.18.3-a19e23a, Universal v1.9.121 Fix106 R791, System Update Center v1.0.69 and Host Updater v1.0.27. ISO / Linux fresh installations use the published package; Stable / DEV updates remain blocked until verified.
Fix105R9 historical baselineStarting October 9, 2026, fresh Linux / ISO installs preload System Update Center v1.0.49 and use Universal v1.9.119 Fix104R1 FINAL. Fix105R9 fixes the post-install validation that incorrectly treated the expected Fix101 overlay in frigate/plugins/manager.py as an error and stopped the build. Universal remains Empty Base and other feature plugins are installed from the Store on demand.
Fix69 standardStore install/update/disable/uninstall only changes the plugin directory; securex-plugin-host automatically reconciles the host service.
host-manifest.jsonDocker sidecar example
{
  "schema_version": 1,
  "plugin_id": "tynvr_module_example",
  "config_file": "config.yml",
  "enabled_config_path": "enabled",
  "status_file": "host_status.json",
  "service": {
    "name": "securex-example",
    "image": "vendor/example:latest",
    "restart": "unless-stopped",
    "network": "frigate",
    "gpu": "auto_nvidia",
    "data_dirs": [
      {"path": "/home/frigate/config/example", "mode": "755"}
    ],
    "volumes": [
      {"source": "/home/frigate/config/example", "target": "/data", "mode": "rw"}
    ],
    "ports": [
      {"host_ip": "127.0.0.1", "host_port": 19000, "container_port": 9000, "protocol": "tcp"}
    ]
  },
  "cleanup_on_remove": []
}
network: frigateAutomatically joins the current SecureX Docker network so the plugin can reach the service by container name.
network: hostUse only when host networking is genuinely required.
${config.x.y}Reads dynamic values from plugin config.yml; saving settings triggers automatic reconcile.
${host.lan_ip}Current SecureX Core LAN IPv4.
${frigate.network}Current SecureX Docker network name.
cleanup_on_removeDeclare only disposable runtime paths; models/training data should normally be preserved.

Universal PA14 · Docker privileges / capabilities

Starting with Fix84 PA14, Generic Plugin Host propagates host-manifest service.privileged, cap_add, cap_drop, and devices. Declare them only for plugins that genuinely need TUN, NET_ADMIN, or controlled device access; normal plugins should remain least-privileged.

Securityhost-manifest is declarative and does not provide an arbitrary root shell hook. Host paths are restricted to SecureX config/runtime roots plus /run/dbus and /dev.

Docker App Host Actions (PA11)

Universal PA11 includes a shared controlled action queue in Generic Plugin Host. Docker App plugins may request start, stop, restart, logs, pull, recreate and status through /config/.securex-host-actions/requests and read results from /config/.securex-host-actions/results. Do not mount /var/run/docker.sock into plugins.

Home Assistant Docker Plugin v0.2.2

Current Docker App reference implementation: host networking, persistent /config, read-only D-Bus mount; low-level Docker parameters are locked while running and editable after stop; user configuration is preserved by default on uninstall.

10
OFFICIAL AI REFERENCE

Official AI plugin reference

Current official baselines that demonstrate the expected platform contracts.

SecureX AI Cloud v1.1.7

  • Shadow A/B compares production and candidate models on the same frame without switching the production detector.
  • Explore manual review submits on Yes/No; “Submitted” appears only after Store confirms correct/incorrect.
  • Manual reviews use sample_reason=manual and appear as Correct/Incorrect · Manual review in Images.
  • SecureX Core event/snapshot reads for manual submission run in a threadpool to avoid async loopback deadlocks.

SecureX AI Training Worker v1.0.14

  • Training runtime is separated from plugin code; plugin upgrades/restarts preserve the environment and artifacts.
  • Reattaches to running jobs instead of restarting training.
  • Installer and Worker logs can be truncated in place without stopping active processes.
  • Embedded UI follows the SecureX Core theme and state-changing operations follow SecureX Core CSRF rules.
11
I18N & RESPONSIVE

Simplified / Traditional / English & responsive UI

简繁EN

Plugin names, descriptions, buttons, errors, and settings fields should be complete in all three languages—not just page titles.

  • English strings are often longer; buttons and cards must not depend on Chinese-only fixed widths.
  • Test at 1366px, tablet widths, and narrow embedded Settings views.
  • Wrap or truncate logs, long IDs, and URLs so they cannot break the layout.
12
VERSIONING

Versioning, upgrades & uninstall

1.0.0Initial release
→
1.0.1Compatible fix
→
1.1.0New capability

When upgrading plugin code, preserve user config, sidebar visibility preferences, and persistent data; ordinary config saves should hot-apply. During uninstall, distinguish removing plugin code from deleting user data; destructive cleanup must be explicit.

13
RELEASE CHECKLIST

Release checklist

✓

ZIP structure is correctmanifest.json / plugin.py

✓

Install and enable workFresh install test

✓

Restart recovery worksState survives SecureX Core restart

✓

Upgrade preserves dataconfig / db / status

✓

No stale navigation after uninstallDynamic navigation verified

✓

All three languages complete简 / 繁 / EN

✓

No narrow-screen overflow1366 / tablet / embed

✓

Network failures recovertimeout / retry / resume

✓

No secret leakageBrowser and log audit

✓

State-changing requests pass CSRFX-CSRF-TOKEN / POST / PUT / DELETE

✓

Hot-save does not restart SecureX Coreconfig_apply=hot

✓

Upgrade preserves sidebar preferencenavigation_visible

✓

No blocking loopback in async routesthreadpool / async client

✓

Version matches Store metadatamanifest / catalog / ZIP

READY TO SHIP

Plugin ready?

Upload the ZIP after completing the checklist. Store review focuses on security, compatibility, upgrade retention, localization, and UI completeness.

Sign in to submit