Add SCUM world query assets

This commit is contained in:
npc0-hue
2026-08-13 09:20:42 +08:00
parent bad09df3e2
commit e313081204
18 changed files with 471 additions and 3 deletions
@@ -0,0 +1,29 @@
{
"key": "scum-squads-read-v1",
"adapterVersion": "scum-live-data-v1",
"queryVersion": "scum-sqlite-query-v1",
"capability": "squads.read",
"requiredSchemaFingerprint": "sha256:ebd477d6c6ead9c34c41169af489236d762a76186d45dedd753d50f1b81e26f0",
"statementType": "single-select-or-cte",
"statement": "WITH member_counts AS (SELECT sm.squad_id AS squadId, COUNT(*) AS memberCount FROM squad_member sm GROUP BY sm.squad_id) SELECT s.id AS squadId, s.name AS squadName, COALESCE(mc.memberCount, 0) AS memberCount, CAST(NULL AS INTEGER) AS leaderProfileId, CAST(NULL AS TEXT) AS leaderExternalPlayerId, CAST(NULL AS INTEGER) AS leaderRankCode, CAST(NULL AS TEXT) AS leaderRankMeaning FROM squad s LEFT JOIN member_counts mc ON mc.squadId = s.id ORDER BY s.id ASC LIMIT :limit OFFSET :offset",
"parameters": [
{ "name": "limit", "binding": ":limit", "type": "integer", "required": true, "minimum": 1, "maximum": 100 },
{ "name": "offset", "binding": ":offset", "type": "integer", "required": true, "minimum": 0, "maximum": 1000000 }
],
"safety": {
"queryOnly": true,
"readOnlyConnection": true,
"forbidMultipleStatements": true,
"forbidAttach": true,
"forbidWritePragmas": true,
"forbidExtensionLoading": true,
"maxRows": 100,
"timeoutMs": 2000,
"maxResultBytes": 65536
},
"evidence": {
"source": "openspec/changes/replace-scum-projections-with-real-data-management/evidence/scum-current-service-sqlite-diagnostic-2026-08-12.md",
"provenFields": ["squad.id", "squad.name", "squad_member.squad_id"],
"ambiguousFieldsKeptNull": ["leaderProfileId", "leaderExternalPlayerId", "leaderRankCode", "leaderRankMeaning"]
}
}