From 3cb989eeba62cd9bf73cee874260b6183e9c1190 Mon Sep 17 00:00:00 2001 From: epoberezkin Date: Thu, 7 Aug 2025 10:14:54 +0000 Subject: [PATCH] deploy: 4811d663e61d980e18ccd22f49b7f2d50fb2b81b --- docs/protocol/simplex-chat.schema.json | 74 ++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 5 deletions(-) diff --git a/docs/protocol/simplex-chat.schema.json b/docs/protocol/simplex-chat.schema.json index 50d41265f7..4614ba6929 100644 --- a/docs/protocol/simplex-chat.schema.json +++ b/docs/protocol/simplex-chat.schema.json @@ -20,11 +20,21 @@ "format": "data URI format for base64 encoded image" } }, - "contactLink": {"ref": "connReqUri"}, - "preferences": { + "shortDescr": { "type": "string", + "metadata": {"comment": "profile bio (160 characters)"} + }, + "contactLink": {"ref": "connReqUri"}, + "peerType": {"enum": ["human", "bot"]}, + "preferences": { + "optionalProperties": { + "commands": { + "elements": {"ref": "command"} + } + }, + "additionalProperties": true, "metadata": { - "format": "JSON encoded user preferences" + "format": "an object with user or contact preferences" } } }, @@ -47,15 +57,59 @@ "format": "data URI format for base64 encoded image" } }, - "groupPreferences": { + "shortDescr": { "type": "string", + "metadata": {"comment": "group purpose / short description (160 characters)"} + }, + "groupPreferences": { + "optionalProperties": { + "commands": { + "elements": {"ref": "command"} + } + }, + "additionalProperties": "true", "metadata": { - "format": "JSON encoded user preferences" + "format": "an object with group preferences" } } }, "additionalProperties": true }, + "command": { + "discriminator": "type", + "mapping": { + "command": { + "properties": { + "keyword": { + "type": "string", + "metadata": {"format": "Must start from / and consist from letters, digits and underscores only, no punctuation or spaces"} + }, + "label": { + "type": "string", + "metadata": {"comment": "shown to the user after command keyword in menus"} + } + }, + "optionalProperties": { + "params": { + "type": "string", + "metadata": {"comment": "Params that can follow after keyword using command-line syntax. If params property is not present, command will be sent on selection"}} + }, + "hidden": { + "type": "bool", + "metadata": {"comment": "Won't be shown in menu when true"} + } + } + }, + "menu": { + "properties": { + "label": {"type": "string"}, + "commands": { + "elements": {"ref": "command"} + } + } + } + } + }, "msgContainer": { "properties": { "content": {"ref": "msgContent"} @@ -658,6 +712,16 @@ } } }, + "x.grp.prefs": { + "properties": { + "msgId": {"ref": "base64url"}, + "params": { + "properties": { + "groupPreferences": {"ref": "groupPreferences"} + } + } + } + }, "x.grp.direct.inv": { "properties": { "msgId": {"ref": "base64url"},