417 lines
9.7 KiB
JSON
417 lines
9.7 KiB
JSON
{
|
|
"$schema": "../../manifests/game-plugin.manifest.schema.json",
|
|
"id": "game.minecraft",
|
|
"name": "Minecraft Server",
|
|
"description": "First-party Minecraft server management plugin for run-mediated files, logs, and RCON.",
|
|
"version": "0.1.0",
|
|
"kind": "game-plugin",
|
|
"tags": [
|
|
"minecraft",
|
|
"sandbox",
|
|
"rcon",
|
|
"run"
|
|
],
|
|
"server": {
|
|
"type": "minecraft",
|
|
"displayName": "Minecraft Java Server",
|
|
"supportedOS": [
|
|
"windows",
|
|
"linux",
|
|
"darwin"
|
|
],
|
|
"createFormSchema": "schemas/create-form.schema.json",
|
|
"createFields": [
|
|
{
|
|
"key": "serverName",
|
|
"label": "服务器名称",
|
|
"type": "text",
|
|
"required": true,
|
|
"configKey": "motd"
|
|
},
|
|
{
|
|
"key": "gamePort",
|
|
"label": "游戏端口",
|
|
"type": "port",
|
|
"required": true,
|
|
"defaultValue": "25565",
|
|
"configKey": "serverPort"
|
|
},
|
|
{
|
|
"key": "rconPort",
|
|
"label": "RCON 端口",
|
|
"type": "port",
|
|
"required": true,
|
|
"defaultValue": "25575",
|
|
"configKey": "rconPort"
|
|
}
|
|
]
|
|
},
|
|
"capabilities": [
|
|
"process.install",
|
|
"process.start",
|
|
"process.stop",
|
|
"process.restart",
|
|
"process.status",
|
|
"files.list",
|
|
"files.read",
|
|
"files.write",
|
|
"files.patch",
|
|
"logs.read",
|
|
"remote.run.files.read",
|
|
"remote.run.files.write",
|
|
"remote.run.process.start",
|
|
"remote.run.process.stop",
|
|
"remote.run.logs.transfer",
|
|
"remote.run.rcon.command",
|
|
"artifacts.read",
|
|
"artifacts.write",
|
|
"ai.invoke"
|
|
],
|
|
"remoteAccess": {
|
|
"methods": [
|
|
"run"
|
|
],
|
|
"runCapabilities": [
|
|
"remote.run.files.read",
|
|
"remote.run.files.write",
|
|
"remote.run.process.start",
|
|
"remote.run.process.stop",
|
|
"remote.run.logs.transfer",
|
|
"remote.run.rcon.command"
|
|
],
|
|
"rcon": true,
|
|
"logTransfer": true
|
|
},
|
|
"bridge": {
|
|
"actions": [
|
|
"server.instances.read",
|
|
"jobs.dispatch",
|
|
"logs.query",
|
|
"artifacts.open",
|
|
"files.request",
|
|
"remote.access.request",
|
|
"ai.invoke",
|
|
"run.distribution.request",
|
|
"dependencies.request",
|
|
"logs.backfill.request",
|
|
"plugin-lifecycle.request"
|
|
]
|
|
},
|
|
"permissions": [
|
|
"server.create",
|
|
"server.read",
|
|
"server.lifecycle",
|
|
"server.files.read",
|
|
"server.files.write",
|
|
"server.logs.read",
|
|
"server.artifacts.read",
|
|
"server.artifacts.write",
|
|
"server.remote.access",
|
|
"ai.invoke",
|
|
"server.run.distribution",
|
|
"server.dependencies.manage"
|
|
],
|
|
"actions": {
|
|
"install": "actions/install.json",
|
|
"start": "actions/start.json",
|
|
"stop": "actions/stop.json",
|
|
"restart": "actions/restart.json",
|
|
"status": "actions/status.json"
|
|
},
|
|
"assetFiles": [
|
|
{
|
|
"path": "actions/install.json",
|
|
"mode": 384
|
|
},
|
|
{
|
|
"path": "actions/start.json",
|
|
"mode": 384
|
|
},
|
|
{
|
|
"path": "actions/stop.json",
|
|
"mode": 384
|
|
},
|
|
{
|
|
"path": "actions/restart.json",
|
|
"mode": 384
|
|
},
|
|
{
|
|
"path": "actions/status.json",
|
|
"mode": 384
|
|
},
|
|
{
|
|
"path": "bin/install-server",
|
|
"mode": 448
|
|
},
|
|
{
|
|
"path": "bin/game-server",
|
|
"mode": 448
|
|
}
|
|
],
|
|
"productionLifecycle": {
|
|
"operations": [
|
|
"install",
|
|
"enable",
|
|
"disable",
|
|
"upgrade",
|
|
"rollback",
|
|
"retire",
|
|
"dependency-check"
|
|
],
|
|
"dependencyPolicy": "required"
|
|
},
|
|
"pages": [
|
|
{
|
|
"key": "files",
|
|
"title": "文件管理",
|
|
"path": "/files",
|
|
"bundleKey": "minecraft-server-plugin",
|
|
"bundleVersion": "1.0.0",
|
|
"bundleIntegritySha256": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
|
|
"permissions": [
|
|
"server.read",
|
|
"server.files.read",
|
|
"server.files.write",
|
|
"server.logs.read"
|
|
],
|
|
"bridgeActions": [
|
|
"server.instances.read",
|
|
"files.request",
|
|
"logs.query"
|
|
]
|
|
},
|
|
{
|
|
"key": "mods-market",
|
|
"title": "mod/插件市场",
|
|
"path": "/mods-market",
|
|
"bundleKey": "minecraft-server-plugin",
|
|
"bundleVersion": "1.0.0",
|
|
"bundleIntegritySha256": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
|
|
"permissions": [
|
|
"server.read",
|
|
"server.artifacts.read",
|
|
"server.files.read"
|
|
],
|
|
"bridgeActions": [
|
|
"server.instances.read",
|
|
"artifacts.open"
|
|
]
|
|
}
|
|
],
|
|
"fileWorkspace": {
|
|
"defaultDirectoryKey": "minecraft-config",
|
|
"directories": [
|
|
{
|
|
"key": "minecraft-config",
|
|
"label": "服务器配置",
|
|
"scope": "config"
|
|
},
|
|
{
|
|
"key": "minecraft-logs",
|
|
"label": "日志文件",
|
|
"scope": "logs"
|
|
}
|
|
],
|
|
"files": [
|
|
{
|
|
"key": "server-properties",
|
|
"directoryKey": "minecraft-config",
|
|
"label": "server.properties",
|
|
"kind": "config",
|
|
"editable": true
|
|
},
|
|
{
|
|
"key": "ops-json",
|
|
"directoryKey": "minecraft-config",
|
|
"label": "ops.json",
|
|
"kind": "config",
|
|
"editable": true
|
|
},
|
|
{
|
|
"key": "whitelist-json",
|
|
"directoryKey": "minecraft-config",
|
|
"label": "whitelist.json",
|
|
"kind": "config",
|
|
"editable": true
|
|
},
|
|
{
|
|
"key": "minecraft-latest-log",
|
|
"directoryKey": "minecraft-logs",
|
|
"label": "latest.log",
|
|
"kind": "log",
|
|
"streamKey": "minecraft.latest"
|
|
}
|
|
],
|
|
"configFields": [
|
|
{
|
|
"key": "motd",
|
|
"fileKey": "server-properties",
|
|
"configKey": "motd",
|
|
"label": "服务器名称",
|
|
"description": "显示在 Minecraft 服务器列表中的 MOTD。",
|
|
"control": "text",
|
|
"defaultValue": "Minecraft Server",
|
|
"restartImpact": "restart-required"
|
|
},
|
|
{
|
|
"key": "server-port",
|
|
"fileKey": "server-properties",
|
|
"configKey": "server-port",
|
|
"label": "游戏端口",
|
|
"description": "Minecraft Java 客户端连接端口。",
|
|
"control": "port",
|
|
"minimum": 1,
|
|
"maximum": 65535,
|
|
"defaultValue": "25565",
|
|
"restartImpact": "restart-required"
|
|
},
|
|
{
|
|
"key": "max-players",
|
|
"fileKey": "server-properties",
|
|
"configKey": "max-players",
|
|
"label": "最大玩家数",
|
|
"description": "允许同时进入服务器的玩家上限。",
|
|
"control": "number",
|
|
"minimum": 1,
|
|
"maximum": 200,
|
|
"defaultValue": "20",
|
|
"restartImpact": "restart-required"
|
|
},
|
|
{
|
|
"key": "online-mode",
|
|
"fileKey": "server-properties",
|
|
"configKey": "online-mode",
|
|
"label": "正版验证",
|
|
"description": "是否启用 Mojang 在线身份验证。",
|
|
"control": "boolean",
|
|
"defaultValue": "true",
|
|
"restartImpact": "restart-required"
|
|
}
|
|
]
|
|
},
|
|
"ai": {
|
|
"purposes": [
|
|
"config.suggest",
|
|
"logs.diagnose"
|
|
],
|
|
"mediation": "platform",
|
|
"configWritePolicy": "review-required"
|
|
},
|
|
"runtimeProfiles": {
|
|
"discovery": [
|
|
{
|
|
"key": "java-runtime",
|
|
"kind": "command.version",
|
|
"targetKey": "java",
|
|
"required": true,
|
|
"expected": "21"
|
|
},
|
|
{
|
|
"key": "server-jar",
|
|
"kind": "file.exists",
|
|
"targetKey": "server.jar",
|
|
"required": true
|
|
}
|
|
],
|
|
"lifecycleProfiles": [
|
|
{
|
|
"key": "run-local",
|
|
"mode": "local-process",
|
|
"capabilities": [
|
|
"process.install",
|
|
"process.start",
|
|
"process.stop",
|
|
"process.restart",
|
|
"process.status",
|
|
"remote.run.process.start",
|
|
"remote.run.process.stop"
|
|
],
|
|
"actionRefs": {
|
|
"install": "actions/install.json",
|
|
"start": "actions/start.json",
|
|
"stop": "actions/stop.json",
|
|
"restart": "actions/restart.json",
|
|
"status": "actions/status.json"
|
|
},
|
|
"transportKeys": [
|
|
"server-files",
|
|
"rcon"
|
|
],
|
|
"platforms": [
|
|
"windows",
|
|
"linux",
|
|
"darwin"
|
|
]
|
|
}
|
|
],
|
|
"dependencyProbes": [
|
|
{
|
|
"key": "java-21",
|
|
"kind": "java.version",
|
|
"targetKey": "java",
|
|
"required": true,
|
|
"minimumVersion": "21",
|
|
"platforms": [
|
|
"windows",
|
|
"linux",
|
|
"darwin"
|
|
]
|
|
}
|
|
],
|
|
"installPlans": [
|
|
{
|
|
"key": "install-java-linux",
|
|
"title": "Install Java runtime",
|
|
"platforms": [
|
|
"linux"
|
|
],
|
|
"steps": [
|
|
{
|
|
"type": "package",
|
|
"targetKey": "java",
|
|
"packageManager": "apt",
|
|
"packageName": "openjdk-21-jre"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"logSources": [
|
|
{
|
|
"key": "console",
|
|
"kind": "process.stdout",
|
|
"streamKey": "console",
|
|
"cursorKind": "sequence",
|
|
"retentionDays": 30
|
|
},
|
|
{
|
|
"key": "latest-log",
|
|
"kind": "file.tail",
|
|
"targetKey": "logs/latest",
|
|
"streamKey": "latest-log",
|
|
"cursorKind": "fingerprint",
|
|
"retentionDays": 30
|
|
}
|
|
],
|
|
"transportProfiles": [
|
|
{
|
|
"key": "server-files",
|
|
"kind": "file",
|
|
"targetKey": "server-root",
|
|
"capabilities": [
|
|
"remote.run.files.read",
|
|
"remote.run.files.write",
|
|
"remote.run.logs.transfer"
|
|
]
|
|
},
|
|
{
|
|
"key": "rcon",
|
|
"kind": "rcon",
|
|
"targetKey": "rcon",
|
|
"capabilities": [
|
|
"remote.run.rcon.command"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|