{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://rosea.invalid/schema/care-event.json", "title": "CareEvent", "description": "One act of care, append-only and never edited (CLAUDE.md §6.2). The other event kinds arrive with docs/GAMEPLAY.md.", "type": "object", "additionalProperties": false, "required": ["kind", "ts", "localDay", "from", "to", "act", "trace", "messageId", "clientVersion"], "properties": { "kind": { "const": "care" }, "ts": { "description": "Epoch milliseconds. Stays on the device; never part of a trace.", "type": "integer", "minimum": 0 }, "localDay": { "description": "The player's local day, from engine/src/time/localDay.ts and nowhere else.", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, "from": { "$ref": "#/definitions/publicKey" }, "to": { "$ref": "#/definitions/publicKey" }, "act": { "type": "string", "enum": ["water", "shade", "weed", "petals"] }, "trace": { "type": "string", "pattern": "^petal:[a-z]+(-[a-z]+)*$" }, "messageId": { "description": "A hope-library id or null. Never text: the pattern admits no space, so no sentence fits (CLAUDE.md §5.6 rule 1).", "oneOf": [ { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "maxLength": 64 }, { "type": "null" } ] }, "clientVersion": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" } }, "definitions": { "publicKey": { "description": "An opaque base64url public key. Its exact encoding is decided with packages/identity.", "type": "string", "pattern": "^[A-Za-z0-9_-]{32,128}$" } } }