Files
git.stella-ops.org/docs/schemas/plugin-registry.schema.json

103 lines
3.1 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schema.stella-ops.org/plugin-registry/v1.json",
"title": "StellaOps Plugin Registry",
"description": "Schema for registry.yaml files that configure plugin loading",
"type": "object",
"required": ["category"],
"properties": {
"version": {
"type": "string",
"description": "Registry schema version",
"default": "1.0",
"enum": ["1.0"]
},
"category": {
"type": "string",
"description": "Module category (e.g., router.plugins, scanner.plugins)",
"pattern": "^[a-z][a-z0-9-]*\\.plugins$",
"examples": ["router.plugins", "scanner.plugins", "excititor.plugins"]
},
"defaults": {
"$ref": "#/$defs/registryDefaults"
},
"plugins": {
"type": "object",
"description": "Per-plugin configuration entries keyed by plugin ID (short name)",
"additionalProperties": {
"$ref": "#/$defs/registryEntry"
}
}
},
"$defs": {
"registryDefaults": {
"type": "object",
"description": "Default settings applied to all plugins unless overridden",
"properties": {
"enabled": {
"type": "boolean",
"description": "Default enabled state for all plugins",
"default": false
},
"timeout": {
"type": "string",
"description": "Default timeout for plugin operations (ISO 8601 duration)",
"pattern": "^\\d{2}:\\d{2}:\\d{2}$",
"default": "00:05:00"
},
"retryCount": {
"type": "integer",
"description": "Default retry count for plugin operations",
"minimum": 0,
"maximum": 10,
"default": 3
},
"jurisdiction": {
"type": "string",
"description": "Default jurisdiction filter",
"enum": ["world", "russia", "china", "eu", "korea", "usa"]
},
"requiredCompliance": {
"type": "array",
"description": "Required compliance standards filter",
"items": {
"type": "string"
}
}
}
},
"registryEntry": {
"type": "object",
"description": "Per-plugin entry in the registry",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether the plugin is enabled"
},
"priority": {
"type": "integer",
"description": "Priority for loading order (higher = first)",
"minimum": 0,
"maximum": 100
},
"config": {
"type": "string",
"description": "Path to plugin-specific config.yaml file (relative to registry)"
},
"timeout": {
"type": "string",
"description": "Timeout override for this plugin (ISO 8601 duration)",
"pattern": "^\\d{2}:\\d{2}:\\d{2}$"
},
"environment": {
"type": "object",
"description": "Additional environment variables for this plugin",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}