291 lines
7.3 KiB
JSON
291 lines
7.3 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",
|
|
"approvalRequired": ["disable", "rollback", "retire"]
|
|
},
|
|
"pages": [
|
|
{
|
|
"key": "overview",
|
|
"title": "MC 概览",
|
|
"path": "/overview",
|
|
"bundleKey": "minecraft-server-plugin",
|
|
"bundleVersion": "1.0.0",
|
|
"bundleIntegritySha256": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
|
|
"permissions": [
|
|
"server.read",
|
|
"server.lifecycle"
|
|
],
|
|
"bridgeActions": [
|
|
"server.instances.read",
|
|
"jobs.dispatch"
|
|
]
|
|
},
|
|
{
|
|
"key": "remote",
|
|
"title": "MC 远程",
|
|
"path": "/remote",
|
|
"bundleKey": "minecraft-server-plugin",
|
|
"bundleVersion": "1.0.0",
|
|
"bundleIntegritySha256": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
|
|
"permissions": [
|
|
"server.remote.access",
|
|
"server.files.read",
|
|
"server.files.write",
|
|
"server.logs.read"
|
|
],
|
|
"bridgeActions": [
|
|
"remote.access.request",
|
|
"files.request",
|
|
"logs.query"
|
|
]
|
|
},
|
|
{
|
|
"key": "rcon",
|
|
"title": "MC RCON",
|
|
"path": "/rcon",
|
|
"bundleKey": "minecraft-server-plugin",
|
|
"bundleVersion": "1.0.0",
|
|
"bundleIntegritySha256": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
|
|
"permissions": [
|
|
"server.remote.access"
|
|
],
|
|
"bridgeActions": [
|
|
"remote.access.request"
|
|
]
|
|
}
|
|
],
|
|
"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"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|