From 03454b8f37265152a4ce8c74ef87f61c63ee274d Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Sat, 8 Aug 2026 11:28:42 +0300 Subject: [PATCH] lexicons: Tangled 1.0 (`org.tangled.{actor,key,repo,snippet}.*`) Removed `bluesky` field from `actor.profile`. We can allow users to put link to their bluesky profile with their platform of choice instead. `publicKey` is splitted by key types. We usually want to fetch keys by their types rather than usage. Also usage can be differ by key type. string now uses a blob. The string record is largely enum type so we can easily extend it later without breaking changes. Signed-off-by: Seongmin Lee --- lexicons/org/tangled/actor/profile.json | 81 +++++++++++++++++++ lexicons/org/tangled/key/sshKey.json | 43 ++++++++++ .../org/tangled/key/unspecced/gpgKey.json | 34 ++++++++ lexicons/org/tangled/repo/declaration.json | 26 ++++++ lexicons/org/tangled/snippet/string.json | 45 +++++++++++ 5 files changed, 229 insertions(+) create mode 100644 lexicons/org/tangled/actor/profile.json create mode 100644 lexicons/org/tangled/key/sshKey.json create mode 100644 lexicons/org/tangled/key/unspecced/gpgKey.json create mode 100644 lexicons/org/tangled/repo/declaration.json create mode 100644 lexicons/org/tangled/snippet/string.json diff --git a/lexicons/org/tangled/actor/profile.json b/lexicons/org/tangled/actor/profile.json new file mode 100644 index 00000000..69d70b0a --- /dev/null +++ b/lexicons/org/tangled/actor/profile.json @@ -0,0 +1,81 @@ +{ + "lexicon": 1, + "id": "org.tangled.actor.profile", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a Tangled account profile.", + "key": "literal:self", + "record": { + "type": "object", + "required": [], + "properties": { + "avatar": { + "type": "blob", + "description": "Small image to be displayed next to posts from account. AKA, 'profile picture'", + "accept": ["image/png", "image/jpeg"], + "maxSize": 1000000 + }, + "description": { + "type": "string", + "description": "Free-form profile description text.", + "maxGraphemes": 256, + "maxLength": 2560 + }, + "links": { + "type": "array", + "maxLength": 5, + "items": { + "type": "string", + "description": "Any URI, intended for social profiles or websites, can be used to link DIDs/AT-URIs too.", + "format": "uri" + } + }, + "stats": { + "type": "array", + "maxLength": 2, + "items": { + "type": "string", + "description": "Vanity stats.", + "knownValues": [ + "merged-pull-request-count", + "closed-pull-request-count", + "open-pull-request-count", + "open-issue-count", + "closed-issue-count", + "repository-count", + "star-count" + ] + } + }, + "location": { + "type": "string", + "description": "Free-form location text.", + "maxGraphemes": 40, + "maxLength": 400 + }, + "pinnedRepositories": { + "type": "array", + "description": "Pinned repositories. Values are repo DIDs for repos that have them, or AT-URIs for legacy repos.", + "maxLength": 6, + "items": { + "type": "string", + "format": "did" + } + }, + "pronouns": { + "type": "string", + "description": "Preferred gender pronouns.", + "maxGraphemes": 20, + "maxLength": 200 + }, + "preferredHandle": { + "type": "string", + "description": "A handle the user prefers to be displayed as.", + "format": "handle" + } + } + } + } + } +} diff --git a/lexicons/org/tangled/key/sshKey.json b/lexicons/org/tangled/key/sshKey.json new file mode 100644 index 00000000..9b81831a --- /dev/null +++ b/lexicons/org/tangled/key/sshKey.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "org.tangled.key.sshKey", + "defs": { + "main": { + "type": "record", + "description": "ssh public key", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "payload", + "createdAt" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "human-readable name for this key" + }, + "payload": { + "type": "string", + "maxLength": 4096 + }, + "usages": { + "type": "array", + "description": "default to `[\"auth\", \"sign\"]` when omitted.", + "minLength": 1, + "items": { + "type": "string", + "knownValues": ["auth", "sign"] + } + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + } + } +} diff --git a/lexicons/org/tangled/key/unspecced/gpgKey.json b/lexicons/org/tangled/key/unspecced/gpgKey.json new file mode 100644 index 00000000..a6ec5b83 --- /dev/null +++ b/lexicons/org/tangled/key/unspecced/gpgKey.json @@ -0,0 +1,34 @@ +{ + "lexicon": 1, + "id": "org.tangled.key.unspecced.gpgKey", + "defs": { + "main": { + "type": "record", + "description": "gpg public key", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "payload", + "createdAt" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "human-readable name for this key" + }, + "payload": { + "type": "string", + "maxLength": 8192 + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + } + } +} diff --git a/lexicons/org/tangled/repo/declaration.json b/lexicons/org/tangled/repo/declaration.json new file mode 100644 index 00000000..9e1d739d --- /dev/null +++ b/lexicons/org/tangled/repo/declaration.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "org.tangled.repo.declaration", + "defs": { + "main": { + "type": "record", + "key": "any", + "description": "Git repository declaration. Record is owned by the repository owner and record-key is slug of the git repository.", + "record": { + "type": "object", + "required": ["repo", "createdAt"], + "properties": { + "repo": { + "type": "string", + "format": "did", + "description": "DID of the repo" + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + } + } +} diff --git a/lexicons/org/tangled/snippet/string.json b/lexicons/org/tangled/snippet/string.json new file mode 100644 index 00000000..1267009b --- /dev/null +++ b/lexicons/org/tangled/snippet/string.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "org.tangled.snippet.string", + "defs": { + "main": { + "type": "record", + "description": "TID is preferred for record-key, but not enforced.", + "key": "any", + "record": { + "type": "object", + "required": ["snippet", "createdAt"], + "properties": { + "description": { + "type": "string", + "maxGraphemes": 256 + }, + "snippet": { + "type": "union" + "refs": ["#textFile"] + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + }, + "textFile": { + "type": "object", + "required": ["name", "content"], + "properties": { + "name": { + "type": "string", + "description": "file name", + "maxGraphemes": 140 + }, + "content": { + "type": "blob" + "accept": ["text/plain"], + "maxLength": 1000000 + } + } + } + } +} -- 2.51.2