From af1c50f4e7c69da083dd3ec0817aa78a33a2e9ff Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sun, 17 May 2026 00:24:10 +0800 Subject: [PATCH] feat(compat): add QQ compatibility manifest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Static JSON served from raw.githubusercontent.com/.../main/compat/qq.json that SnowLumaDesktop polls (3-day cached fallback) to classify the local QQ install as known-good / known-bad / unknown / too-old. - compat/qq.json — initial allow-all manifest (policy.allowUnknown=true) - compat/qq.schema.json — JSON Schema for the manifest shape Editing this file is how we ship "QQ X.Y.Z breaks Hook" advisories without cutting a Desktop release. --- compat/qq.json | 19 +++++++++++++++ compat/qq.schema.json | 56 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 compat/qq.json create mode 100644 compat/qq.schema.json diff --git a/compat/qq.json b/compat/qq.json new file mode 100644 index 00000000..abb081bf --- /dev/null +++ b/compat/qq.json @@ -0,0 +1,19 @@ +{ + "$schema": "./qq.schema.json", + "version": 1, + "updatedAt": "2026-05-16T00:00:00Z", + "policy": { + "allowUnknown": true, + "warnUnknown": true + }, + "knownGoodVersions": [], + "knownBadVersions": [], + "minVersion": null, + "notes": [ + "QQ 兼容性 manifest — Desktop 启动时拉 https://raw.githubusercontent.com/SnowLuma/SnowLuma/main/compat/qq.json 校验本地 QQ 版本", + "policy.allowUnknown = true: 任何不在 knownBadVersions 里的版本都允许(理论上所有 QQ 新版本都可用)", + "knownBadVersions: 列在这里的版本 Desktop 会拒绝注入,弹出引导让用户切版本", + "minVersion: 设为 SemVer 字符串则更早的版本会被拒", + "知道某个版本会破坏 Hook 后把它加进 knownBadVersions,加 reason 字段说明" + ] +} diff --git a/compat/qq.schema.json b/compat/qq.schema.json new file mode 100644 index 00000000..0f0e3061 --- /dev/null +++ b/compat/qq.schema.json @@ -0,0 +1,56 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SnowLuma QQ compatibility manifest", + "type": "object", + "required": ["version", "policy", "knownGoodVersions", "knownBadVersions"], + "properties": { + "$schema": { "type": "string" }, + "version": { "type": "integer", "const": 1 }, + "updatedAt": { "type": "string", "format": "date-time" }, + "policy": { + "type": "object", + "required": ["allowUnknown"], + "properties": { + "allowUnknown": { + "type": "boolean", + "description": "若 true,未在 known* 中列出的版本视为允许;若 false,需明确出现在 knownGoodVersions" + }, + "warnUnknown": { + "type": "boolean", + "description": "未列出的版本启动时是否弹警告" + } + } + }, + "knownGoodVersions": { + "type": "array", + "items": { + "type": "object", + "required": ["version"], + "properties": { + "version": { "type": "string", "description": "QQ 版本号字符串,如 '9.9.20.123'" }, + "note": { "type": "string" } + } + } + }, + "knownBadVersions": { + "type": "array", + "items": { + "type": "object", + "required": ["version"], + "properties": { + "version": { "type": "string" }, + "reason": { "type": "string" }, + "fixedInDesktopVersion": { "type": "string" } + } + } + }, + "minVersion": { + "type": ["string", "null"], + "description": "最低支持版本(SemVer),null = 不限" + }, + "notes": { + "type": "array", + "items": { "type": "string" } + } + } +}