1{
2 "lexicon": 1,
3 "id": "sh.tangled.repo.languages",
4 "defs": {
5 "main": {
6 "type": "query",
7 "parameters": {
8 "type": "params",
9 "required": ["repo"],
10 "properties": {
11 "repo": {
12 "type": "string",
13 "description": "Repository identifier in format 'did:plc:.../repoName'"
14 },
15 "ref": {
16 "type": "string",
17 "description": "Git reference (branch, tag, or commit SHA)",
18 "default": "HEAD"
19 }
20 }
21 },
22 "output": {
23 "encoding": "application/json",
24 "schema": {
25 "type": "object",
26 "required": ["ref", "languages"],
27 "properties": {
28 "ref": {
29 "type": "string",
30 "description": "The git reference used"
31 },
32 "languages": {
33 "type": "array",
34 "items": {
35 "type": "ref",
36 "ref": "#language"
37 }
38 },
39 "totalSize": {
40 "type": "integer",
41 "description": "Total size of all analyzed files in bytes"
42 },
43 "totalFiles": {
44 "type": "integer",
45 "description": "Total number of files analyzed"
46 }
47 }
48 }
49 },
50 "errors": [
51 {
52 "name": "RepoNotFound",
53 "description": "Repository not found or access denied"
54 },
55 {
56 "name": "RefNotFound",
57 "description": "Git reference not found"
58 },
59 {
60 "name": "InvalidRequest",
61 "description": "Invalid request parameters"
62 }
63 ]
64 },
65 "language": {
66 "type": "object",
67 "required": ["name", "size", "percentage"],
68 "properties": {
69 "name": {
70 "type": "string",
71 "description": "Programming language name"
72 },
73 "size": {
74 "type": "integer",
75 "description": "Total size of files in this language (bytes)"
76 },
77 "percentage": {
78 "type": "integer",
79 "description": "Percentage of total codebase (0-100)"
80 },
81 "fileCount": {
82 "type": "integer",
83 "description": "Number of files in this language"
84 },
85 "color": {
86 "type": "string",
87 "description": "Hex color code for this language"
88 },
89 "extensions": {
90 "type": "array",
91 "items": {
92 "type": "string"
93 },
94 "description": "File extensions associated with this language"
95 }
96 }
97 }
98 }
99}