An experimental TypeSpec syntax for Lexicon

wip

+3117 -3
+32 -3
packages/emitter/src/emitter.ts
··· 340 340 if (scalar.namespace?.name === "TypeSpec") return; 341 341 if (scalar.baseScalar?.namespace?.name === "TypeSpec") return; 342 342 343 + // Skip @inline scalars - they should be inlined, not defined separately 344 + if (isInline(this.program, scalar)) { 345 + return; 346 + } 347 + 343 348 const defName = scalar.name.charAt(0).toLowerCase() + scalar.name.slice(1); 344 349 const scalarDef = this.scalarToLexiconPrimitive(scalar, undefined); 345 350 if (scalarDef) { ··· 1125 1130 } 1126 1131 } 1127 1132 1128 - return this.unionToLexiconProperty(unionType, prop); 1133 + const unionDef = this.unionToLexiconProperty(unionType, prop); 1134 + if (!unionDef) return null; 1135 + 1136 + // Inherit description from union if no prop description and union is @inline 1137 + if (!propDesc && isInline(this.program, unionType)) { 1138 + const unionDesc = getDoc(this.program, unionType); 1139 + if (unionDesc) { 1140 + return { ...unionDef, description: unionDesc }; 1141 + } 1142 + } 1143 + 1144 + return unionDef; 1129 1145 } 1130 1146 1131 1147 private scalarToLexiconPrimitive( ··· 1166 1182 let primitive = this.getBasePrimitiveType(scalar); 1167 1183 if (!primitive) return null; 1168 1184 1169 - // Apply format if applicable 1170 - const format = STRING_FORMAT_MAP[scalar.name]; 1185 + // Apply format if applicable - check the scalar chain for format 1186 + const format = this.getScalarFormat(scalar); 1171 1187 if (format && primitive.type === "string") { 1172 1188 primitive = { ...primitive, format }; 1173 1189 } ··· 1221 1237 return true; 1222 1238 } 1223 1239 return false; 1240 + } 1241 + 1242 + private getScalarFormat(scalar: Scalar): string | undefined { 1243 + // Check if this scalar has a format 1244 + const format = STRING_FORMAT_MAP[scalar.name]; 1245 + if (format) { 1246 + return format; 1247 + } 1248 + // Check base scalar 1249 + if (scalar.baseScalar) { 1250 + return this.getScalarFormat(scalar.baseScalar); 1251 + } 1252 + return undefined; 1224 1253 } 1225 1254 1226 1255 private getBasePrimitiveType(scalar: Scalar): LexObjectProperty | null {
+50
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/actor/profile.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.actor.profile { 4 + @doc("A declaration of a Tangled account profile.") 5 + @rec("literal:self") 6 + model Main { 7 + @doc("Free-form profile description text.") 8 + @maxGraphemes(256) 9 + @maxLength(2560) 10 + description?: string; 11 + 12 + @minItems(0) 13 + @maxItems(5) 14 + links?: LinkItem[]; 15 + 16 + @minItems(0) 17 + @maxItems(2) 18 + stats?: StatValue[]; 19 + 20 + @doc("Include link to this account on Bluesky.") 21 + @required 22 + bluesky: boolean; 23 + 24 + @doc("Free-form location text.") 25 + @maxGraphemes(40) 26 + @maxLength(400) 27 + location?: string; 28 + 29 + @doc("Any ATURI, it is up to appviews to validate these fields.") 30 + @minItems(0) 31 + @maxItems(6) 32 + pinnedRepositories?: atUri[]; 33 + } 34 + 35 + @doc("Any URI, intended for social profiles or websites, can be used to link DIDs/AT-URIs too.") 36 + @inline 37 + scalar LinkItem extends uri; 38 + 39 + @doc("Vanity stats.") 40 + @closed 41 + @inline 42 + union StatValue { 43 + "merged-pull-request-count", 44 + "closed-pull-request-count", 45 + "open-pull-request-count", 46 + "open-issue-count", 47 + "closed-issue-count", 48 + "repository-count", 49 + } 50 + }
+23
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/feed/reaction.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.feed.reaction { 4 + @closed 5 + @inline 6 + union ReactionType { 7 + "👍", 8 + "👎", 9 + "😆", 10 + "🎉", 11 + "🫤", 12 + "❤️", 13 + "🚀", 14 + "👀", 15 + } 16 + 17 + @rec("tid") 18 + model Main { 19 + @required subject: atUri; 20 + @required reaction: ReactionType; 21 + @required createdAt: datetime; 22 + } 23 + }
+9
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/feed/star.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.feed.star { 4 + @rec("tid") 5 + model Main { 6 + @required subject: atUri; 7 + @required createdAt: datetime; 8 + } 9 + }
+9
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/graph/follow.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.graph.follow { 4 + @rec("tid") 5 + model Main { 6 + @required subject: did; 7 + @required createdAt: datetime; 8 + } 9 + }
+8
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/knot.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.knot { 4 + @rec("any") 5 + model Main { 6 + @required createdAt: datetime; 7 + } 8 + }
+39
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/knot/listKeys.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.knot.listKeys { 4 + @doc("List all public keys stored in the knot server") 5 + @query 6 + @errors(InternalServerError) 7 + op main( 8 + @doc("Maximum number of keys to return") 9 + @minValue(1) 10 + @maxValue(1000) 11 + limit?: int32 = 100, 12 + 13 + @doc("Pagination cursor") 14 + cursor?: string 15 + ): { 16 + @required keys: PublicKey[]; 17 + 18 + @doc("Pagination cursor for next page") 19 + cursor?: string; 20 + }; 21 + 22 + model PublicKey { 23 + @doc("DID associated with the public key") 24 + @required 25 + did: did; 26 + 27 + @doc("Public key contents") 28 + @maxLength(4096) 29 + @required 30 + key: string; 31 + 32 + @doc("Key upload timestamp") 33 + @required 34 + createdAt: datetime; 35 + } 36 + 37 + @doc("Failed to retrieve public keys") 38 + model InternalServerError {} 39 + }
+14
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/knot/member.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.knot.member { 4 + @rec("tid") 5 + model Main { 6 + @required subject: did; 7 + 8 + @doc("domain that this member now belongs to") 9 + @required 10 + domain: string; 11 + 12 + @required createdAt: datetime; 13 + } 14 + }
+9
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/knot/version.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.knot.version { 4 + @doc("Get the version of a knot") 5 + @query 6 + op main(): { 7 + @required version: string; 8 + }; 9 + }
+24
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/label.op.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.label.`op` { 4 + @rec("tid") 5 + model Main { 6 + @doc("The subject (task, pull or discussion) of this label. Appviews may apply a `scope` check and refuse this op.") 7 + @required 8 + subject: atUri; 9 + 10 + @required performedAt: datetime; 11 + @required add: Operand[]; 12 + @required delete: Operand[]; 13 + } 14 + 15 + model Operand { 16 + @doc("ATURI to the label definition") 17 + @required 18 + key: atUri; 19 + 20 + @doc("Stringified value of the label. This is first unstringed by appviews and then interpreted as a concrete value.") 21 + @required 22 + value: string; 23 + } 24 + }
+58
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/label/definition.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.label.definition { 4 + @rec("any") 5 + model Main { 6 + @doc("The display name of this label.") 7 + @minGraphemes(1) 8 + @maxGraphemes(40) 9 + @required 10 + name: string; 11 + 12 + @doc("The type definition of this label. Appviews may allow sorting for certain types.") 13 + @required 14 + valueType: ValueType; 15 + 16 + @doc("The areas of the repo this label may apply to, eg.: sh.tangled.repo.issue. Appviews may choose to respect this.") 17 + @required 18 + scope: nsid[]; 19 + 20 + @doc("The hex value for the background color for the label. Appviews may choose to respect this.") 21 + color?: string; 22 + 23 + @required createdAt: datetime; 24 + 25 + @doc("Whether this label can be repeated for a given entity, eg.: [reviewer:foo, reviewer:bar]") 26 + multiple?: boolean; 27 + } 28 + 29 + @closed 30 + @inline 31 + union ConcreteType { 32 + "null", 33 + "boolean", 34 + "integer", 35 + "string", 36 + } 37 + 38 + @closed 39 + @inline 40 + union FormatType { 41 + "any", 42 + "did", 43 + "nsid", 44 + } 45 + 46 + model ValueType { 47 + @doc("The concrete type of this label's value.") 48 + @required 49 + type: ConcreteType; 50 + 51 + @doc("An optional constraint that can be applied on string concrete types.") 52 + @required 53 + format: FormatType; 54 + 55 + @doc("Closed set of values that this label can take.") 56 + `enum`?: string[]; 57 + } 58 + }
+13
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/owner.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.owner { 4 + @doc("Get the owner of a service") 5 + @query 6 + @errors(OwnerNotFound) 7 + op main(): { 8 + @required owner: did; 9 + }; 10 + 11 + @doc("Owner is not set for this service") 12 + model OwnerNotFound {} 13 + }
+19
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/publicKey.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.publicKey { 4 + @rec("tid") 5 + model Main { 6 + @doc("public key contents") 7 + @maxLength(4096) 8 + @required 9 + key: string; 10 + 11 + @doc("human-readable name for this key") 12 + @required 13 + name: string; 14 + 15 + @doc("key upload timestamp") 16 + @required 17 + createdAt: datetime; 18 + } 19 + }
+11
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/repo/issue/issue.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.repo.issue { 4 + @rec("tid") 5 + model Main { 6 + @required repo: atUri; 7 + @required title: string; 8 + body?: string; 9 + @required createdAt: datetime; 10 + } 11 + }
+12
packages/emitter/test/integration/lexicon-examples/input/sh/tangled/repo/issue/state.tsp
··· 1 + import "@tylex/emitter"; 2 + 3 + namespace sh.tangled.repo.issue.state { 4 + @rec("tid") 5 + model Main { 6 + @required issue: atUri; 7 + 8 + @doc("state of the issue") 9 + @required 10 + state: "sh.tangled.repo.issue.state.open" | "sh.tangled.repo.issue.state.closed" | string = "sh.tangled.repo.issue.state.open"; 11 + } 12 + }
+72
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/actor/profile.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.actor.profile", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "description": "A declaration of a Tangled account profile.", 8 + "key": "literal:self", 9 + "record": { 10 + "type": "object", 11 + "required": [ 12 + "bluesky" 13 + ], 14 + "properties": { 15 + "description": { 16 + "type": "string", 17 + "description": "Free-form profile description text.", 18 + "maxGraphemes": 256, 19 + "maxLength": 2560 20 + }, 21 + "links": { 22 + "type": "array", 23 + "minLength": 0, 24 + "maxLength": 5, 25 + "items": { 26 + "type": "string", 27 + "description": "Any URI, intended for social profiles or websites, can be used to link DIDs/AT-URIs too.", 28 + "format": "uri" 29 + } 30 + }, 31 + "stats": { 32 + "type": "array", 33 + "minLength": 0, 34 + "maxLength": 2, 35 + "items": { 36 + "type": "string", 37 + "description": "Vanity stats.", 38 + "enum": [ 39 + "merged-pull-request-count", 40 + "closed-pull-request-count", 41 + "open-pull-request-count", 42 + "open-issue-count", 43 + "closed-issue-count", 44 + "repository-count" 45 + ] 46 + } 47 + }, 48 + "bluesky": { 49 + "type": "boolean", 50 + "description": "Include link to this account on Bluesky." 51 + }, 52 + "location": { 53 + "type": "string", 54 + "description": "Free-form location text.", 55 + "maxGraphemes": 40, 56 + "maxLength": 400 57 + }, 58 + "pinnedRepositories": { 59 + "type": "array", 60 + "description": "Any ATURI, it is up to appviews to validate these fields.", 61 + "minLength": 0, 62 + "maxLength": 6, 63 + "items": { 64 + "type": "string", 65 + "format": "at-uri" 66 + } 67 + } 68 + } 69 + } 70 + } 71 + } 72 + }
+32
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/feed/reaction.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.feed.reaction", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "subject", 12 + "reaction", 13 + "createdAt" 14 + ], 15 + "properties": { 16 + "subject": { 17 + "type": "string", 18 + "format": "at-uri" 19 + }, 20 + "reaction": { 21 + "type": "string", 22 + "enum": [ "👍", "👎", "😆", "🎉", "🫤", "❤️", "🚀", "👀" ] 23 + }, 24 + "createdAt": { 25 + "type": "string", 26 + "format": "datetime" 27 + } 28 + } 29 + } 30 + } 31 + } 32 + }
+27
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/feed/star.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.feed.star", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "subject", 12 + "createdAt" 13 + ], 14 + "properties": { 15 + "subject": { 16 + "type": "string", 17 + "format": "at-uri" 18 + }, 19 + "createdAt": { 20 + "type": "string", 21 + "format": "datetime" 22 + } 23 + } 24 + } 25 + } 26 + } 27 + }
+128
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/git/refUpdate.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.git.refUpdate", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "description": "An update to a git repository, emitted by knots.", 8 + "key": "tid", 9 + "record": { 10 + "type": "object", 11 + "required": [ 12 + "ref", 13 + "committerDid", 14 + "repoDid", 15 + "repoName", 16 + "oldSha", 17 + "newSha", 18 + "meta" 19 + ], 20 + "properties": { 21 + "ref": { 22 + "type": "string", 23 + "description": "Ref being updated", 24 + "maxGraphemes": 256, 25 + "maxLength": 2560 26 + }, 27 + "committerDid": { 28 + "type": "string", 29 + "description": "did of the user that pushed this ref", 30 + "format": "did" 31 + }, 32 + "repoDid": { 33 + "type": "string", 34 + "description": "did of the owner of the repo", 35 + "format": "did" 36 + }, 37 + "repoName": { 38 + "type": "string", 39 + "description": "name of the repo" 40 + }, 41 + "oldSha": { 42 + "type": "string", 43 + "description": "old SHA of this ref", 44 + "minLength": 40, 45 + "maxLength": 40 46 + }, 47 + "newSha": { 48 + "type": "string", 49 + "description": "new SHA of this ref", 50 + "minLength": 40, 51 + "maxLength": 40 52 + }, 53 + "meta": { 54 + "type": "ref", 55 + "ref": "#meta" 56 + } 57 + } 58 + } 59 + }, 60 + "meta": { 61 + "type": "object", 62 + "required": ["isDefaultRef", "commitCount"], 63 + "properties": { 64 + "isDefaultRef": { 65 + "type": "boolean", 66 + "default": false 67 + }, 68 + "langBreakdown": { 69 + "type": "ref", 70 + "ref": "#langBreakdown" 71 + }, 72 + "commitCount": { 73 + "type": "ref", 74 + "ref": "#commitCountBreakdown" 75 + } 76 + } 77 + }, 78 + "langBreakdown": { 79 + "type": "object", 80 + "properties": { 81 + "inputs": { 82 + "type": "array", 83 + "items": { 84 + "type": "ref", 85 + "ref": "#individualLanguageSize" 86 + } 87 + } 88 + } 89 + }, 90 + "individualLanguageSize": { 91 + "type": "object", 92 + "required": ["lang", "size"], 93 + "properties": { 94 + "lang": { 95 + "type": "string" 96 + }, 97 + "size": { 98 + "type": "integer" 99 + } 100 + } 101 + }, 102 + "commitCountBreakdown": { 103 + "type": "object", 104 + "required": [], 105 + "properties": { 106 + "byEmail": { 107 + "type": "array", 108 + "items": { 109 + "type": "ref", 110 + "ref": "#individualEmailCommitCount" 111 + } 112 + } 113 + } 114 + }, 115 + "individualEmailCommitCount": { 116 + "type": "object", 117 + "required": ["email", "count"], 118 + "properties": { 119 + "email": { 120 + "type": "string" 121 + }, 122 + "count": { 123 + "type": "integer" 124 + } 125 + } 126 + } 127 + } 128 + }
+27
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/graph/follow.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.graph.follow", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "subject", 12 + "createdAt" 13 + ], 14 + "properties": { 15 + "subject": { 16 + "type": "string", 17 + "format": "did" 18 + }, 19 + "createdAt": { 20 + "type": "string", 21 + "format": "datetime" 22 + } 23 + } 24 + } 25 + } 26 + } 27 + }
+10
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/issue/closed.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.issue.state.closed", 4 + "defs": { 5 + "main": { 6 + "type": "token", 7 + "description": "closed issue" 8 + } 9 + } 10 + }
+35
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/issue/comment.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.issue.comment", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "issue", 12 + "body", 13 + "createdAt" 14 + ], 15 + "properties": { 16 + "issue": { 17 + "type": "string", 18 + "format": "at-uri" 19 + }, 20 + "body": { 21 + "type": "string" 22 + }, 23 + "createdAt": { 24 + "type": "string", 25 + "format": "datetime" 26 + }, 27 + "replyTo": { 28 + "type": "string", 29 + "format": "at-uri" 30 + } 31 + } 32 + } 33 + } 34 + } 35 + }
+30
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/issue/issue.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.issue", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": ["repo", "title", "createdAt"], 11 + "properties": { 12 + "repo": { 13 + "type": "string", 14 + "format": "at-uri" 15 + }, 16 + "title": { 17 + "type": "string" 18 + }, 19 + "body": { 20 + "type": "string" 21 + }, 22 + "createdAt": { 23 + "type": "string", 24 + "format": "datetime" 25 + } 26 + } 27 + } 28 + } 29 + } 30 + }
+10
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/issue/open.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.issue.state.open", 4 + "defs": { 5 + "main": { 6 + "type": "token", 7 + "description": "open issue" 8 + } 9 + } 10 + }
+32
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/issue/state.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.issue.state", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "issue", 12 + "state" 13 + ], 14 + "properties": { 15 + "issue": { 16 + "type": "string", 17 + "format": "at-uri" 18 + }, 19 + "state": { 20 + "type": "string", 21 + "description": "state of the issue", 22 + "knownValues": [ 23 + "sh.tangled.repo.issue.state.open", 24 + "sh.tangled.repo.issue.state.closed" 25 + ], 26 + "default": "sh.tangled.repo.issue.state.open" 27 + } 28 + } 29 + } 30 + } 31 + } 32 + }
+22
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/knot/knot.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.knot", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "any", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "createdAt" 12 + ], 13 + "properties": { 14 + "createdAt": { 15 + "type": "string", 16 + "format": "datetime" 17 + } 18 + } 19 + } 20 + } 21 + } 22 + }
+73
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/knot/listKeys.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.knot.listKeys", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "List all public keys stored in the knot server", 8 + "parameters": { 9 + "type": "params", 10 + "properties": { 11 + "limit": { 12 + "type": "integer", 13 + "description": "Maximum number of keys to return", 14 + "minimum": 1, 15 + "maximum": 1000, 16 + "default": 100 17 + }, 18 + "cursor": { 19 + "type": "string", 20 + "description": "Pagination cursor" 21 + } 22 + } 23 + }, 24 + "output": { 25 + "encoding": "application/json", 26 + "schema": { 27 + "type": "object", 28 + "required": ["keys"], 29 + "properties": { 30 + "keys": { 31 + "type": "array", 32 + "items": { 33 + "type": "ref", 34 + "ref": "#publicKey" 35 + } 36 + }, 37 + "cursor": { 38 + "type": "string", 39 + "description": "Pagination cursor for next page" 40 + } 41 + } 42 + } 43 + }, 44 + "errors": [ 45 + { 46 + "name": "InternalServerError", 47 + "description": "Failed to retrieve public keys" 48 + } 49 + ] 50 + }, 51 + "publicKey": { 52 + "type": "object", 53 + "required": ["did", "key", "createdAt"], 54 + "properties": { 55 + "did": { 56 + "type": "string", 57 + "format": "did", 58 + "description": "DID associated with the public key" 59 + }, 60 + "key": { 61 + "type": "string", 62 + "maxLength": 4096, 63 + "description": "Public key contents" 64 + }, 65 + "createdAt": { 66 + "type": "string", 67 + "format": "datetime", 68 + "description": "Key upload timestamp" 69 + } 70 + } 71 + } 72 + } 73 + }
+32
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/knot/member.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.knot.member", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "subject", 12 + "domain", 13 + "createdAt" 14 + ], 15 + "properties": { 16 + "subject": { 17 + "type": "string", 18 + "format": "did" 19 + }, 20 + "domain": { 21 + "type": "string", 22 + "description": "domain that this member now belongs to" 23 + }, 24 + "createdAt": { 25 + "type": "string", 26 + "format": "datetime" 27 + } 28 + } 29 + } 30 + } 31 + } 32 + }
+24
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/knot/version.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.knot.version", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "Get the version of a knot", 8 + "output": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": [ 13 + "version" 14 + ], 15 + "properties": { 16 + "version": { 17 + "type": "string" 18 + } 19 + } 20 + } 21 + } 22 + } 23 + } 24 + }
+87
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/label/definition.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.label.definition", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "any", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "name", 12 + "valueType", 13 + "scope", 14 + "createdAt" 15 + ], 16 + "properties": { 17 + "name": { 18 + "type": "string", 19 + "description": "The display name of this label.", 20 + "minGraphemes": 1, 21 + "maxGraphemes": 40 22 + }, 23 + "valueType": { 24 + "type": "ref", 25 + "ref": "#valueType", 26 + "description": "The type definition of this label. Appviews may allow sorting for certain types." 27 + }, 28 + "scope": { 29 + "type": "array", 30 + "description": "The areas of the repo this label may apply to, eg.: sh.tangled.repo.issue. Appviews may choose to respect this.", 31 + "items": { 32 + "type": "string", 33 + "format": "nsid" 34 + } 35 + }, 36 + "color": { 37 + "type": "string", 38 + "description": "The hex value for the background color for the label. Appviews may choose to respect this." 39 + }, 40 + "createdAt": { 41 + "type": "string", 42 + "format": "datetime" 43 + }, 44 + "multiple": { 45 + "type": "boolean", 46 + "description": "Whether this label can be repeated for a given entity, eg.: [reviewer:foo, reviewer:bar]" 47 + } 48 + } 49 + } 50 + }, 51 + "valueType": { 52 + "type": "object", 53 + "required": [ 54 + "type", 55 + "format" 56 + ], 57 + "properties": { 58 + "type": { 59 + "type": "string", 60 + "enum": [ 61 + "null", 62 + "boolean", 63 + "integer", 64 + "string" 65 + ], 66 + "description": "The concrete type of this label's value." 67 + }, 68 + "format": { 69 + "type": "string", 70 + "enum": [ 71 + "any", 72 + "did", 73 + "nsid" 74 + ], 75 + "description": "An optional constraint that can be applied on string concrete types." 76 + }, 77 + "enum": { 78 + "type": "array", 79 + "description": "Closed set of values that this label can take.", 80 + "items": { 81 + "type": "string" 82 + } 83 + } 84 + } 85 + } 86 + } 87 + }
+62
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/label/op.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.label.op", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "subject", 12 + "add", 13 + "delete", 14 + "performedAt" 15 + ], 16 + "properties": { 17 + "subject": { 18 + "type": "string", 19 + "format": "at-uri", 20 + "description": "The subject (task, pull or discussion) of this label. Appviews may apply a `scope` check and refuse this op." 21 + }, 22 + "performedAt": { 23 + "type": "string", 24 + "format": "datetime" 25 + }, 26 + "add": { 27 + "type": "array", 28 + "items": { 29 + "type": "ref", 30 + "ref": "#operand" 31 + } 32 + }, 33 + "delete": { 34 + "type": "array", 35 + "items": { 36 + "type": "ref", 37 + "ref": "#operand" 38 + } 39 + } 40 + } 41 + } 42 + }, 43 + "operand": { 44 + "type": "object", 45 + "required": [ 46 + "key", 47 + "value" 48 + ], 49 + "properties": { 50 + "key": { 51 + "type": "string", 52 + "format": "at-uri", 53 + "description": "ATURI to the label definition" 54 + }, 55 + "value": { 56 + "type": "string", 57 + "description": "Stringified value of the label. This is first unstringed by appviews and then interpreted as a concrete value." 58 + } 59 + } 60 + } 61 + } 62 + }
+31
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/owner.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.owner", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "Get the owner of a service", 8 + "output": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": [ 13 + "owner" 14 + ], 15 + "properties": { 16 + "owner": { 17 + "type": "string", 18 + "format": "did" 19 + } 20 + } 21 + } 22 + }, 23 + "errors": [ 24 + { 25 + "name": "OwnerNotFound", 26 + "description": "Owner is not set for this service" 27 + } 28 + ] 29 + } 30 + } 31 + }
+205
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/pipeline/pipeline.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.pipeline", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "triggerMetadata", 12 + "workflows" 13 + ], 14 + "properties": { 15 + "triggerMetadata": { 16 + "type": "ref", 17 + "ref": "#triggerMetadata" 18 + }, 19 + "workflows": { 20 + "type": "array", 21 + "items": { 22 + "type": "ref", 23 + "ref": "#workflow" 24 + } 25 + } 26 + } 27 + } 28 + }, 29 + "triggerMetadata": { 30 + "type": "object", 31 + "required": [ 32 + "kind", 33 + "repo" 34 + ], 35 + "properties": { 36 + "kind": { 37 + "type": "string", 38 + "enum": [ 39 + "push", 40 + "pull_request", 41 + "manual" 42 + ] 43 + }, 44 + "repo": { 45 + "type": "ref", 46 + "ref": "#triggerRepo" 47 + }, 48 + "push": { 49 + "type": "ref", 50 + "ref": "#pushTriggerData" 51 + }, 52 + "pullRequest": { 53 + "type": "ref", 54 + "ref": "#pullRequestTriggerData" 55 + }, 56 + "manual": { 57 + "type": "ref", 58 + "ref": "#manualTriggerData" 59 + } 60 + } 61 + }, 62 + "triggerRepo": { 63 + "type": "object", 64 + "required": [ 65 + "knot", 66 + "did", 67 + "repo", 68 + "defaultBranch" 69 + ], 70 + "properties": { 71 + "knot": { 72 + "type": "string" 73 + }, 74 + "did": { 75 + "type": "string", 76 + "format": "did" 77 + }, 78 + "repo": { 79 + "type": "string" 80 + }, 81 + "defaultBranch": { 82 + "type": "string" 83 + } 84 + } 85 + }, 86 + "pushTriggerData": { 87 + "type": "object", 88 + "required": [ 89 + "ref", 90 + "newSha", 91 + "oldSha" 92 + ], 93 + "properties": { 94 + "ref": { 95 + "type": "string" 96 + }, 97 + "newSha": { 98 + "type": "string", 99 + "minLength": 40, 100 + "maxLength": 40 101 + }, 102 + "oldSha": { 103 + "type": "string", 104 + "minLength": 40, 105 + "maxLength": 40 106 + } 107 + } 108 + }, 109 + "pullRequestTriggerData": { 110 + "type": "object", 111 + "required": [ 112 + "sourceBranch", 113 + "targetBranch", 114 + "sourceSha", 115 + "action" 116 + ], 117 + "properties": { 118 + "sourceBranch": { 119 + "type": "string" 120 + }, 121 + "targetBranch": { 122 + "type": "string" 123 + }, 124 + "sourceSha": { 125 + "type": "string", 126 + "minLength": 40, 127 + "maxLength": 40 128 + }, 129 + "action": { 130 + "type": "string" 131 + } 132 + } 133 + }, 134 + "manualTriggerData": { 135 + "type": "object", 136 + "properties": { 137 + "inputs": { 138 + "type": "array", 139 + "items": { 140 + "type": "ref", 141 + "ref": "#pair" 142 + } 143 + } 144 + } 145 + }, 146 + "workflow": { 147 + "type": "object", 148 + "required": [ 149 + "name", 150 + "engine", 151 + "clone", 152 + "raw" 153 + ], 154 + "properties": { 155 + "name": { 156 + "type": "string" 157 + }, 158 + "engine": { 159 + "type": "string" 160 + }, 161 + "clone": { 162 + "type": "ref", 163 + "ref": "#cloneOpts" 164 + }, 165 + "raw": { 166 + "type": "string" 167 + } 168 + } 169 + }, 170 + "cloneOpts": { 171 + "type": "object", 172 + "required": [ 173 + "skip", 174 + "depth", 175 + "submodules" 176 + ], 177 + "properties": { 178 + "skip": { 179 + "type": "boolean" 180 + }, 181 + "depth": { 182 + "type": "integer" 183 + }, 184 + "submodules": { 185 + "type": "boolean" 186 + } 187 + } 188 + }, 189 + "pair": { 190 + "type": "object", 191 + "required": [ 192 + "key", 193 + "value" 194 + ], 195 + "properties": { 196 + "key": { 197 + "type": "string" 198 + }, 199 + "value": { 200 + "type": "string" 201 + } 202 + } 203 + } 204 + } 205 + }
+51
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/pipeline/status.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.pipeline.status", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": ["pipeline", "workflow", "status", "createdAt"], 11 + "properties": { 12 + "pipeline": { 13 + "type": "string", 14 + "format": "at-uri", 15 + "description": "ATURI of the pipeline" 16 + }, 17 + "workflow": { 18 + "type": "string", 19 + "format": "at-uri", 20 + "description": "name of the workflow within this pipeline" 21 + }, 22 + "status": { 23 + "type": "string", 24 + "description": "status of the workflow", 25 + "enum": [ 26 + "pending", 27 + "running", 28 + "failed", 29 + "timeout", 30 + "cancelled", 31 + "success" 32 + ] 33 + }, 34 + "createdAt": { 35 + "type": "string", 36 + "format": "datetime", 37 + "description": "time of creation of this status update" 38 + }, 39 + "error": { 40 + "type": "string", 41 + "description": "error message if failed" 42 + }, 43 + "exitCode": { 44 + "type": "integer", 45 + "description": "exit code if failed" 46 + } 47 + } 48 + } 49 + } 50 + } 51 + }
+34
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/publicKey.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.publicKey", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "key", 12 + "name", 13 + "createdAt" 14 + ], 15 + "properties": { 16 + "key": { 17 + "type": "string", 18 + "maxLength": 4096, 19 + "description": "public key contents" 20 + }, 21 + "name": { 22 + "type": "string", 23 + "description": "human-readable name for this key" 24 + }, 25 + "createdAt": { 26 + "type": "string", 27 + "format": "datetime", 28 + "description": "key upload timestamp" 29 + } 30 + } 31 + } 32 + } 33 + } 34 + }
+10
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/pulls/closed.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.pull.status.closed", 4 + "defs": { 5 + "main": { 6 + "type": "token", 7 + "description": "closed pull request" 8 + } 9 + } 10 + }
+31
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/pulls/comment.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.pull.comment", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "pull", 12 + "body", 13 + "createdAt" 14 + ], 15 + "properties": { 16 + "pull": { 17 + "type": "string", 18 + "format": "at-uri" 19 + }, 20 + "body": { 21 + "type": "string" 22 + }, 23 + "createdAt": { 24 + "type": "string", 25 + "format": "datetime" 26 + } 27 + } 28 + } 29 + } 30 + } 31 + }
+10
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/pulls/merged.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.pull.status.merged", 4 + "defs": { 5 + "main": { 6 + "type": "token", 7 + "description": "merged pull request" 8 + } 9 + } 10 + }
+10
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/pulls/open.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.pull.status.open", 4 + "defs": { 5 + "main": { 6 + "type": "token", 7 + "description": "open pull request" 8 + } 9 + } 10 + }
+79
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/pulls/pull.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.pull", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "target", 12 + "title", 13 + "patch", 14 + "createdAt" 15 + ], 16 + "properties": { 17 + "target": { 18 + "type": "ref", 19 + "ref": "#target" 20 + }, 21 + "title": { 22 + "type": "string" 23 + }, 24 + "body": { 25 + "type": "string" 26 + }, 27 + "patch": { 28 + "type": "string" 29 + }, 30 + "source": { 31 + "type": "ref", 32 + "ref": "#source" 33 + }, 34 + "createdAt": { 35 + "type": "string", 36 + "format": "datetime" 37 + } 38 + } 39 + } 40 + }, 41 + "target": { 42 + "type": "object", 43 + "required": [ 44 + "repo", 45 + "branch" 46 + ], 47 + "properties": { 48 + "repo": { 49 + "type": "string", 50 + "format": "at-uri" 51 + }, 52 + "branch": { 53 + "type": "string" 54 + } 55 + } 56 + }, 57 + "source": { 58 + "type": "object", 59 + "required": [ 60 + "branch", 61 + "sha" 62 + ], 63 + "properties": { 64 + "branch": { 65 + "type": "string" 66 + }, 67 + "sha": { 68 + "type": "string", 69 + "minLength": 40, 70 + "maxLength": 40 71 + }, 72 + "repo": { 73 + "type": "string", 74 + "format": "at-uri" 75 + } 76 + } 77 + } 78 + } 79 + }
+33
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/pulls/state.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.pull.status", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "pull", 12 + "status" 13 + ], 14 + "properties": { 15 + "pull": { 16 + "type": "string", 17 + "format": "at-uri" 18 + }, 19 + "status": { 20 + "type": "string", 21 + "description": "status of the pull request", 22 + "knownValues": [ 23 + "sh.tangled.repo.pull.status.open", 24 + "sh.tangled.repo.pull.status.closed", 25 + "sh.tangled.repo.pull.status.merged" 26 + ], 27 + "default": "sh.tangled.repo.pull.status.open" 28 + } 29 + } 30 + } 31 + } 32 + } 33 + }
+37
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/addSecret.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.addSecret", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Add a CI secret", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": [ 13 + "repo", 14 + "key", 15 + "value" 16 + ], 17 + "properties": { 18 + "repo": { 19 + "type": "string", 20 + "format": "at-uri" 21 + }, 22 + "key": { 23 + "type": "string", 24 + "maxLength": 50, 25 + "minLength": 1 26 + }, 27 + "value": { 28 + "type": "string", 29 + "maxLength": 200, 30 + "minLength": 1 31 + } 32 + } 33 + } 34 + } 35 + } 36 + } 37 + }
+55
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/archive.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.archive", 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 + "format": { 20 + "type": "string", 21 + "description": "Archive format", 22 + "enum": ["tar", "zip", "tar.gz", "tar.bz2", "tar.xz"], 23 + "default": "tar.gz" 24 + }, 25 + "prefix": { 26 + "type": "string", 27 + "description": "Prefix for files in the archive" 28 + } 29 + } 30 + }, 31 + "output": { 32 + "encoding": "*/*", 33 + "description": "Binary archive data" 34 + }, 35 + "errors": [ 36 + { 37 + "name": "RepoNotFound", 38 + "description": "Repository not found or access denied" 39 + }, 40 + { 41 + "name": "RefNotFound", 42 + "description": "Git reference not found" 43 + }, 44 + { 45 + "name": "InvalidRequest", 46 + "description": "Invalid request parameters" 47 + }, 48 + { 49 + "name": "ArchiveError", 50 + "description": "Failed to create archive" 51 + } 52 + ] 53 + } 54 + } 55 + }
+50
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/artifact.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.artifact", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "name", 12 + "repo", 13 + "tag", 14 + "createdAt", 15 + "artifact" 16 + ], 17 + "properties": { 18 + "name": { 19 + "type": "string", 20 + "description": "name of the artifact" 21 + }, 22 + "repo": { 23 + "type": "string", 24 + "format": "at-uri", 25 + "description": "repo that this artifact is being uploaded to" 26 + }, 27 + "tag": { 28 + "type": "bytes", 29 + "description": "hash of the tag object that this artifact is attached to (only annotated tags are supported)", 30 + "minLength": 20, 31 + "maxLength": 20 32 + }, 33 + "createdAt": { 34 + "type": "string", 35 + "format": "datetime", 36 + "description": "time of creation of this artifact" 37 + }, 38 + "artifact": { 39 + "type": "blob", 40 + "description": "the artifact", 41 + "accept": [ 42 + "*/*" 43 + ], 44 + "maxSize": 52428800 45 + } 46 + } 47 + } 48 + } 49 + } 50 + }
+138
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/blob.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.blob", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "parameters": { 8 + "type": "params", 9 + "required": ["repo", "ref", "path"], 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 to the file within the repository" 22 + }, 23 + "raw": { 24 + "type": "boolean", 25 + "description": "Return raw file content instead of JSON response", 26 + "default": false 27 + } 28 + } 29 + }, 30 + "output": { 31 + "encoding": "application/json", 32 + "schema": { 33 + "type": "object", 34 + "required": ["ref", "path", "content"], 35 + "properties": { 36 + "ref": { 37 + "type": "string", 38 + "description": "The git reference used" 39 + }, 40 + "path": { 41 + "type": "string", 42 + "description": "The file path" 43 + }, 44 + "content": { 45 + "type": "string", 46 + "description": "File content (base64 encoded for binary files)" 47 + }, 48 + "encoding": { 49 + "type": "string", 50 + "description": "Content encoding", 51 + "enum": ["utf-8", "base64"] 52 + }, 53 + "size": { 54 + "type": "integer", 55 + "description": "File size in bytes" 56 + }, 57 + "isBinary": { 58 + "type": "boolean", 59 + "description": "Whether the file is binary" 60 + }, 61 + "mimeType": { 62 + "type": "string", 63 + "description": "MIME type of the file" 64 + }, 65 + "lastCommit": { 66 + "type": "ref", 67 + "ref": "#lastCommit" 68 + } 69 + } 70 + } 71 + }, 72 + "errors": [ 73 + { 74 + "name": "RepoNotFound", 75 + "description": "Repository not found or access denied" 76 + }, 77 + { 78 + "name": "RefNotFound", 79 + "description": "Git reference not found" 80 + }, 81 + { 82 + "name": "FileNotFound", 83 + "description": "File not found at the specified path" 84 + }, 85 + { 86 + "name": "InvalidRequest", 87 + "description": "Invalid request parameters" 88 + } 89 + ] 90 + }, 91 + "lastCommit": { 92 + "type": "object", 93 + "required": ["hash", "message", "when"], 94 + "properties": { 95 + "hash": { 96 + "type": "string", 97 + "description": "Commit hash" 98 + }, 99 + "shortHash": { 100 + "type": "string", 101 + "description": "Short commit hash" 102 + }, 103 + "message": { 104 + "type": "string", 105 + "description": "Commit message" 106 + }, 107 + "author": { 108 + "type": "ref", 109 + "ref": "#signature" 110 + }, 111 + "when": { 112 + "type": "string", 113 + "format": "datetime", 114 + "description": "Commit timestamp" 115 + } 116 + } 117 + }, 118 + "signature": { 119 + "type": "object", 120 + "required": ["name", "email", "when"], 121 + "properties": { 122 + "name": { 123 + "type": "string", 124 + "description": "Author name" 125 + }, 126 + "email": { 127 + "type": "string", 128 + "description": "Author email" 129 + }, 130 + "when": { 131 + "type": "string", 132 + "format": "datetime", 133 + "description": "Author timestamp" 134 + } 135 + } 136 + } 137 + } 138 + }
+94
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/branch.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.branch", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "parameters": { 8 + "type": "params", 9 + "required": ["repo", "name"], 10 + "properties": { 11 + "repo": { 12 + "type": "string", 13 + "description": "Repository identifier in format 'did:plc:.../repoName'" 14 + }, 15 + "name": { 16 + "type": "string", 17 + "description": "Branch name to get information for" 18 + } 19 + } 20 + }, 21 + "output": { 22 + "encoding": "application/json", 23 + "schema": { 24 + "type": "object", 25 + "required": ["name", "hash", "when"], 26 + "properties": { 27 + "name": { 28 + "type": "string", 29 + "description": "Branch name" 30 + }, 31 + "hash": { 32 + "type": "string", 33 + "description": "Latest commit hash on this branch" 34 + }, 35 + "shortHash": { 36 + "type": "string", 37 + "description": "Short commit hash" 38 + }, 39 + "when": { 40 + "type": "string", 41 + "format": "datetime", 42 + "description": "Timestamp of latest commit" 43 + }, 44 + "message": { 45 + "type": "string", 46 + "description": "Latest commit message" 47 + }, 48 + "author": { 49 + "type": "ref", 50 + "ref": "#signature" 51 + }, 52 + "isDefault": { 53 + "type": "boolean", 54 + "description": "Whether this is the default branch" 55 + } 56 + } 57 + } 58 + }, 59 + "errors": [ 60 + { 61 + "name": "RepoNotFound", 62 + "description": "Repository not found or access denied" 63 + }, 64 + { 65 + "name": "BranchNotFound", 66 + "description": "Branch not found" 67 + }, 68 + { 69 + "name": "InvalidRequest", 70 + "description": "Invalid request parameters" 71 + } 72 + ] 73 + }, 74 + "signature": { 75 + "type": "object", 76 + "required": ["name", "email", "when"], 77 + "properties": { 78 + "name": { 79 + "type": "string", 80 + "description": "Author name" 81 + }, 82 + "email": { 83 + "type": "string", 84 + "description": "Author email" 85 + }, 86 + "when": { 87 + "type": "string", 88 + "format": "datetime", 89 + "description": "Author timestamp" 90 + } 91 + } 92 + } 93 + } 94 + }
+43
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/branches.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.branches", 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 + "limit": { 16 + "type": "integer", 17 + "description": "Maximum number of branches to return", 18 + "minimum": 1, 19 + "maximum": 100, 20 + "default": 50 21 + }, 22 + "cursor": { 23 + "type": "string", 24 + "description": "Pagination cursor" 25 + } 26 + } 27 + }, 28 + "output": { 29 + "encoding": "*/*" 30 + }, 31 + "errors": [ 32 + { 33 + "name": "RepoNotFound", 34 + "description": "Repository not found or access denied" 35 + }, 36 + { 37 + "name": "InvalidRequest", 38 + "description": "Invalid request parameters" 39 + } 40 + ] 41 + } 42 + } 43 + }
+34
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/collaborator.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.collaborator", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "subject", 12 + "repo", 13 + "createdAt" 14 + ], 15 + "properties": { 16 + "subject": { 17 + "type": "string", 18 + "format": "did" 19 + }, 20 + "repo": { 21 + "type": "string", 22 + "description": "repo to add this user to", 23 + "format": "at-uri" 24 + }, 25 + "createdAt": { 26 + "type": "string", 27 + "format": "datetime" 28 + } 29 + } 30 + } 31 + } 32 + } 33 + } 34 +
+49
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/compare.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.compare", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "parameters": { 8 + "type": "params", 9 + "required": ["repo", "rev1", "rev2"], 10 + "properties": { 11 + "repo": { 12 + "type": "string", 13 + "description": "Repository identifier in format 'did:plc:.../repoName'" 14 + }, 15 + "rev1": { 16 + "type": "string", 17 + "description": "First revision (commit, branch, or tag)" 18 + }, 19 + "rev2": { 20 + "type": "string", 21 + "description": "Second revision (commit, branch, or tag)" 22 + } 23 + } 24 + }, 25 + "output": { 26 + "encoding": "*/*", 27 + "description": "Compare output in application/json" 28 + }, 29 + "errors": [ 30 + { 31 + "name": "RepoNotFound", 32 + "description": "Repository not found or access denied" 33 + }, 34 + { 35 + "name": "RevisionNotFound", 36 + "description": "One or both revisions not found" 37 + }, 38 + { 39 + "name": "InvalidRequest", 40 + "description": "Invalid request parameters" 41 + }, 42 + { 43 + "name": "CompareError", 44 + "description": "Failed to compare revisions" 45 + } 46 + ] 47 + } 48 + } 49 + }
+33
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/create.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.create", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Create a new repository", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": [ 13 + "rkey" 14 + ], 15 + "properties": { 16 + "rkey": { 17 + "type": "string", 18 + "description": "Rkey of the repository record" 19 + }, 20 + "defaultBranch": { 21 + "type": "string", 22 + "description": "Default branch to push to" 23 + }, 24 + "source": { 25 + "type": "string", 26 + "description": "A source URL to clone from, populate this when forking or importing a repository." 27 + } 28 + } 29 + } 30 + } 31 + } 32 + } 33 + }
+29
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/defaultBranch.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.setDefaultBranch", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Set the default branch for a repository", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": [ 13 + "repo", 14 + "defaultBranch" 15 + ], 16 + "properties": { 17 + "repo": { 18 + "type": "string", 19 + "format": "at-uri" 20 + }, 21 + "defaultBranch": { 22 + "type": "string" 23 + } 24 + } 25 + } 26 + } 27 + } 28 + } 29 + }
+32
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/delete.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.delete", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Delete a repository", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["did", "name", "rkey"], 13 + "properties": { 14 + "did": { 15 + "type": "string", 16 + "format": "did", 17 + "description": "DID of the repository owner" 18 + }, 19 + "name": { 20 + "type": "string", 21 + "description": "Name of the repository to delete" 22 + }, 23 + "rkey": { 24 + "type": "string", 25 + "description": "Rkey of the repository record" 26 + } 27 + } 28 + } 29 + } 30 + } 31 + } 32 + }
+40
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/diff.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.diff", 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 + } 20 + }, 21 + "output": { 22 + "encoding": "*/*" 23 + }, 24 + "errors": [ 25 + { 26 + "name": "RepoNotFound", 27 + "description": "Repository not found or access denied" 28 + }, 29 + { 30 + "name": "RefNotFound", 31 + "description": "Git reference not found" 32 + }, 33 + { 34 + "name": "InvalidRequest", 35 + "description": "Invalid request parameters" 36 + } 37 + ] 38 + } 39 + } 40 + }
+53
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/forkStatus.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.forkStatus", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Check fork status relative to upstream source", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["did", "name", "source", "branch", "hiddenRef"], 13 + "properties": { 14 + "did": { 15 + "type": "string", 16 + "format": "did", 17 + "description": "DID of the fork owner" 18 + }, 19 + "name": { 20 + "type": "string", 21 + "description": "Name of the forked repository" 22 + }, 23 + "source": { 24 + "type": "string", 25 + "description": "Source repository URL" 26 + }, 27 + "branch": { 28 + "type": "string", 29 + "description": "Branch to check status for" 30 + }, 31 + "hiddenRef": { 32 + "type": "string", 33 + "description": "Hidden ref to use for comparison" 34 + } 35 + } 36 + } 37 + }, 38 + "output": { 39 + "encoding": "application/json", 40 + "schema": { 41 + "type": "object", 42 + "required": ["status"], 43 + "properties": { 44 + "status": { 45 + "type": "integer", 46 + "description": "Fork status: 0=UpToDate, 1=FastForwardable, 2=Conflict, 3=MissingBranch" 47 + } 48 + } 49 + } 50 + } 51 + } 52 + } 53 + }
+42
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/forkSync.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.forkSync", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Sync a forked repository with its upstream source", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": [ 13 + "did", 14 + "source", 15 + "name", 16 + "branch" 17 + ], 18 + "properties": { 19 + "did": { 20 + "type": "string", 21 + "format": "did", 22 + "description": "DID of the fork owner" 23 + }, 24 + "source": { 25 + "type": "string", 26 + "format": "at-uri", 27 + "description": "AT-URI of the source repository" 28 + }, 29 + "name": { 30 + "type": "string", 31 + "description": "Name of the forked repository" 32 + }, 33 + "branch": { 34 + "type": "string", 35 + "description": "Branch to sync" 36 + } 37 + } 38 + } 39 + } 40 + } 41 + } 42 + }
+82
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/getDefaultBranch.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.getDefaultBranch", 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 + } 16 + }, 17 + "output": { 18 + "encoding": "application/json", 19 + "schema": { 20 + "type": "object", 21 + "required": ["name", "hash", "when"], 22 + "properties": { 23 + "name": { 24 + "type": "string", 25 + "description": "Default branch name" 26 + }, 27 + "hash": { 28 + "type": "string", 29 + "description": "Latest commit hash on default branch" 30 + }, 31 + "shortHash": { 32 + "type": "string", 33 + "description": "Short commit hash" 34 + }, 35 + "when": { 36 + "type": "string", 37 + "format": "datetime", 38 + "description": "Timestamp of latest commit" 39 + }, 40 + "message": { 41 + "type": "string", 42 + "description": "Latest commit message" 43 + }, 44 + "author": { 45 + "type": "ref", 46 + "ref": "#signature" 47 + } 48 + } 49 + } 50 + }, 51 + "errors": [ 52 + { 53 + "name": "RepoNotFound", 54 + "description": "Repository not found or access denied" 55 + }, 56 + { 57 + "name": "InvalidRequest", 58 + "description": "Invalid request parameters" 59 + } 60 + ] 61 + }, 62 + "signature": { 63 + "type": "object", 64 + "required": ["name", "email", "when"], 65 + "properties": { 66 + "name": { 67 + "type": "string", 68 + "description": "Author name" 69 + }, 70 + "email": { 71 + "type": "string", 72 + "description": "Author email" 73 + }, 74 + "when": { 75 + "type": "string", 76 + "format": "datetime", 77 + "description": "Author timestamp" 78 + } 79 + } 80 + } 81 + } 82 + }
+59
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/hiddenRef.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.hiddenRef", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Create a hidden ref in a repository", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": [ 13 + "repo", 14 + "forkRef", 15 + "remoteRef" 16 + ], 17 + "properties": { 18 + "repo": { 19 + "type": "string", 20 + "format": "at-uri", 21 + "description": "AT-URI of the repository" 22 + }, 23 + "forkRef": { 24 + "type": "string", 25 + "description": "Fork reference name" 26 + }, 27 + "remoteRef": { 28 + "type": "string", 29 + "description": "Remote reference name" 30 + } 31 + } 32 + } 33 + }, 34 + "output": { 35 + "encoding": "application/json", 36 + "schema": { 37 + "type": "object", 38 + "required": [ 39 + "success" 40 + ], 41 + "properties": { 42 + "success": { 43 + "type": "boolean", 44 + "description": "Whether the hidden ref was created successfully" 45 + }, 46 + "ref": { 47 + "type": "string", 48 + "description": "The created hidden ref name" 49 + }, 50 + "error": { 51 + "type": "string", 52 + "description": "Error message if creation failed" 53 + } 54 + } 55 + } 56 + } 57 + } 58 + } 59 + }
+99
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/languages.json
··· 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 + }
+67
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/listSecrets.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.listSecrets", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "parameters": { 8 + "type": "params", 9 + "required": [ 10 + "repo" 11 + ], 12 + "properties": { 13 + "repo": { 14 + "type": "string", 15 + "format": "at-uri" 16 + } 17 + } 18 + }, 19 + "output": { 20 + "encoding": "application/json", 21 + "schema": { 22 + "type": "object", 23 + "required": [ 24 + "secrets" 25 + ], 26 + "properties": { 27 + "secrets": { 28 + "type": "array", 29 + "items": { 30 + "type": "ref", 31 + "ref": "#secret" 32 + } 33 + } 34 + } 35 + } 36 + } 37 + }, 38 + "secret": { 39 + "type": "object", 40 + "required": [ 41 + "repo", 42 + "key", 43 + "createdAt", 44 + "createdBy" 45 + ], 46 + "properties": { 47 + "repo": { 48 + "type": "string", 49 + "format": "at-uri" 50 + }, 51 + "key": { 52 + "type": "string", 53 + "maxLength": 50, 54 + "minLength": 1 55 + }, 56 + "createdAt": { 57 + "type": "string", 58 + "format": "datetime" 59 + }, 60 + "createdBy": { 61 + "type": "string", 62 + "format": "did" 63 + } 64 + } 65 + } 66 + } 67 + }
+60
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/log.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.log", 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 to filter commits by", 22 + "default": "" 23 + }, 24 + "limit": { 25 + "type": "integer", 26 + "description": "Maximum number of commits to return", 27 + "minimum": 1, 28 + "maximum": 100, 29 + "default": 50 30 + }, 31 + "cursor": { 32 + "type": "string", 33 + "description": "Pagination cursor (commit SHA)" 34 + } 35 + } 36 + }, 37 + "output": { 38 + "encoding": "*/*" 39 + }, 40 + "errors": [ 41 + { 42 + "name": "RepoNotFound", 43 + "description": "Repository not found or access denied" 44 + }, 45 + { 46 + "name": "RefNotFound", 47 + "description": "Git reference not found" 48 + }, 49 + { 50 + "name": "PathNotFound", 51 + "description": "Path not found in repository" 52 + }, 53 + { 54 + "name": "InvalidRequest", 55 + "description": "Invalid request parameters" 56 + } 57 + ] 58 + } 59 + } 60 + }
+52
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/merge.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.merge", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Merge a patch into a repository branch", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["did", "name", "patch", "branch"], 13 + "properties": { 14 + "did": { 15 + "type": "string", 16 + "format": "did", 17 + "description": "DID of the repository owner" 18 + }, 19 + "name": { 20 + "type": "string", 21 + "description": "Name of the repository" 22 + }, 23 + "patch": { 24 + "type": "string", 25 + "description": "Patch content to merge" 26 + }, 27 + "branch": { 28 + "type": "string", 29 + "description": "Target branch to merge into" 30 + }, 31 + "authorName": { 32 + "type": "string", 33 + "description": "Author name for the merge commit" 34 + }, 35 + "authorEmail": { 36 + "type": "string", 37 + "description": "Author email for the merge commit" 38 + }, 39 + "commitBody": { 40 + "type": "string", 41 + "description": "Additional commit message body" 42 + }, 43 + "commitMessage": { 44 + "type": "string", 45 + "description": "Merge commit message" 46 + } 47 + } 48 + } 49 + } 50 + } 51 + } 52 + }
+79
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/mergeCheck.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.mergeCheck", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Check if a merge is possible between two branches", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["did", "name", "patch", "branch"], 13 + "properties": { 14 + "did": { 15 + "type": "string", 16 + "format": "did", 17 + "description": "DID of the repository owner" 18 + }, 19 + "name": { 20 + "type": "string", 21 + "description": "Name of the repository" 22 + }, 23 + "patch": { 24 + "type": "string", 25 + "description": "Patch or pull request to check for merge conflicts" 26 + }, 27 + "branch": { 28 + "type": "string", 29 + "description": "Target branch to merge into" 30 + } 31 + } 32 + } 33 + }, 34 + "output": { 35 + "encoding": "application/json", 36 + "schema": { 37 + "type": "object", 38 + "required": ["is_conflicted"], 39 + "properties": { 40 + "is_conflicted": { 41 + "type": "boolean", 42 + "description": "Whether the merge has conflicts" 43 + }, 44 + "conflicts": { 45 + "type": "array", 46 + "description": "List of files with merge conflicts", 47 + "items": { 48 + "type": "ref", 49 + "ref": "#conflictInfo" 50 + } 51 + }, 52 + "message": { 53 + "type": "string", 54 + "description": "Additional message about the merge check" 55 + }, 56 + "error": { 57 + "type": "string", 58 + "description": "Error message if check failed" 59 + } 60 + } 61 + } 62 + } 63 + }, 64 + "conflictInfo": { 65 + "type": "object", 66 + "required": ["filename", "reason"], 67 + "properties": { 68 + "filename": { 69 + "type": "string", 70 + "description": "Name of the conflicted file" 71 + }, 72 + "reason": { 73 + "type": "string", 74 + "description": "Reason for the conflict" 75 + } 76 + } 77 + } 78 + } 79 + }
+31
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/removeSecret.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.removeSecret", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Remove a CI secret", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": [ 13 + "repo", 14 + "key" 15 + ], 16 + "properties": { 17 + "repo": { 18 + "type": "string", 19 + "format": "at-uri" 20 + }, 21 + "key": { 22 + "type": "string", 23 + "maxLength": 50, 24 + "minLength": 1 25 + } 26 + } 27 + } 28 + } 29 + } 30 + } 31 + }
+54
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/repo.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "name", 12 + "knot", 13 + "createdAt" 14 + ], 15 + "properties": { 16 + "name": { 17 + "type": "string", 18 + "description": "name of the repo" 19 + }, 20 + "knot": { 21 + "type": "string", 22 + "description": "knot where the repo was created" 23 + }, 24 + "spindle": { 25 + "type": "string", 26 + "description": "CI runner to send jobs to and receive results from" 27 + }, 28 + "description": { 29 + "type": "string", 30 + "minGraphemes": 1, 31 + "maxGraphemes": 140 32 + }, 33 + "source": { 34 + "type": "string", 35 + "format": "uri", 36 + "description": "source of the repo" 37 + }, 38 + "labels": { 39 + "type": "array", 40 + "description": "List of labels that this repo subscribes to", 41 + "items": { 42 + "type": "string", 43 + "format": "at-uri" 44 + } 45 + }, 46 + "createdAt": { 47 + "type": "string", 48 + "format": "datetime" 49 + } 50 + } 51 + } 52 + } 53 + } 54 + }
+43
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/tags.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.repo.tags", 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 + "limit": { 16 + "type": "integer", 17 + "description": "Maximum number of tags to return", 18 + "minimum": 1, 19 + "maximum": 100, 20 + "default": 50 21 + }, 22 + "cursor": { 23 + "type": "string", 24 + "description": "Pagination cursor" 25 + } 26 + } 27 + }, 28 + "output": { 29 + "encoding": "*/*" 30 + }, 31 + "errors": [ 32 + { 33 + "name": "RepoNotFound", 34 + "description": "Repository not found or access denied" 35 + }, 36 + { 37 + "name": "InvalidRequest", 38 + "description": "Invalid request parameters" 39 + } 40 + ] 41 + } 42 + } 43 + }
+142
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/repo/tree.json
··· 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 + }
+32
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/spindle/member.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.spindle.member", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "subject", 12 + "instance", 13 + "createdAt" 14 + ], 15 + "properties": { 16 + "subject": { 17 + "type": "string", 18 + "format": "did" 19 + }, 20 + "instance": { 21 + "type": "string", 22 + "description": "spindle instance that the subject is now a member of" 23 + }, 24 + "createdAt": { 25 + "type": "string", 26 + "format": "datetime" 27 + } 28 + } 29 + } 30 + } 31 + } 32 + }
+23
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/spindle/spindle.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.spindle", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "any", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "createdAt" 12 + ], 13 + "properties": { 14 + "createdAt": { 15 + "type": "string", 16 + "format": "datetime" 17 + } 18 + } 19 + } 20 + } 21 + } 22 + } 23 +
+38
packages/emitter/test/integration/lexicon-examples/output/sh/tangled/string/string.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "sh.tangled.string", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "required": [ 11 + "filename", 12 + "description", 13 + "createdAt", 14 + "contents" 15 + ], 16 + "properties": { 17 + "filename": { 18 + "type": "string", 19 + "maxGraphemes": 140, 20 + "minGraphemes": 1 21 + }, 22 + "description": { 23 + "type": "string", 24 + "maxGraphemes": 280 25 + }, 26 + "createdAt": { 27 + "type": "string", 28 + "format": "datetime" 29 + }, 30 + "contents": { 31 + "type": "string", 32 + "minGraphemes": 1 33 + } 34 + } 35 + } 36 + } 37 + } 38 + }