add lexicon codegen: vendored lexicons, lex cli and generation scripts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-08-03 12:06:59 +03:00
parent a2129885c6
commit a3243820c9
311 changed files with 23342 additions and 14 deletions
@@ -0,0 +1,58 @@
{
"id": "com.atproto.lexicon.resolveLexicon",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "LexiconNotFound",
"description": "No lexicon was resolved for the NSID."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"uri",
"cid",
"schema"
],
"properties": {
"cid": {
"type": "string",
"format": "cid",
"description": "The CID of the lexicon schema record."
},
"uri": {
"type": "string",
"format": "at-uri",
"description": "The AT-URI of the lexicon schema record."
},
"schema": {
"ref": "com.atproto.lexicon.schema#main",
"type": "ref",
"description": "The resolved lexicon schema record."
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"nsid"
],
"properties": {
"nsid": {
"type": "string",
"format": "nsid",
"description": "The lexicon NSID to resolve."
}
}
},
"description": "Resolves an atproto lexicon (NSID) to a schema."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}
+24
View File
@@ -0,0 +1,24 @@
{
"id": "com.atproto.lexicon.schema",
"defs": {
"main": {
"key": "nsid",
"type": "record",
"record": {
"type": "object",
"required": [
"lexicon"
],
"properties": {
"lexicon": {
"type": "integer",
"description": "Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system."
}
}
},
"description": "Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc)."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}