save progress
This commit is contained in:
48
docs/schemas/plugin-config.schema.json
Normal file
48
docs/schemas/plugin-config.schema.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://schema.stella-ops.org/plugin-config/v1.json",
|
||||
"title": "StellaOps Plugin Runtime Config",
|
||||
"description": "Schema for plugin config.yaml files",
|
||||
"type": "object",
|
||||
"required": ["id"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Plugin ID (must match manifest ID)",
|
||||
"pattern": "^[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)*$"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Display name override"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the plugin is enabled",
|
||||
"default": true
|
||||
},
|
||||
"priority": {
|
||||
"type": "integer",
|
||||
"description": "Priority override",
|
||||
"minimum": 0,
|
||||
"maximum": 100
|
||||
},
|
||||
"config": {
|
||||
"type": "object",
|
||||
"description": "Plugin-specific runtime configuration. Supports environment variable substitution: ${VAR:-default}",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"id": "stellaops.router.tcp",
|
||||
"name": "TCP Transport",
|
||||
"enabled": true,
|
||||
"priority": 50,
|
||||
"config": {
|
||||
"port": 5000,
|
||||
"bindAddress": "${STELLAOPS_TCP_BIND:-0.0.0.0}",
|
||||
"maxConnections": 1000
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
157
docs/schemas/plugin-manifest.schema.json
Normal file
157
docs/schemas/plugin-manifest.schema.json
Normal file
@@ -0,0 +1,157 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://schema.stella-ops.org/plugin-manifest/v2.json",
|
||||
"title": "StellaOps Plugin Manifest",
|
||||
"description": "Schema for plugin.json manifest files (v2.0)",
|
||||
"type": "object",
|
||||
"required": ["id", "name", "assembly"],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "string",
|
||||
"description": "Schema version. Current version is 2.0",
|
||||
"default": "2.0",
|
||||
"enum": ["1.0", "2.0"]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Unique plugin identifier in format: stellaops.{module}.{plugin}",
|
||||
"pattern": "^[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)*$",
|
||||
"examples": ["stellaops.router.tcp", "stellaops.scanner.lang.dotnet"]
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Human-readable display name",
|
||||
"minLength": 1,
|
||||
"maxLength": 100
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Plugin version (SemVer)",
|
||||
"default": "1.0.0",
|
||||
"pattern": "^\\d+\\.\\d+\\.\\d+(?:-[a-zA-Z0-9.]+)?(?:\\+[a-zA-Z0-9.]+)?$"
|
||||
},
|
||||
"assembly": {
|
||||
"$ref": "#/$defs/assemblyDescriptor"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Entry point type for plugin initialization (fully qualified type name)",
|
||||
"examples": ["StellaOps.Router.Tcp.TcpTransportPlugin"]
|
||||
},
|
||||
"capabilities": {
|
||||
"type": "array",
|
||||
"description": "Plugin capabilities",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]*(?::[a-zA-Z0-9*.-]+)?$"
|
||||
},
|
||||
"examples": [["signing:ES256", "transport:tcp", "analyzer:dotnet"]]
|
||||
},
|
||||
"platforms": {
|
||||
"type": "array",
|
||||
"description": "Supported platforms. Empty array means all platforms",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": ["*", "linux", "linux-x64", "linux-arm64", "win", "win-x64", "win-arm64", "osx", "osx-x64", "osx-arm64"]
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"compliance": {
|
||||
"type": "array",
|
||||
"description": "Compliance standards",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"examples": [["NIST", "FIPS-140-3", "GOST", "eIDAS", "KCMVP", "GM/T"]]
|
||||
},
|
||||
"jurisdiction": {
|
||||
"type": "string",
|
||||
"description": "Jurisdiction restriction",
|
||||
"enum": ["world", "russia", "china", "eu", "korea", "usa"],
|
||||
"default": "world"
|
||||
},
|
||||
"priority": {
|
||||
"type": "integer",
|
||||
"description": "Loading priority (0-100). Higher priority plugins are loaded first",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"default": 100
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the plugin is enabled by default",
|
||||
"default": true
|
||||
},
|
||||
"enabledByDefault": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the plugin is enabled by default in new installations",
|
||||
"default": false
|
||||
},
|
||||
"options": {
|
||||
"type": "object",
|
||||
"description": "Plugin-specific configuration options",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"description": "Additional metadata",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"properties": {
|
||||
"author": {
|
||||
"type": "string",
|
||||
"description": "Plugin author"
|
||||
},
|
||||
"license": {
|
||||
"type": "string",
|
||||
"description": "License identifier (SPDX)"
|
||||
},
|
||||
"homepage": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Plugin homepage URL"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Source repository URL"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"description": "Plugin dependencies (other plugin IDs)",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"conditionalCompilation": {
|
||||
"type": "string",
|
||||
"description": "Conditional compilation symbol required to build this plugin"
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"assemblyDescriptor": {
|
||||
"type": "object",
|
||||
"description": "Descriptor for the plugin assembly location",
|
||||
"required": ["path"],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "Relative path to the assembly DLL from the plugin directory",
|
||||
"examples": ["StellaOps.Router.Tcp.dll"]
|
||||
},
|
||||
"sha256": {
|
||||
"type": "string",
|
||||
"description": "SHA256 hash of the assembly for integrity verification",
|
||||
"pattern": "^[a-fA-F0-9]{64}$"
|
||||
},
|
||||
"signaturePath": {
|
||||
"type": "string",
|
||||
"description": "Path to signature file (.sig) for cosign verification"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
102
docs/schemas/plugin-registry.schema.json
Normal file
102
docs/schemas/plugin-registry.schema.json
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user