{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://browser.local/schemas/game-plugin.manifest.schema.json", "title": "GamePluginManifest", "type": "object", "required": ["id", "name", "version", "kind", "server", "capabilities", "permissions"], "additionalProperties": false, "properties": { "$schema": { "type": "string" }, "id": { "type": "string", "pattern": "^game\\.[a-z0-9][a-z0-9._-]*$" }, "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "description": { "type": "string", "minLength": 1, "maxLength": 240 }, "version": { "type": "string", "minLength": 1, "maxLength": 40 }, "kind": { "const": "game-plugin" }, "tags": { "type": "array", "items": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$" }, "uniqueItems": true, "maxItems": 8 }, "server": { "type": "object", "required": ["type", "displayName", "createFormSchema"], "additionalProperties": false, "properties": { "type": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$", "maxLength": 80 }, "displayName": { "type": "string", "minLength": 1, "maxLength": 80 }, "supportedOS": { "type": "array", "items": { "enum": ["windows", "linux", "darwin"] } }, "createFormSchema": { "$ref": "#/$defs/relativeJsonRef" } } }, "bridge": { "type": "object", "required": ["actions"], "additionalProperties": false, "properties": { "actions": { "type": "array", "items": { "$ref": "#/$defs/bridgeAction" }, "uniqueItems": true, "minItems": 1 } } }, "capabilities": { "type": "array", "items": { "$ref": "#/$defs/runCapability" }, "uniqueItems": true }, "permissions": { "type": "array", "items": { "$ref": "#/$defs/pluginPermission" }, "uniqueItems": true }, "remoteAccess": { "type": "object", "required": ["methods"], "additionalProperties": false, "properties": { "methods": { "type": "array", "items": { "$ref": "#/$defs/remoteAccessMethod" }, "uniqueItems": true, "minItems": 1 }, "runCapabilities": { "type": "array", "items": { "$ref": "#/$defs/runCapability" }, "uniqueItems": true }, "databaseEngines": { "type": "array", "items": { "$ref": "#/$defs/remoteDatabaseEngine" }, "uniqueItems": true }, "rcon": { "type": "boolean" }, "logTransfer": { "type": "boolean" } } }, "runtimeProfiles": { "type": "object", "additionalProperties": false, "properties": { "discovery": { "type": "array", "items": { "$ref": "#/$defs/runtimeDiscoveryProbe" }, "uniqueItems": true }, "lifecycleProfiles": { "type": "array", "items": { "$ref": "#/$defs/runtimeLifecycleProfile" }, "uniqueItems": true }, "dependencyProbes": { "type": "array", "items": { "$ref": "#/$defs/runtimeDependencyProbe" }, "uniqueItems": true }, "installPlans": { "type": "array", "items": { "$ref": "#/$defs/runtimeInstallPlan" }, "uniqueItems": true }, "logSources": { "type": "array", "items": { "$ref": "#/$defs/runtimeLogSource" }, "uniqueItems": true }, "transportProfiles": { "type": "array", "items": { "$ref": "#/$defs/runtimeTransportProfile" }, "uniqueItems": true }, "clientManagers": { "type": "array", "items": { "$ref": "#/$defs/runtimeClientManagerProfile" }, "uniqueItems": true } } }, "actions": { "type": "object", "required": ["install", "start", "stop"], "additionalProperties": false, "properties": { "install": { "$ref": "#/$defs/relativeJsonRef" }, "start": { "$ref": "#/$defs/relativeJsonRef" }, "stop": { "$ref": "#/$defs/relativeJsonRef" }, "restart": { "$ref": "#/$defs/relativeJsonRef" }, "status": { "$ref": "#/$defs/relativeJsonRef" } } }, "pages": { "type": "array", "items": { "type": "object", "required": ["key", "title", "path"], "additionalProperties": false, "properties": { "key": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" }, "title": { "type": "string", "minLength": 1, "maxLength": 40 }, "path": { "type": "string", "pattern": "^/[a-z0-9_./-]*$" }, "permissions": { "type": "array", "items": { "$ref": "#/$defs/pluginPermission" }, "uniqueItems": true }, "bridgeActions": { "type": "array", "items": { "$ref": "#/$defs/bridgeAction" }, "uniqueItems": true } } } }, "ai": { "type": "object", "additionalProperties": false, "properties": { "purposes": { "type": "array", "items": { "$ref": "#/$defs/aiPurpose" }, "uniqueItems": true } } } }, "$defs": { "relativeJsonRef": { "type": "string", "pattern": "^(?!/)(?![A-Za-z]:)(?!.*://)(?!.*\\.\\.)[a-zA-Z0-9_./-]+\\.json$" }, "runCapability": { "enum": [ "process.install", "process.start", "process.stop", "process.restart", "process.status", "files.list", "files.read", "files.write", "files.patch", "logs.read", "remote.ftp.read", "remote.ftp.write", "remote.rsync.read", "remote.rsync.write", "remote.run.files.read", "remote.run.files.write", "remote.run.process.start", "remote.run.process.stop", "remote.run.db.mysql.query", "remote.run.db.sqlite.query", "remote.run.logs.transfer", "remote.run.rcon.command", "client-manager.deploy", "client-manager.control", "client-manager.update", "client-manager.rollback", "client-manager.uninstall", "artifacts.read", "artifacts.write", "ai.invoke" ] }, "pluginPermission": { "enum": [ "server.create", "server.read", "server.lifecycle", "server.files.read", "server.files.write", "server.logs.read", "server.artifacts.read", "server.artifacts.write", "server.remote.access", "server.run.distribution", "server.dependencies.manage", "server.client-manager.manage", "ai.invoke" ] }, "bridgeAction": { "enum": [ "server.instances.read", "jobs.dispatch", "logs.query", "artifacts.open", "files.request", "remote.access.request", "run.distribution.request", "dependencies.request", "logs.backfill.request", "client-manager.request", "ai.invoke" ] }, "remoteAccessMethod": { "enum": ["ftp", "rsync", "run"] }, "remoteDatabaseEngine": { "enum": ["mysql", "sqlite"] }, "logicalKey": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$", "maxLength": 120 }, "runtimePlatform": { "enum": ["windows", "linux", "darwin"] }, "runtimeArch": { "enum": ["amd64", "arm64"] }, "runtimeTarget": { "type": "object", "required": ["os", "arch"], "additionalProperties": false, "properties": { "os": { "$ref": "#/$defs/runtimePlatform" }, "arch": { "$ref": "#/$defs/runtimeArch" } } }, "runtimeDiscoveryProbe": { "type": "object", "required": ["key", "kind", "targetKey"], "additionalProperties": false, "properties": { "key": { "$ref": "#/$defs/logicalKey" }, "kind": { "enum": ["file.exists", "command.version", "service.status", "port.open", "steam.app", "docker.container"] }, "targetKey": { "$ref": "#/$defs/logicalKey" }, "required": { "type": "boolean" }, "expected": { "type": "string", "maxLength": 120 }, "platforms": { "type": "array", "items": { "$ref": "#/$defs/runtimePlatform" }, "uniqueItems": true } } }, "runtimeLifecycleProfile": { "type": "object", "required": ["key", "mode", "capabilities"], "additionalProperties": false, "properties": { "key": { "$ref": "#/$defs/logicalKey" }, "mode": { "enum": ["local-process", "hosted-ftp-rcon", "ftp-only", "custom-client"] }, "capabilities": { "type": "array", "items": { "$ref": "#/$defs/runCapability" }, "uniqueItems": true, "minItems": 1 }, "actionRefs": { "type": "object", "additionalProperties": false, "properties": { "install": { "$ref": "#/$defs/relativeJsonRef" }, "start": { "$ref": "#/$defs/relativeJsonRef" }, "stop": { "$ref": "#/$defs/relativeJsonRef" }, "restart": { "$ref": "#/$defs/relativeJsonRef" }, "status": { "$ref": "#/$defs/relativeJsonRef" } } }, "transportKeys": { "type": "array", "items": { "$ref": "#/$defs/logicalKey" }, "uniqueItems": true }, "clientManagerRef": { "$ref": "#/$defs/logicalKey" }, "platforms": { "type": "array", "items": { "$ref": "#/$defs/runtimePlatform" }, "uniqueItems": true } } }, "runtimeDependencyProbe": { "type": "object", "required": ["key", "kind", "targetKey"], "additionalProperties": false, "properties": { "key": { "$ref": "#/$defs/logicalKey" }, "kind": { "enum": ["command.version", "service.exists", "port.available", "steam.app", "java.version", "docker.available", "package.installed", "file.exists"] }, "targetKey": { "$ref": "#/$defs/logicalKey" }, "required": { "type": "boolean" }, "minimumVersion": { "type": "string", "maxLength": 80 }, "platforms": { "type": "array", "items": { "$ref": "#/$defs/runtimePlatform" }, "uniqueItems": true } } }, "runtimeInstallStep": { "type": "object", "required": ["type", "targetKey"], "additionalProperties": false, "properties": { "type": { "enum": ["package", "verified-download", "steamcmd-app", "manual"] }, "targetKey": { "$ref": "#/$defs/logicalKey" }, "packageManager": { "enum": ["winget", "choco", "scoop", "apt", "yum", "dnf", "pacman", "zypper", "brew", "steamcmd", "manual"] }, "packageName": { "type": "string", "pattern": "^[a-zA-Z0-9_.:+@/-]+$", "maxLength": 120 }, "version": { "type": "string", "maxLength": 80 }, "downloadRef": { "type": "string", "pattern": "^https://[a-zA-Z0-9._~:/?#\\[\\]@!$&'()*+,;=%-]+$", "maxLength": 240 }, "checksum": { "type": "string", "pattern": "^sha256:[a-fA-F0-9]{64}$" } }, "allOf": [ { "if": { "properties": { "type": { "const": "package" } }, "required": ["type"] }, "then": { "required": ["packageManager", "packageName"], "properties": { "packageManager": { "enum": ["winget", "choco", "scoop", "apt", "yum", "dnf", "pacman", "zypper", "brew"] } } } }, { "if": { "properties": { "type": { "const": "verified-download" } }, "required": ["type"] }, "then": { "required": ["downloadRef", "checksum"] } }, { "if": { "properties": { "type": { "const": "steamcmd-app" } }, "required": ["type"] }, "then": { "required": ["packageName"], "properties": { "packageManager": { "const": "steamcmd" }, "packageName": { "type": "string", "pattern": "^[0-9]{1,12}$" } } } } ] }, "runtimeInstallPlan": { "type": "object", "required": ["key", "title", "steps"], "additionalProperties": false, "properties": { "key": { "$ref": "#/$defs/logicalKey" }, "title": { "type": "string", "minLength": 1, "maxLength": 80 }, "platforms": { "type": "array", "items": { "$ref": "#/$defs/runtimePlatform" }, "uniqueItems": true }, "steps": { "type": "array", "items": { "$ref": "#/$defs/runtimeInstallStep" }, "minItems": 1, "maxItems": 64 } } }, "runtimeLogSource": { "type": "object", "required": ["key", "kind", "streamKey"], "additionalProperties": false, "properties": { "key": { "$ref": "#/$defs/logicalKey" }, "kind": { "enum": ["process.stdout", "process.stderr", "file.tail", "ftp.poll", "sql.query", "client-manager"] }, "targetKey": { "$ref": "#/$defs/logicalKey" }, "streamKey": { "$ref": "#/$defs/logicalKey" }, "cursorKind": { "enum": ["sequence", "offset", "fingerprint", "ftp-listing", "sql-cursor"] }, "retentionDays": { "type": "integer", "minimum": 1, "maximum": 365 } } }, "runtimeTransportProfile": { "type": "object", "required": ["key", "kind", "capabilities"], "additionalProperties": false, "properties": { "key": { "$ref": "#/$defs/logicalKey" }, "kind": { "enum": ["file", "ftp", "rsync", "mysql", "sqlite", "rcon"] }, "targetKey": { "$ref": "#/$defs/logicalKey" }, "capabilities": { "type": "array", "items": { "$ref": "#/$defs/runCapability" }, "uniqueItems": true, "minItems": 1 } } }, "relativePathRef": { "type": "string", "pattern": "^(?!/)(?![A-Za-z]:)(?!.*://)(?!.*\\.\\.)[a-zA-Z0-9_./-]+$", "maxLength": 160 }, "clientManagerComponentCapability": { "enum": [ "component.register", "component.heartbeat", "component.health", "component.control", "game-client.bridge", "logs.stream" ] }, "clientManagerLifecycleAction": { "enum": ["start", "stop", "restart", "status", "update", "rollback", "uninstall"] }, "clientManagerArgument": { "type": "string", "pattern": "^[a-zA-Z0-9_./:=@+-]+$", "maxLength": 120 }, "runtimeClientManagerProfile": { "type": "object", "required": ["key", "repository", "supportedTargets", "build", "outputArtifacts"], "additionalProperties": false, "properties": { "key": { "$ref": "#/$defs/logicalKey" }, "displayName": { "type": "string", "minLength": 1, "maxLength": 80 }, "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?$", "maxLength": 40 }, "repository": { "type": "object", "required": ["url", "revisionPolicy"], "additionalProperties": false, "properties": { "url": { "type": "string", "pattern": "^https://[a-zA-Z0-9._~:/?#\\[\\]@!$&'()*+,;=%-]+\\.git$", "maxLength": 240 }, "branch": { "type": "string", "pattern": "^[a-zA-Z0-9._/-]+$", "maxLength": 120 }, "tag": { "type": "string", "pattern": "^[a-zA-Z0-9._/-]+$", "maxLength": 120 }, "revision": { "type": "string", "pattern": "^[a-fA-F0-9]{7,64}$" }, "revisionPolicy": { "enum": ["pinned", "branch", "tag"] } } }, "supportedTargets": { "type": "array", "items": { "$ref": "#/$defs/runtimeTarget" }, "minItems": 1, "uniqueItems": true }, "build": { "type": "object", "required": ["system"], "additionalProperties": false, "properties": { "system": { "enum": ["go", "npm", "cargo", "make"] }, "workspaceRef": { "$ref": "#/$defs/relativePathRef" }, "entryRef": { "$ref": "#/$defs/relativePathRef" } } }, "configTemplates": { "type": "array", "items": { "type": "object", "required": ["key", "templateRef", "outputRef"], "additionalProperties": false, "properties": { "key": { "$ref": "#/$defs/logicalKey" }, "templateRef": { "$ref": "#/$defs/relativePathRef" }, "outputRef": { "$ref": "#/$defs/relativePathRef" } } }, "uniqueItems": true }, "outputArtifacts": { "type": "array", "items": { "$ref": "#/$defs/relativePathRef" }, "minItems": 1, "uniqueItems": true }, "deployment": { "type": "object", "required": ["mode", "executableRef", "requiredRunCapabilities"], "additionalProperties": false, "properties": { "mode": { "const": "run-supervised" }, "executableRef": { "$ref": "#/$defs/relativePathRef" }, "arguments": { "type": "array", "items": { "$ref": "#/$defs/clientManagerArgument" }, "maxItems": 32 }, "autoStart": { "type": "boolean" }, "requiredRunCapabilities": { "type": "array", "items": { "enum": ["client-manager.deploy", "client-manager.control", "client-manager.update", "client-manager.rollback", "client-manager.uninstall"] }, "uniqueItems": true, "minItems": 1 } } }, "lifecycle": { "type": "object", "required": ["actions", "startupTimeoutSeconds", "stopTimeoutSeconds"], "additionalProperties": false, "properties": { "actions": { "type": "array", "items": { "$ref": "#/$defs/clientManagerLifecycleAction" }, "uniqueItems": true, "minItems": 1 }, "startupTimeoutSeconds": { "type": "integer", "minimum": 1, "maximum": 300 }, "stopTimeoutSeconds": { "type": "integer", "minimum": 1, "maximum": 120 } } }, "health": { "type": "object", "required": ["mode", "intervalSeconds", "degradedAfterSeconds", "offlineAfterSeconds", "requiredCapabilities"], "additionalProperties": false, "properties": { "mode": { "enum": ["component-heartbeat", "process"] }, "intervalSeconds": { "type": "integer", "minimum": 5, "maximum": 300 }, "degradedAfterSeconds": { "type": "integer", "minimum": 10, "maximum": 1800 }, "offlineAfterSeconds": { "type": "integer", "minimum": 15, "maximum": 3600 }, "requiredCapabilities": { "type": "array", "items": { "$ref": "#/$defs/clientManagerComponentCapability" }, "uniqueItems": true, "minItems": 1 } } }, "compatibility": { "type": "object", "required": ["allowDowngrade"], "additionalProperties": false, "properties": { "minimumVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?$", "maxLength": 40 }, "maximumVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?$", "maxLength": 40 }, "allowDowngrade": { "type": "boolean" } } }, "updatePolicy": { "type": "object", "required": ["strategy", "requireApproval", "healthConfirmationSeconds", "retainPrevious"], "additionalProperties": false, "properties": { "strategy": { "const": "manual-staged" }, "requireApproval": { "const": true }, "healthConfirmationSeconds": { "type": "integer", "minimum": 5, "maximum": 600 }, "retainPrevious": { "const": true } } } }, "allOf": [ { "if": { "required": ["deployment"] }, "then": { "required": ["version", "lifecycle", "health", "compatibility", "updatePolicy"] } } ] }, "aiPurpose": { "enum": [ "config.read", "config.generate", "config.suggest", "logs.diagnose", "files.suggest" ] } } }