refactor(scum): remove unverified manifest templates

This commit is contained in:
npc0-hue
2026-08-11 15:34:45 +08:00
parent 13746150cb
commit d77068ce78
26 changed files with 26 additions and 624 deletions
@@ -1,13 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": ["playerId", "fieldKey", "value", "observedAt", "checksum"],
"properties": {
"playerId": { "type": "string", "minLength": 1, "maxLength": 96 },
"fieldKey": { "const": "855" },
"value": { "type": "integer", "minimum": 0, "maximum": 100000 },
"observedAt": { "type": "string", "format": "date-time" },
"checksum": { "type": "string", "minLength": 1, "maxLength": 160 }
}
}
@@ -1,15 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": ["playerId", "fieldKey", "before", "after", "safetyWindow", "backupRef"],
"properties": {
"playerId": { "type": "string", "minLength": 1, "maxLength": 96 },
"fieldKey": { "const": "855" },
"before": { "type": "integer", "minimum": 0, "maximum": 100000 },
"after": { "type": "integer", "minimum": 0, "maximum": 100000 },
"safetyWindow": { "type": "string", "minLength": 1, "maxLength": 120 },
"backupRef": { "type": "string", "minLength": 1, "maxLength": 180 },
"reason": { "type": "string", "maxLength": 240 }
}
}
@@ -1,12 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": ["outcome", "affectedRows", "mutationChecksum"],
"properties": {
"outcome": { "enum": ["succeeded", "failed", "unknown", "stale-before"] },
"affectedRows": { "type": "integer", "minimum": 0, "maximum": 1 },
"mutationChecksum": { "type": "string", "minLength": 1, "maxLength": 160 },
"safeMessage": { "type": "string", "maxLength": 240 }
}
}
@@ -1,14 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPlayerCurrencySetConfirmation",
"type": "object",
"additionalProperties": false,
"required": ["playerId", "amount", "observedAt"],
"properties": {
"playerId": { "type": "string", "minLength": 17, "maxLength": 17, "pattern": "^[0-9]{17}$" },
"amount": { "type": "integer", "minimum": 0, "maximum": 2147483647 },
"currency": { "enum": ["normal", "gold"] },
"observationId": { "type": "string", "minLength": 1, "maxLength": 160 },
"observedAt": { "type": "string", "format": "date-time" }
}
}
@@ -1,12 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPlayerCurrencySetPayload",
"type": "object",
"additionalProperties": false,
"required": ["playerId", "amount"],
"properties": {
"playerId": { "type": "string", "minLength": 17, "maxLength": 17, "pattern": "^[0-9]{17}$" },
"amount": { "type": "integer", "minimum": 0, "maximum": 2147483647 },
"reason": { "type": "string", "minLength": 1, "maxLength": 240 }
}
}
@@ -1,13 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPlayerFameSetConfirmation",
"type": "object",
"additionalProperties": false,
"required": ["playerId", "fame", "observedAt"],
"properties": {
"playerId": { "type": "string", "minLength": 17, "maxLength": 17, "pattern": "^[0-9]{17}$" },
"fame": { "type": "integer", "minimum": -2147483648, "maximum": 2147483647 },
"observationId": { "type": "string", "minLength": 1, "maxLength": 160 },
"observedAt": { "type": "string", "format": "date-time" }
}
}
@@ -1,12 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPlayerFameSetPayload",
"type": "object",
"additionalProperties": false,
"required": ["playerId", "fame"],
"properties": {
"playerId": { "type": "string", "minLength": 17, "maxLength": 17, "pattern": "^[0-9]{17}$" },
"fame": { "type": "integer", "minimum": -2147483648, "maximum": 2147483647 },
"reason": { "type": "string", "minLength": 1, "maxLength": 240 }
}
}
@@ -1,12 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPlayerNotifyConfirmation",
"type": "object",
"additionalProperties": false,
"required": ["playerId", "outcome", "observedAt"],
"properties": {
"playerId": { "type": "string", "minLength": 17, "maxLength": 17, "pattern": "^[0-9]{17}$" },
"outcome": { "enum": ["sent", "failed", "unknown"] },
"observedAt": { "type": "string", "format": "date-time" }
}
}
@@ -1,12 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPlayerRCONSetResult",
"type": "object",
"additionalProperties": false,
"required": ["outcome"],
"properties": {
"outcome": { "enum": ["queued", "succeeded", "failed", "unknown"] },
"runJobId": { "type": "string", "minLength": 1, "maxLength": 160 },
"summary": { "type": "string", "maxLength": 240 }
}
}
@@ -1,14 +0,0 @@
# SCUM.db Query Contract
These query template keys are browser-safe declarations. They intentionally do not carry SQL text, host paths, DSNs, sockets, or credentials. The bound run/agent beside the current SCUM service owns the actual SQLite read implementation and must return rows matching the referenced result schemas.
| Template key | SCUM.db source tables | Projection target |
| --- | --- | --- |
| `scum.player.profile` | `user_profile`, `prisoner`, `prisoner_entity`, `entity`, `bank_account_registry`, `bank_account_registry_currencies`, optional `squad_member` / `squad` joins | Player identity, economy, squad summary, and current position |
| `scum.squads` | `squad`, optional `squad_member`, optional `user_profile` leader joins | Squad records and leader/member counts |
| `scum.squad-members` | `squad_member`, `user_profile`, optional `squad` joins | Squad roster and member identity mapping |
| `scum.vehicles` | `vehicle_spawner`, `entity`, optional owner/squad joins when present | Vehicle inventory and coordinates; unknown class labels remain unknown |
| `scum.flags` | `base_element`, `entity`, `user_profile`, `squad_member`, `squad` where available | Flag ownership, ownership confidence, and coordinates |
| `scum.positions` | `prisoner_entity`, `vehicle_spawner`, `base_element`, `entity` | Current player, vehicle, and flag coordinates |
`last_save_time` is freshness evidence only. It must not be treated as proof that a player is online; online state comes from login/logoff evidence or an explicit typed online field.
@@ -1,12 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMFlagsParameters",
"type": "object",
"additionalProperties": false,
"properties": {
"flagId": { "type": "string", "minLength": 1, "maxLength": 96 },
"ownerProfileId": { "type": "string", "minLength": 1, "maxLength": 96 },
"squadId": { "type": "string", "minLength": 1, "maxLength": 96 },
"limit": { "type": "integer", "minimum": 1, "maximum": 500 }
}
}
@@ -1,31 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMFlagsResult",
"type": "object",
"additionalProperties": false,
"required": ["rows"],
"properties": {
"rows": {
"type": "array",
"maxItems": 500,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["flagId"],
"properties": {
"flagId": { "type": "string", "minLength": 1, "maxLength": 96 },
"entityId": { "type": "string", "minLength": 1, "maxLength": 96 },
"ownerProfileId": { "type": "string", "minLength": 1, "maxLength": 96 },
"ownerPlayerId": { "type": "string", "minLength": 1, "maxLength": 96 },
"ownerSquadId": { "type": "string", "minLength": 1, "maxLength": 96 },
"ownerSquadName": { "type": "string", "minLength": 1, "maxLength": 80 },
"ownershipConfidence": { "enum": ["direct", "member", "squad", "unknown"] },
"x": { "type": "number" },
"y": { "type": "number" },
"z": { "type": "number" }
}
}
},
"truncated": { "type": "boolean" }
}
}
@@ -1,13 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPlayerProfileParameters",
"type": "object",
"additionalProperties": false,
"properties": {
"gamePlayerId": { "type": "string", "minLength": 1, "maxLength": 96, "pattern": "^[A-Za-z0-9_.:-]{1,96}$" },
"userProfileId": { "type": "string", "minLength": 1, "maxLength": 96, "pattern": "^[A-Za-z0-9_.:-]{1,96}$" },
"steamId": { "type": "string", "minLength": 1, "maxLength": 96, "pattern": "^[A-Za-z0-9_.:-]{1,96}$" },
"search": { "type": "string", "minLength": 1, "maxLength": 80 },
"limit": { "type": "integer", "minimum": 1, "maximum": 500 }
}
}
@@ -1,34 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPlayerProfileResult",
"type": "object",
"additionalProperties": false,
"required": ["rows"],
"properties": {
"rows": {
"type": "array",
"maxItems": 500,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["userProfileId"],
"properties": {
"gamePlayerId": { "type": "string", "minLength": 1, "maxLength": 96 },
"userProfileId": { "type": "string", "minLength": 1, "maxLength": 96 },
"steamId": { "type": "string", "minLength": 1, "maxLength": 96 },
"displayName": { "type": "string", "minLength": 1, "maxLength": 80 },
"squadId": { "type": "string", "minLength": 1, "maxLength": 96 },
"squadName": { "type": "string", "minLength": 1, "maxLength": 80 },
"famePoints": { "type": "number" },
"normalBalance": { "type": "number" },
"goldBalance": { "type": "number" },
"x": { "type": "number" },
"y": { "type": "number" },
"z": { "type": "number" },
"lastSaveTime": { "type": "string", "format": "date-time" }
}
}
},
"truncated": { "type": "boolean" }
}
}
@@ -1,11 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPositionsParameters",
"type": "object",
"additionalProperties": false,
"properties": {
"subjectType": { "enum": ["player", "vehicle", "flag"] },
"subjectId": { "type": "string", "minLength": 1, "maxLength": 96 },
"limit": { "type": "integer", "minimum": 1, "maximum": 500 }
}
}
@@ -1,30 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMPositionsResult",
"type": "object",
"additionalProperties": false,
"required": ["rows"],
"properties": {
"rows": {
"type": "array",
"maxItems": 500,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["subjectType", "subjectId", "x", "y"],
"properties": {
"subjectType": { "enum": ["player", "vehicle", "flag"] },
"subjectId": { "type": "string", "minLength": 1, "maxLength": 96 },
"gamePlayerId": { "type": "string", "minLength": 1, "maxLength": 96 },
"vehicleId": { "type": "string", "minLength": 1, "maxLength": 96 },
"entityId": { "type": "string", "minLength": 1, "maxLength": 96 },
"x": { "type": "number" },
"y": { "type": "number" },
"z": { "type": "number" },
"lastSaveTime": { "type": "string", "format": "date-time" }
}
}
},
"truncated": { "type": "boolean" }
}
}
@@ -1,11 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMSquadMembersParameters",
"type": "object",
"additionalProperties": false,
"properties": {
"squadId": { "type": "string", "minLength": 1, "maxLength": 96 },
"userProfileId": { "type": "string", "minLength": 1, "maxLength": 96 },
"limit": { "type": "integer", "minimum": 1, "maximum": 500 }
}
}
@@ -1,29 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMSquadMembersResult",
"type": "object",
"additionalProperties": false,
"required": ["rows"],
"properties": {
"rows": {
"type": "array",
"maxItems": 500,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["squadId", "userProfileId"],
"properties": {
"squadId": { "type": "string", "minLength": 1, "maxLength": 96 },
"userProfileId": { "type": "string", "minLength": 1, "maxLength": 96 },
"gamePlayerId": { "type": "string", "minLength": 1, "maxLength": 96 },
"steamId": { "type": "string", "minLength": 1, "maxLength": 96 },
"displayName": { "type": "string", "minLength": 1, "maxLength": 80 },
"rank": { "type": "string", "minLength": 1, "maxLength": 32 },
"isLeader": { "type": "boolean" },
"joinedAt": { "type": "string", "format": "date-time" }
}
}
},
"truncated": { "type": "boolean" }
}
}
@@ -1,11 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMSquadsParameters",
"type": "object",
"additionalProperties": false,
"properties": {
"squadId": { "type": "string", "minLength": 1, "maxLength": 96 },
"search": { "type": "string", "minLength": 1, "maxLength": 80 },
"limit": { "type": "integer", "minimum": 1, "maximum": 500 }
}
}
@@ -1,27 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMSquadsResult",
"type": "object",
"additionalProperties": false,
"required": ["rows"],
"properties": {
"rows": {
"type": "array",
"maxItems": 500,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["squadId"],
"properties": {
"squadId": { "type": "string", "minLength": 1, "maxLength": 96 },
"name": { "type": "string", "minLength": 1, "maxLength": 80 },
"leaderProfileId": { "type": "string", "minLength": 1, "maxLength": 96 },
"leaderPlayerId": { "type": "string", "minLength": 1, "maxLength": 96 },
"memberCount": { "type": "integer", "minimum": 0, "maximum": 1000 },
"score": { "type": "number" }
}
}
},
"truncated": { "type": "boolean" }
}
}
@@ -1,12 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMVehiclesParameters",
"type": "object",
"additionalProperties": false,
"properties": {
"vehicleId": { "type": "string", "minLength": 1, "maxLength": 96 },
"ownerProfileId": { "type": "string", "minLength": 1, "maxLength": 96 },
"squadId": { "type": "string", "minLength": 1, "maxLength": 96 },
"limit": { "type": "integer", "minimum": 1, "maximum": 500 }
}
}
@@ -1,31 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMVehiclesResult",
"type": "object",
"additionalProperties": false,
"required": ["rows"],
"properties": {
"rows": {
"type": "array",
"maxItems": 500,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["vehicleId"],
"properties": {
"vehicleId": { "type": "string", "minLength": 1, "maxLength": 96 },
"entityId": { "type": "string", "minLength": 1, "maxLength": 96 },
"className": { "type": "string", "minLength": 1, "maxLength": 120 },
"label": { "type": "string", "minLength": 1, "maxLength": 120 },
"ownerProfileId": { "type": "string", "minLength": 1, "maxLength": 96 },
"ownerPlayerId": { "type": "string", "minLength": 1, "maxLength": 96 },
"squadId": { "type": "string", "minLength": 1, "maxLength": 96 },
"x": { "type": "number" },
"y": { "type": "number" },
"z": { "type": "number" }
}
}
},
"truncated": { "type": "boolean" }
}
}
@@ -1,13 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMRewardDeliverConfirmation",
"type": "object",
"additionalProperties": false,
"required": ["grantId", "outcome", "observedAt"],
"properties": {
"grantId": { "type": "string", "minLength": 1, "maxLength": 160 },
"outcome": { "enum": ["delivered", "failed", "unknown"] },
"observationId": { "type": "string", "minLength": 1, "maxLength": 160 },
"observedAt": { "type": "string", "format": "date-time" }
}
}