Monorepo for Tangled tangled.org
1{ 2 "lexicon": 1, 3 "id": "sh.tangled.repo.tree", 4 "defs": { 5 "main": { 6 "type": "query", 7 "parameters": { 8 "type": "params", 9 "required": ["repo", "ref"], 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 }, 19 "path": { 20 "type": "string", 21 "description": "Path within the repository tree", 22 "default": "" 23 } 24 } 25 }, 26 "output": { 27 "encoding": "application/json", 28 "schema": { 29 "type": "object", 30 "required": ["ref", "files"], 31 "properties": { 32 "ref": { 33 "type": "string", 34 "description": "The git reference used" 35 }, 36 "parent": { 37 "type": "string", 38 "description": "The parent path in the tree" 39 }, 40 "dotdot": { 41 "type": "string", 42 "description": "Parent directory path" 43 }, 44 "readme": { 45 "type": "ref", 46 "ref": "#readme", 47 "description": "Readme for this file tree" 48 }, 49 "files": { 50 "type": "array", 51 "items": { 52 "type": "ref", 53 "ref": "#treeEntry" 54 } 55 } 56 } 57 } 58 }, 59 "errors": [ 60 { 61 "name": "RepoNotFound", 62 "description": "Repository not found or access denied" 63 }, 64 { 65 "name": "RefNotFound", 66 "description": "Git reference not found" 67 }, 68 { 69 "name": "PathNotFound", 70 "description": "Path not found in repository tree" 71 }, 72 { 73 "name": "InvalidRequest", 74 "description": "Invalid request parameters" 75 } 76 ] 77 }, 78 "readme": { 79 "type": "object", 80 "required": ["filename", "contents"], 81 "properties": { 82 "filename": { 83 "type": "string", 84 "description": "Name of the readme file" 85 }, 86 "contents": { 87 "type": "string", 88 "description": "Contents of the readme file" 89 } 90 } 91 }, 92 "treeEntry": { 93 "type": "object", 94 "required": ["name", "mode", "size", "is_file", "is_subtree"], 95 "properties": { 96 "name": { 97 "type": "string", 98 "description": "Relative file or directory name" 99 }, 100 "mode": { 101 "type": "string", 102 "description": "File mode" 103 }, 104 "size": { 105 "type": "integer", 106 "description": "File size in bytes" 107 }, 108 "is_file": { 109 "type": "boolean", 110 "description": "Whether this entry is a file" 111 }, 112 "is_subtree": { 113 "type": "boolean", 114 "description": "Whether this entry is a directory/subtree" 115 }, 116 "last_commit": { 117 "type": "ref", 118 "ref": "#lastCommit" 119 } 120 } 121 }, 122 "lastCommit": { 123 "type": "object", 124 "required": ["hash", "message", "when"], 125 "properties": { 126 "hash": { 127 "type": "string", 128 "description": "Commit hash" 129 }, 130 "message": { 131 "type": "string", 132 "description": "Commit message" 133 }, 134 "when": { 135 "type": "string", 136 "format": "datetime", 137 "description": "Commit timestamp" 138 } 139 } 140 } 141 } 142}