feat(plugin): add SCUM ownership migration foundation

This commit is contained in:
npc0-hue
2026-07-28 18:11:00 +08:00
parent d24074134a
commit 271e1e684f
29 changed files with 328 additions and 315 deletions
+14 -161
View File
@@ -46,10 +46,7 @@
"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",
@@ -70,16 +67,8 @@
"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"
"remote.run.logs.transfer"
],
"databaseEngines": [
"mysql",
"sqlite"
],
"rcon": true,
"logTransfer": true
},
"bridge": {
@@ -100,6 +89,8 @@
},
"gameClientBridge": {
"commands": [
{ "type": "config.read", "title": "Read SCUM configuration", "permission": "server.game-client.read", "approvalLevel": "none", "payloadSchemaRef": "schemas/bridge/config-read.payload.schema.json", "resultSchemaRef": "schemas/bridge/config-read.result.schema.json", "timeoutSeconds": 30, "maxPayloadBytes": 1024 },
{ "type": "config.patch", "title": "Patch SCUM configuration", "permission": "server.game-client.maintenance", "approvalLevel": "platform-admin", "payloadSchemaRef": "schemas/bridge/config-patch.payload.schema.json", "resultSchemaRef": "schemas/bridge/config-patch.result.schema.json", "timeoutSeconds": 60, "maxPayloadBytes": 4096 },
{
"type": "announcement.send",
"title": "Send SCUM announcement",
@@ -199,6 +190,13 @@
"keepForSeconds": 604800,
"maxRecords": 1000
},
{
"type": "semantic.events",
"schemaVersion": "1",
"schemaRef": "schemas/bridge/semantic-events.snapshot.schema.json",
"keepForSeconds": 604800,
"maxRecords": 1000
},
{
"type": "online.sessions",
"schemaVersion": "1",
@@ -242,68 +240,6 @@
"maxRecords": 1000
}
],
"queryTemplates": [
{
"key": "scum.player.by-id",
"title": "Find SCUM player by ID",
"permission": "server.game-client.read",
"engine": "sqlite",
"transportKey": "sqlite-db",
"targetKey": "db/sqlite",
"parameterSchemaRef": "schemas/bridge/queries/player-by-id.parameters.schema.json",
"resultSchemaRef": "schemas/bridge/queries/player-by-id.result.schema.json",
"maxRows": 1,
"timeoutSeconds": 10
},
{
"key": "scum.player.search",
"title": "Search SCUM players",
"permission": "server.game-client.read",
"engine": "sqlite",
"transportKey": "sqlite-db",
"targetKey": "db/sqlite",
"parameterSchemaRef": "schemas/bridge/queries/player-search.parameters.schema.json",
"resultSchemaRef": "schemas/bridge/queries/player-search.result.schema.json",
"maxRows": 50,
"timeoutSeconds": 10
},
{
"key": "scum.squad.members",
"title": "List SCUM squad members",
"permission": "server.game-client.read",
"engine": "sqlite",
"transportKey": "sqlite-db",
"targetKey": "db/sqlite",
"parameterSchemaRef": "schemas/bridge/queries/squad-members.parameters.schema.json",
"resultSchemaRef": "schemas/bridge/queries/squad-members.result.schema.json",
"maxRows": 64,
"timeoutSeconds": 10
},
{
"key": "scum.vehicle.owner",
"title": "Find SCUM vehicle owner",
"permission": "server.game-client.read",
"engine": "sqlite",
"transportKey": "sqlite-db",
"targetKey": "db/sqlite",
"parameterSchemaRef": "schemas/bridge/queries/vehicle-owner.parameters.schema.json",
"resultSchemaRef": "schemas/bridge/queries/vehicle-owner.result.schema.json",
"maxRows": 1,
"timeoutSeconds": 10
},
{
"key": "scum.flag.ownership",
"title": "Find SCUM flag ownership",
"permission": "server.game-client.read",
"engine": "sqlite",
"transportKey": "sqlite-db",
"targetKey": "db/sqlite",
"parameterSchemaRef": "schemas/bridge/queries/flag-ownership.parameters.schema.json",
"resultSchemaRef": "schemas/bridge/queries/flag-ownership.result.schema.json",
"maxRows": 1,
"timeoutSeconds": 10
}
],
"commandRetentionSeconds": 604800,
"maxCommands": 1000,
"pages": [
@@ -318,14 +254,7 @@
"restart.prepare",
"maintenance.prepare"
],
"snapshotTypes": ["companion.health", "online.sessions", "players", "squads", "vehicles", "flags"],
"queryTemplateKeys": [
"scum.player.by-id",
"scum.player.search",
"scum.squad.members",
"scum.vehicle.owner",
"scum.flag.ownership"
]
"snapshotTypes": ["companion.health", "online.sessions", "players", "squads", "vehicles", "flags"]
}
],
"companion": {
@@ -374,7 +303,7 @@
"dependencyPolicy": "required",
"approvalRequired": ["disable", "rollback", "retire"]
},
"pages": [{ "key": "files-config", "title": "文件、配置与玩家档案", "path": "/files-config", "permissions": ["server.read", "server.files.read", "server.files.write", "server.logs.read", "server.game-client.read", "server.remote.access", "ai.invoke"], "bridgeActions": ["server.instances.read", "files.request", "logs.query", "remote.access.request", "ai.invoke"] }],
"pages": [{ "key": "files-config", "title": "文件、配置与玩家档案", "path": "/files-config", "bundleKey": "scum-server-plugin", "bundleVersion": "1.0.0", "bundleIntegritySha256": "sha256:8a4216107e1d7773d42a7e13b6466fd4fcf6e6bb2dc5f5af398fb7f4ea4f623b", "permissions": ["server.read", "server.files.read", "server.files.write", "server.logs.read", "server.game-client.read", "ai.invoke"], "bridgeActions": ["server.instances.read", "files.request", "logs.query", "ai.invoke"] }],
"fileWorkspace": {
"defaultDirectoryKey": "scum-config",
"directories": [{ "key": "scum-config", "label": "服务器配置", "scope": "config" }, { "key": "scum-logs", "label": "日志文件", "scope": "logs" }],
@@ -419,8 +348,7 @@
"process.restart",
"process.status",
"remote.run.process.start",
"remote.run.process.stop",
"remote.run.rcon.command"
"remote.run.process.stop"
],
"actionRefs": {
"install": "actions/install.json",
@@ -430,33 +358,12 @@
"status": "actions/status.json"
},
"transportKeys": [
"server-files",
"sqlite-db",
"mysql-db",
"rcon"
"server-files"
],
"platforms": [
"windows"
]
},
{
"key": "hosted-ftp",
"mode": "hosted-ftp-rcon",
"capabilities": [
"remote.ftp.read",
"remote.ftp.write",
"remote.run.logs.transfer",
"remote.run.rcon.command"
],
"transportKeys": [
"ftp",
"rcon"
],
"platforms": [
"windows",
"linux"
]
},
{
"key": "scum-client",
"mode": "custom-client",
@@ -759,38 +666,6 @@
"remote.rsync.read",
"remote.rsync.write"
]
},
{
"key": "sqlite-db",
"kind": "sqlite",
"targetKey": "db/sqlite",
"capabilities": [
"remote.run.db.sqlite.query"
]
},
{
"key": "mysql-db",
"kind": "mysql",
"targetKey": "db/mysql",
"capabilities": [
"remote.run.db.mysql.query"
]
},
{
"key": "rcon",
"kind": "rcon",
"targetKey": "rcon",
"capabilities": [
"remote.run.rcon.command"
]
},
{
"key": "client-rcon",
"kind": "rcon",
"targetKey": "client/rcon",
"capabilities": [
"remote.run.rcon.command"
]
}
],
"clientManagers": [
@@ -858,28 +733,6 @@
"retainPrevious": true
}
}
],
"dllExtensions": [
{
"key": "scum-simple-rcon-ue4ss",
"displayName": "SCUM Simple RCON UE4SS DLL",
"kind": "ue4ss-dll",
"activation": "server-start",
"version": "0.1.0-unpublished",
"releaseState": "unpublished",
"releaseUrl": "https://cdn.npc0.com/scum_simple_rcon_ue4s.dll",
"targetKey": "ue4ss/scum-simple-rcon",
"modKey": "scum_simple_rcon",
"dllRef": "ue4ss/Mods/scum_simple_rcon/dlls/main.dll",
"supportedTargets": [
{
"os": "windows",
"arch": "amd64"
}
],
"updateOnStart": true,
"rconPort": 27015
}
]
}
}