{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://wai.transaction.science/schema/wai.json/1", "title": "wai.json, a WAI project file, version 1", "description": "The project file `wai create` writes and `wai dev`, `wai app check` and `wai create` read. Every member is optional; a member not listed here is refused. Paths are relative to the file's directory. A whole number may be written with a zero fraction (4.0 is 4), and none is above 9007199254740991 (2^53 - 1), the largest every JSON reader holds exactly. Secrets never belong in it.", "type": "object", "additionalProperties": false, "properties": { "$schema": { "description": "This schema: an editor or an agent validates the file with it.", "const": "https://wai.transaction.science/schema/wai.json/1" }, "wai": { "description": "The project file's version. A file without it is of version 1; a reader of version 1 refuses a later one.", "const": 1 }, "name": { "description": "The project's machine name, the name it is deployed by: a DNS label, lowercase letters, digits and hyphens, at most 63, beginning with a letter and not ending with a hyphen. `wai create` names a project for its directory.", "type": "string", "pattern": "^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$" }, "template": { "description": "The template the project was made from.", "type": "string" }, "title": { "description": "The project's title, for people.", "type": "string" }, "summary": { "description": "One line on what the project does.", "type": "string" }, "app": { "description": "A program made with Create (app.oui), which the project's page renders: a path relative to the file.", "type": "string" }, "dev": { "description": "What `wai dev` runs in the project's directory; a flag on its command line wins over each member.", "type": "object", "additionalProperties": false, "properties": { "site": { "description": "The directory served at /, the project's own page: a path relative to the file.", "type": "string" }, "page": { "description": "The page `wai dev` names first when it is ready, a path on its origin.", "type": "string" }, "mode": { "description": "The room `wai dev` runs: a room, a watch room, a call, a remote desktop room, or a show (a room with co-performance: hosts on camera and an audience that votes).", "enum": ["room", "watch", "call", "remote", "show"] }, "publishers": { "description": "Publishers at once.", "type": "integer", "minimum": 0, "maximum": 4294967295 }, "watch": { "description": "A watch room's source: a path relative to the file.", "type": "string" }, "watch_ms": { "description": "The source's duration in milliseconds, where it is not a WAV file.", "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "messaging": { "description": "A conversation beside the room.", "type": "boolean" }, "e2ee": { "description": "The room end-to-end encrypted.", "type": "boolean" }, "audience": { "description": "A show's inputs per viewer per poll; a show's alone.", "type": "integer", "minimum": 1, "maximum": 255 } }, "if": { "required": ["audience"] }, "then": { "required": ["mode"], "properties": { "mode": { "const": "show" } } } } } }