feat: 完整游戏运维功能

This commit is contained in:
npc0-hue
2026-07-18 09:04:01 +08:00
parent f3b14b7945
commit 48b8ad8d6c
187 changed files with 16607 additions and 1140 deletions
@@ -0,0 +1,9 @@
{
"version": 1,
"action": "install",
"mode": "oneshot",
"executableKey": "bin/install-server",
"arguments": [],
"environment": { "GAME_ID": "dev" },
"timeoutMs": 30000
}
@@ -0,0 +1,7 @@
{
"version": 1,
"action": "restart",
"mode": "control",
"environment": { "GAME_ID": "dev" },
"timeoutMs": 30000
}
@@ -0,0 +1,9 @@
{
"version": 1,
"action": "start",
"mode": "supervised",
"executableKey": "bin/game-server",
"arguments": ["--foreground"],
"environment": { "GAME_ID": "dev" },
"timeoutMs": 30000
}
@@ -0,0 +1,7 @@
{
"version": 1,
"action": "status",
"mode": "control",
"environment": { "GAME_ID": "dev" },
"timeoutMs": 30000
}
@@ -0,0 +1,7 @@
{
"version": 1,
"action": "stop",
"mode": "control",
"environment": { "GAME_ID": "dev" },
"stopTimeoutMs": 30000
}
@@ -1,6 +1,10 @@
{
"command": ["true"],
"env": {
"version": 1,
"action": "install",
"mode": "oneshot",
"executableKey": "bin/install-server",
"arguments": [],
"environment": {
"GAME_ID": "minecraft",
"SERVER_TEMPLATE": "minecraft-java"
},
@@ -1,6 +1,8 @@
{
"command": ["true"],
"env": {
"version": 1,
"action": "restart",
"mode": "control",
"environment": {
"GAME_ID": "minecraft",
"SERVER_ACTION": "restart"
},
@@ -1,6 +1,10 @@
{
"command": ["true"],
"env": {
"version": 1,
"action": "start",
"mode": "supervised",
"executableKey": "bin/game-server",
"arguments": ["--foreground"],
"environment": {
"GAME_ID": "minecraft",
"SERVER_ACTION": "start"
},
@@ -1,6 +1,8 @@
{
"command": ["true"],
"env": {
"version": 1,
"action": "status",
"mode": "control",
"environment": {
"GAME_ID": "minecraft",
"SERVER_ACTION": "status"
},
@@ -1,8 +1,10 @@
{
"command": ["true"],
"env": {
"version": 1,
"action": "stop",
"mode": "control",
"environment": {
"GAME_ID": "minecraft",
"SERVER_ACTION": "stop"
},
"timeoutMs": 30000
"stopTimeoutMs": 30000
}
@@ -1,6 +1,10 @@
{
"command": ["true"],
"env": {
"version": 1,
"action": "install",
"mode": "oneshot",
"executableKey": "bin/install-server",
"arguments": [],
"environment": {
"GAME_ID": "scum",
"SERVER_TEMPLATE": "scum-local-proof"
},
@@ -1,6 +1,8 @@
{
"command": ["true"],
"env": {
"version": 1,
"action": "restart",
"mode": "control",
"environment": {
"GAME_ID": "scum",
"SERVER_ACTION": "restart"
},
@@ -1,6 +1,10 @@
{
"command": ["true"],
"env": {
"version": 1,
"action": "start",
"mode": "supervised",
"executableKey": "bin/game-server",
"arguments": ["--foreground"],
"environment": {
"GAME_ID": "scum",
"SERVER_ACTION": "start"
},
@@ -1,6 +1,8 @@
{
"command": ["true"],
"env": {
"version": 1,
"action": "status",
"mode": "control",
"environment": {
"GAME_ID": "scum",
"SERVER_ACTION": "status"
},
@@ -1,8 +1,10 @@
{
"command": ["true"],
"env": {
"version": 1,
"action": "stop",
"mode": "control",
"environment": {
"GAME_ID": "scum",
"SERVER_ACTION": "stop"
},
"timeoutMs": 30000
"stopTimeoutMs": 30000
}
@@ -42,6 +42,11 @@
"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"
@@ -386,6 +391,7 @@
{
"key": "scum-client-manager",
"displayName": "SCUM Client Manager",
"version": "1.0.0",
"repository": {
"url": "https://github.com/F88888/scum_client.git",
"revisionPolicy": "branch",
@@ -411,7 +417,42 @@
],
"outputArtifacts": [
"scum_client.exe"
]
],
"deployment": {
"mode": "run-supervised",
"executableRef": "scum_client.exe",
"arguments": ["--config", "config.json"],
"autoStart": true,
"requiredRunCapabilities": [
"client-manager.deploy",
"client-manager.control",
"client-manager.update",
"client-manager.rollback",
"client-manager.uninstall"
]
},
"lifecycle": {
"actions": ["start", "stop", "restart", "status", "update", "rollback", "uninstall"],
"startupTimeoutSeconds": 60,
"stopTimeoutSeconds": 30
},
"health": {
"mode": "component-heartbeat",
"intervalSeconds": 15,
"degradedAfterSeconds": 45,
"offlineAfterSeconds": 120,
"requiredCapabilities": ["component.register", "component.heartbeat", "component.health", "component.control", "game-client.bridge", "logs.stream"]
},
"compatibility": {
"minimumVersion": "1.0.0",
"allowDowngrade": false
},
"updatePolicy": {
"strategy": "manual-staged",
"requireApproval": true,
"healthConfirmationSeconds": 60,
"retainPrevious": true
}
}
]
}