add lexicon codegen: vendored lexicons, lex cli and generation scripts
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
{
|
||||
"id": "com.atproto.moderation.createReport",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "procedure",
|
||||
"input": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"reasonType",
|
||||
"subject"
|
||||
],
|
||||
"properties": {
|
||||
"reason": {
|
||||
"type": "string",
|
||||
"maxLength": 20000,
|
||||
"description": "Additional context about the content and violation.",
|
||||
"maxGraphemes": 2000
|
||||
},
|
||||
"modTool": {
|
||||
"ref": "#modTool",
|
||||
"type": "ref"
|
||||
},
|
||||
"subject": {
|
||||
"refs": [
|
||||
"com.atproto.admin.defs#repoRef",
|
||||
"com.atproto.repo.strongRef"
|
||||
],
|
||||
"type": "union"
|
||||
},
|
||||
"reasonType": {
|
||||
"ref": "com.atproto.moderation.defs#reasonType",
|
||||
"type": "ref",
|
||||
"description": "Indicates the broad category of violation the report is for."
|
||||
}
|
||||
}
|
||||
},
|
||||
"encoding": "application/json"
|
||||
},
|
||||
"output": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"reasonType",
|
||||
"subject",
|
||||
"reportedBy",
|
||||
"createdAt"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
"maxLength": 20000,
|
||||
"maxGraphemes": 2000
|
||||
},
|
||||
"subject": {
|
||||
"refs": [
|
||||
"com.atproto.admin.defs#repoRef",
|
||||
"com.atproto.repo.strongRef"
|
||||
],
|
||||
"type": "union"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "datetime"
|
||||
},
|
||||
"reasonType": {
|
||||
"ref": "com.atproto.moderation.defs#reasonType",
|
||||
"type": "ref"
|
||||
},
|
||||
"reportedBy": {
|
||||
"type": "string",
|
||||
"format": "did"
|
||||
}
|
||||
}
|
||||
},
|
||||
"encoding": "application/json"
|
||||
},
|
||||
"description": "Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth."
|
||||
},
|
||||
"modTool": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"type": "unknown",
|
||||
"description": "Additional arbitrary metadata about the source"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome')"
|
||||
}
|
||||
},
|
||||
"description": "Moderation tool information for tracing the source of the action"
|
||||
}
|
||||
},
|
||||
"$type": "com.atproto.lexicon.schema",
|
||||
"lexicon": 1
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"id": "com.atproto.moderation.defs",
|
||||
"defs": {
|
||||
"reasonRude": {
|
||||
"type": "token",
|
||||
"description": "Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`."
|
||||
},
|
||||
"reasonSpam": {
|
||||
"type": "token",
|
||||
"description": "Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`."
|
||||
},
|
||||
"reasonType": {
|
||||
"type": "string",
|
||||
"knownValues": [
|
||||
"com.atproto.moderation.defs#reasonSpam",
|
||||
"com.atproto.moderation.defs#reasonViolation",
|
||||
"com.atproto.moderation.defs#reasonMisleading",
|
||||
"com.atproto.moderation.defs#reasonSexual",
|
||||
"com.atproto.moderation.defs#reasonRude",
|
||||
"com.atproto.moderation.defs#reasonOther",
|
||||
"com.atproto.moderation.defs#reasonAppeal",
|
||||
"tools.ozone.report.defs#reasonAppeal",
|
||||
"tools.ozone.report.defs#reasonOther",
|
||||
"tools.ozone.report.defs#reasonViolenceAnimal",
|
||||
"tools.ozone.report.defs#reasonViolenceThreats",
|
||||
"tools.ozone.report.defs#reasonViolenceGraphicContent",
|
||||
"tools.ozone.report.defs#reasonViolenceGlorification",
|
||||
"tools.ozone.report.defs#reasonViolenceExtremistContent",
|
||||
"tools.ozone.report.defs#reasonViolenceTrafficking",
|
||||
"tools.ozone.report.defs#reasonViolenceOther",
|
||||
"tools.ozone.report.defs#reasonSexualAbuseContent",
|
||||
"tools.ozone.report.defs#reasonSexualNCII",
|
||||
"tools.ozone.report.defs#reasonSexualDeepfake",
|
||||
"tools.ozone.report.defs#reasonSexualAnimal",
|
||||
"tools.ozone.report.defs#reasonSexualUnlabeled",
|
||||
"tools.ozone.report.defs#reasonSexualOther",
|
||||
"tools.ozone.report.defs#reasonChildSafetyCSAM",
|
||||
"tools.ozone.report.defs#reasonChildSafetyGroom",
|
||||
"tools.ozone.report.defs#reasonChildSafetyPrivacy",
|
||||
"tools.ozone.report.defs#reasonChildSafetyHarassment",
|
||||
"tools.ozone.report.defs#reasonChildSafetyOther",
|
||||
"tools.ozone.report.defs#reasonHarassmentTroll",
|
||||
"tools.ozone.report.defs#reasonHarassmentTargeted",
|
||||
"tools.ozone.report.defs#reasonHarassmentHateSpeech",
|
||||
"tools.ozone.report.defs#reasonHarassmentDoxxing",
|
||||
"tools.ozone.report.defs#reasonHarassmentOther",
|
||||
"tools.ozone.report.defs#reasonMisleadingBot",
|
||||
"tools.ozone.report.defs#reasonMisleadingImpersonation",
|
||||
"tools.ozone.report.defs#reasonMisleadingSpam",
|
||||
"tools.ozone.report.defs#reasonMisleadingScam",
|
||||
"tools.ozone.report.defs#reasonMisleadingElections",
|
||||
"tools.ozone.report.defs#reasonMisleadingOther",
|
||||
"tools.ozone.report.defs#reasonRuleSiteSecurity",
|
||||
"tools.ozone.report.defs#reasonRuleProhibitedSales",
|
||||
"tools.ozone.report.defs#reasonRuleBanEvasion",
|
||||
"tools.ozone.report.defs#reasonRuleOther",
|
||||
"tools.ozone.report.defs#reasonSelfHarmContent",
|
||||
"tools.ozone.report.defs#reasonSelfHarmED",
|
||||
"tools.ozone.report.defs#reasonSelfHarmStunts",
|
||||
"tools.ozone.report.defs#reasonSelfHarmSubstances",
|
||||
"tools.ozone.report.defs#reasonSelfHarmOther"
|
||||
]
|
||||
},
|
||||
"reasonOther": {
|
||||
"type": "token",
|
||||
"description": "Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`."
|
||||
},
|
||||
"subjectType": {
|
||||
"type": "string",
|
||||
"description": "Tag describing a type of subject that might be reported.",
|
||||
"knownValues": [
|
||||
"account",
|
||||
"record",
|
||||
"chat"
|
||||
]
|
||||
},
|
||||
"reasonAppeal": {
|
||||
"type": "token",
|
||||
"description": "Appeal a previously taken moderation action"
|
||||
},
|
||||
"reasonSexual": {
|
||||
"type": "token",
|
||||
"description": "Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`."
|
||||
},
|
||||
"reasonViolation": {
|
||||
"type": "token",
|
||||
"description": "Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`."
|
||||
},
|
||||
"reasonMisleading": {
|
||||
"type": "token",
|
||||
"description": "Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`."
|
||||
}
|
||||
},
|
||||
"$type": "com.atproto.lexicon.schema",
|
||||
"lexicon": 1
|
||||
}
|
||||
Reference in New Issue
Block a user