meta

Metadata introspection for the NVIDIA monitor plugin used by cjm-ctl to generate the registration manifest

get_plugin_metadata

Returns metadata required to register this plugin with the PluginManager. This function is called by cjm-ctl during the manifest generation phase.

The returned dictionary includes:

  • python_path: Absolute path to the environment’s Python interpreter
  • module/class: Import path for dynamic loading by the Universal Worker
  • resources: Hardware requirements (this plugin doesn’t require GPU itself)

source

get_plugin_metadata


def get_plugin_metadata(
    
)->Dict: # Plugin metadata for manifest generation

Return metadata required to register this plugin with the PluginManager.

Testing

import json

metadata = get_plugin_metadata()
print(json.dumps(metadata, indent=2))
{
  "name": "cjm-system-monitor-nvidia",
  "version": "0.0.6",
  "type": "infrastructure",
  "category": "system_monitor",
  "interface": "cjm_infra_plugin_system.plugin_interface.MonitorPlugin",
  "module": "cjm_system_monitor_nvidia.plugin",
  "class": "NvidiaMonitorPlugin",
  "python_path": "/opt/hostedtoolcache/Python/3.12.13/x64/bin/python",
  "db_path": "/opt/hostedtoolcache/Python/3.12.13/x64/data/nvidia_sysmon.db",
  "resources": {
    "requires_gpu": false,
    "min_gpu_vram_mb": 0,
    "min_system_ram_mb": 128
  },
  "env_vars": {}
}

CLI Introspection

The cjm-ctl install-all command runs this function inside the plugin’s conda environment:

conda run -n cjm-sys-mon-nvidia python -c \
  'from cjm_system_monitor_nvidia.meta import get_plugin_metadata; \
   import json; print(json.dumps(get_plugin_metadata(), indent=2))'

The output is written to ~/.cjm/plugins/cjm-system-monitor-nvidia.json.