feat(plugin): gate pages on companion features

This commit is contained in:
npc0-hue
2026-07-29 09:53:39 +08:00
parent 271e1e684f
commit c9494abc48
16 changed files with 300 additions and 61 deletions
@@ -190,7 +190,8 @@
"bundleVersion": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$" },
"bundleIntegritySha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
"permissions": { "type": "array", "items": { "$ref": "#/$defs/pluginPermission" }, "uniqueItems": true },
"bridgeActions": { "type": "array", "items": { "$ref": "#/$defs/bridgeAction" }, "uniqueItems": true }
"bridgeActions": { "type": "array", "items": { "$ref": "#/$defs/bridgeAction" }, "uniqueItems": true },
"featureKeys": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
}
}
},
@@ -262,6 +263,7 @@
"items": { "$ref": "#/$defs/gameClientBridgePageContract" },
"maxItems": 64
},
"features": { "type": "array", "items": { "$ref": "#/$defs/gameClientBridgeFeature" }, "maxItems": 128 },
"companion": { "$ref": "#/$defs/gameClientBridgeCompanion" }
}
},
@@ -337,7 +339,15 @@
"pageKey": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
"commandTypes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
"snapshotTypes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
"queryTemplateKeys": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
"queryTemplateKeys": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
"featureKeys": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
}
},
"gameClientBridgeFeature": {
"type": "object", "required": ["key", "title", "permission"], "additionalProperties": false,
"properties": {
"key": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$" }, "title": { "type": "string", "minLength": 1, "maxLength": 80 }, "permission": { "$ref": "#/$defs/pluginPermission" },
"requiredHandlers": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "maxItems": 64 }, "requiredEventProducers": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "maxItems": 64 }
}
},
"productionLifecycleOperation": {