{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://softbox.invalid/schemas/installed-app.schema.json", "title": "SoftBox installed-app.json v1", "type": "object", "additionalProperties": false, "required": [ "schema_version", "id", "version", "architecture", "channel", "files" ], "properties": { "schema_version": { "const": 1 }, "id": { "type": "string", "pattern": "^[a-z0-9-]+$" }, "version": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$" }, "architecture": { "enum": ["386", "amd64"] }, "channel": { "const": "stable" }, "entrypoint": { "type": "string", "minLength": 1, "$comment": "Optional for pre-T-401 v1 records; new installations write a runtime-validated safe relative payload path.", "pattern": "^(?!/)(?! )(?!.*(/ ))(?!.*\\\\)(?!.*[:<>\"|?*])(?!\\.\\.?(/|$))(?!.*(/\\.\\.?)(/|$))(?!.*//)(?!.*[ .](/|$)).+$" }, "working_directory": { "type": "string", "minLength": 1, "$comment": "Optional for pre-T-401 v1 records; new installations write . or a runtime-validated safe relative payload directory.", "pattern": "^(\\.|(?!/)(?! )(?!.*(/ ))(?!.*\\\\)(?!.*[:<>\"|?*])(?!\\.\\.?(/|$))(?!.*(/\\.\\.?)(/|$))(?!.*//)(?!.*[ .](/|$)).+)$" }, "min_os": { "enum": ["windows-7-sp1", "windows-10", "windows-11"] }, "requires_admin": { "type": "boolean" }, "files": { "type": "array", "items": { "$ref": "#/$defs/file" } } }, "$defs": { "file": { "type": "object", "additionalProperties": false, "required": ["path", "size", "sha256"], "properties": { "path": { "type": "string", "minLength": 1, "$comment": "Runtime validation additionally rejects invalid UTF-8/control characters and Windows reserved device names; this pattern is only a basic shape constraint.", "pattern": "^(?!/)(?! )(?!.*(/ ))(?!.*\\\\)(?!.*[:<>\"|?*])(?!\\.\\.?(/|$))(?!.*(/\\.\\.?)(/|$))(?!.*//)(?!.*[ .](/|$)).+$" }, "size": { "type": "integer", "minimum": 0 }, "sha256": { "type": "string", "pattern": "^[0-9A-Fa-f]{64}$" } } } } }