From 72c1b45b9fa0b1c205e2c3e44ed847bd0b673354 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Mon, 16 Feb 2026 15:35:55 +0000 Subject: [PATCH] lexicons: introduce git.temp xrpc methods These experimental xrpc methods use at-uri instead of did/name format to reference the repository. Intended to replace most of the `repo.*` xrpc methods in Knot. Knots won't need to support these methods until we finalize them. Signed-off-by: Seongmin Lee --- api/tangled/tempanalyzeMerge.go | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ api/tangled/tempdefs.go | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ api/tangled/tempgetArchive.go | 41 +++++++++++++++++++++++++++++++++++++++++ api/tangled/tempgetBlob.go | 37 +++++++++++++++++++++++++++++++++++++ api/tangled/tempgetBranch.go | 45 +++++++++++++++++++++++++++++++++++++++++++++ api/tangled/tempgetCommit.go | 32 ++++++++++++++++++++++++++++++++ api/tangled/tempgetDiff.go | 35 +++++++++++++++++++++++++++++++++++ api/tangled/tempgetEntity.go | 36 ++++++++++++++++++++++++++++++++++++ api/tangled/tempgetHead.go | 30 ++++++++++++++++++++++++++++++ api/tangled/tempgetTag.go | 33 +++++++++++++++++++++++++++++++++ api/tangled/tempgetTree.go | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ api/tangled/templistBranches.go | 39 +++++++++++++++++++++++++++++++++++++++ api/tangled/templistCommits.go | 43 +++++++++++++++++++++++++++++++++++++++++++ api/tangled/templistLanguages.go | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ api/tangled/templistTags.go | 39 +++++++++++++++++++++++++++++++++++++++ knotmirror/db/db.go | 4 ++-- lexicons/git/temp/analyzeMerge.json | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/defs.json | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/getArchive.json | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/getBlob.json | 47 +++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/getBranch.json | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/getCommit.json | 46 ++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/getDiff.json | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/getEntity.json | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/getHead.json | 37 +++++++++++++++++++++++++++++++++++++ lexicons/git/temp/getTag.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/getTree.json | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/listBranches.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/listCommits.json | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/listLanguages.json | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lexicons/git/temp/listTags.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ 31 file(s) changed, 1686 insertion(s)(+), 2 deletion(s)(-) diff --git a/api/tangled/tempanalyzeMerge.go b/api/tangled/tempanalyzeMerge.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempanalyzeMerge.go @@ -0,0 +1,50 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.analyzeMerge + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempAnalyzeMergeNSID = "sh.tangled.git.temp.analyzeMerge" +) + +// GitTempAnalyzeMerge_ConflictInfo is a "conflictInfo" in the sh.tangled.git.temp.analyzeMerge schema. +type GitTempAnalyzeMerge_ConflictInfo struct { + // filename: Name of the conflicted file + Filename string `json:"filename" cborgen:"filename"` + // reason: Reason for the conflict + Reason string `json:"reason" cborgen:"reason"` +} + +// GitTempAnalyzeMerge_Output is the output of a sh.tangled.git.temp.analyzeMerge call. +type GitTempAnalyzeMerge_Output struct { + // conflicts: List of files with merge conflicts + Conflicts []*GitTempAnalyzeMerge_ConflictInfo `json:"conflicts,omitempty" cborgen:"conflicts,omitempty"` + // is_conflicted: Whether the merge has conflicts + Is_conflicted bool `json:"is_conflicted" cborgen:"is_conflicted"` +} + +// GitTempAnalyzeMerge calls the XRPC method "sh.tangled.git.temp.analyzeMerge". +// +// branch: Target branch to merge into +// patch: Patch or pull request to check for merge conflicts +// repo: AT-URI of the repository +func GitTempAnalyzeMerge(ctx context.Context, c util.LexClient, branch string, patch string, repo string) (*GitTempAnalyzeMerge_Output, error) { + var out GitTempAnalyzeMerge_Output + + params := map[string]interface{}{} + params["branch"] = branch + params["patch"] = patch + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.analyzeMerge", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/tempdefs.go b/api/tangled/tempdefs.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempdefs.go @@ -0,0 +1,71 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.defs + +import ( + "github.com/bluesky-social/indigo/lex/util" +) + +const () + +// GitTempDefs_Blob is a "blob" in the sh.tangled.git.temp.defs schema. +// +// blob metadata. This object doesn't include the blob content +type GitTempDefs_Blob struct { + LastCommit *GitTempDefs_Commit `json:"lastCommit" cborgen:"lastCommit"` + Mode string `json:"mode" cborgen:"mode"` + // name: The file name + Name string `json:"name" cborgen:"name"` + // size: File size in bytes + Size int64 `json:"size" cborgen:"size"` + // submodule: Submodule information if path is a submodule + Submodule *GitTempDefs_Submodule `json:"submodule,omitempty" cborgen:"submodule,omitempty"` +} + +// GitTempDefs_Branch is a "branch" in the sh.tangled.git.temp.defs schema. +type GitTempDefs_Branch struct { + // commit: hydrated commit object + Commit *GitTempDefs_Commit `json:"commit" cborgen:"commit"` + // name: branch name + Name string `json:"name" cborgen:"name"` +} + +// GitTempDefs_Commit is a "commit" in the sh.tangled.git.temp.defs schema. +type GitTempDefs_Commit struct { + Author *GitTempDefs_Signature `json:"author" cborgen:"author"` + Committer *GitTempDefs_Signature `json:"committer" cborgen:"committer"` + Hash *string `json:"hash" cborgen:"hash"` + Message string `json:"message" cborgen:"message"` + Tree *string `json:"tree" cborgen:"tree"` +} + +// GitTempDefs_Signature is a "signature" in the sh.tangled.git.temp.defs schema. +type GitTempDefs_Signature struct { + // email: Person email + Email string `json:"email" cborgen:"email"` + // name: Person name + Name string `json:"name" cborgen:"name"` + // when: Timestamp of the signature + When string `json:"when" cborgen:"when"` +} + +// GitTempDefs_Submodule is a "submodule" in the sh.tangled.git.temp.defs schema. +type GitTempDefs_Submodule struct { + // branch: Branch to track in the submodule + Branch *string `json:"branch,omitempty" cborgen:"branch,omitempty"` + // name: Submodule name + Name string `json:"name" cborgen:"name"` + // url: Submodule repository URL + Url string `json:"url" cborgen:"url"` +} + +// GitTempDefs_Tag is a "tag" in the sh.tangled.git.temp.defs schema. +type GitTempDefs_Tag struct { + Message *string `json:"message,omitempty" cborgen:"message,omitempty"` + // name: tag name + Name string `json:"name" cborgen:"name"` + Tagger *GitTempDefs_Signature `json:"tagger" cborgen:"tagger"` + Target *util.LexiconTypeDecoder `json:"target" cborgen:"target"` +} diff --git a/api/tangled/tempgetArchive.go b/api/tangled/tempgetArchive.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempgetArchive.go @@ -0,0 +1,41 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.getArchive + +import ( + "bytes" + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempGetArchiveNSID = "sh.tangled.git.temp.getArchive" +) + +// GitTempGetArchive calls the XRPC method "sh.tangled.git.temp.getArchive". +// +// format: Archive format +// prefix: Prefix for files in the archive +// ref: Git reference (branch, tag, or commit SHA) +// repo: AT-URI of the repository +func GitTempGetArchive(ctx context.Context, c util.LexClient, format string, prefix string, ref string, repo string) ([]byte, error) { + buf := new(bytes.Buffer) + + params := map[string]interface{}{} + if format != "" { + params["format"] = format + } + if prefix != "" { + params["prefix"] = prefix + } + params["ref"] = ref + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getArchive", params, nil, buf); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} diff --git a/api/tangled/tempgetBlob.go b/api/tangled/tempgetBlob.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempgetBlob.go @@ -0,0 +1,37 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.getBlob + +import ( + "bytes" + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempGetBlobNSID = "sh.tangled.git.temp.getBlob" +) + +// GitTempGetBlob calls the XRPC method "sh.tangled.git.temp.getBlob". +// +// path: Path within the repository tree +// ref: Git reference (branch, tag, or commit SHA) +// repo: AT-URI of the repository +func GitTempGetBlob(ctx context.Context, c util.LexClient, path string, ref string, repo string) ([]byte, error) { + buf := new(bytes.Buffer) + + params := map[string]interface{}{} + params["path"] = path + if ref != "" { + params["ref"] = ref + } + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getBlob", params, nil, buf); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} diff --git a/api/tangled/tempgetBranch.go b/api/tangled/tempgetBranch.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempgetBranch.go @@ -0,0 +1,45 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.getBranch + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempGetBranchNSID = "sh.tangled.git.temp.getBranch" +) + +// GitTempGetBranch_Output is the output of a sh.tangled.git.temp.getBranch call. +type GitTempGetBranch_Output struct { + Author *GitTempDefs_Signature `json:"author,omitempty" cborgen:"author,omitempty"` + // hash: Latest commit hash on this branch + Hash string `json:"hash" cborgen:"hash"` + // message: Latest commit message + Message *string `json:"message,omitempty" cborgen:"message,omitempty"` + // name: Branch name + Name string `json:"name" cborgen:"name"` + // when: Timestamp of latest commit + When string `json:"when" cborgen:"when"` +} + +// GitTempGetBranch calls the XRPC method "sh.tangled.git.temp.getBranch". +// +// name: Branch name to get information for +// repo: AT-URI of the repository +func GitTempGetBranch(ctx context.Context, c util.LexClient, name string, repo string) (*GitTempGetBranch_Output, error) { + var out GitTempGetBranch_Output + + params := map[string]interface{}{} + params["name"] = name + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getBranch", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/tempgetCommit.go b/api/tangled/tempgetCommit.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempgetCommit.go @@ -0,0 +1,32 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.getCommit + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempGetCommitNSID = "sh.tangled.git.temp.getCommit" +) + +// GitTempGetCommit calls the XRPC method "sh.tangled.git.temp.getCommit". +// +// ref: reference name to resolve +// repo: AT-URI of the repository +func GitTempGetCommit(ctx context.Context, c util.LexClient, ref string, repo string) (*GitTempDefs_Commit, error) { + var out GitTempDefs_Commit + + params := map[string]interface{}{} + params["ref"] = ref + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getCommit", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/tempgetDiff.go b/api/tangled/tempgetDiff.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempgetDiff.go @@ -0,0 +1,35 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.getDiff + +import ( + "bytes" + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempGetDiffNSID = "sh.tangled.git.temp.getDiff" +) + +// GitTempGetDiff calls the XRPC method "sh.tangled.git.temp.getDiff". +// +// repo: AT-URI of the repository +// rev1: First revision (commit, branch, or tag) +// rev2: Second revision (commit, branch, or tag) +func GitTempGetDiff(ctx context.Context, c util.LexClient, repo string, rev1 string, rev2 string) ([]byte, error) { + buf := new(bytes.Buffer) + + params := map[string]interface{}{} + params["repo"] = repo + params["rev1"] = rev1 + params["rev2"] = rev2 + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getDiff", params, nil, buf); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} diff --git a/api/tangled/tempgetEntity.go b/api/tangled/tempgetEntity.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempgetEntity.go @@ -0,0 +1,36 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.getEntity + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempGetEntityNSID = "sh.tangled.git.temp.getEntity" +) + +// GitTempGetEntity calls the XRPC method "sh.tangled.git.temp.getEntity". +// +// path: path of the entity +// ref: Git reference (branch, tag, or commit SHA) +// repo: AT-URI of the repository +func GitTempGetEntity(ctx context.Context, c util.LexClient, path string, ref string, repo string) (*GitTempDefs_Blob, error) { + var out GitTempDefs_Blob + + params := map[string]interface{}{} + params["path"] = path + if ref != "" { + params["ref"] = ref + } + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getEntity", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/tempgetHead.go b/api/tangled/tempgetHead.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempgetHead.go @@ -0,0 +1,30 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.getHead + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempGetHeadNSID = "sh.tangled.git.temp.getHead" +) + +// GitTempGetHead calls the XRPC method "sh.tangled.git.temp.getHead". +// +// repo: AT-URI of the repository +func GitTempGetHead(ctx context.Context, c util.LexClient, repo string) (*GitTempDefs_Branch, error) { + var out GitTempDefs_Branch + + params := map[string]interface{}{} + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getHead", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/tempgetTag.go b/api/tangled/tempgetTag.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempgetTag.go @@ -0,0 +1,33 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.getTag + +import ( + "bytes" + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempGetTagNSID = "sh.tangled.git.temp.getTag" +) + +// GitTempGetTag calls the XRPC method "sh.tangled.git.temp.getTag". +// +// repo: AT-URI of the repository +// tag: Name of tag, such as v1.3.0 +func GitTempGetTag(ctx context.Context, c util.LexClient, repo string, tag string) ([]byte, error) { + buf := new(bytes.Buffer) + + params := map[string]interface{}{} + params["repo"] = repo + params["tag"] = tag + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getTag", params, nil, buf); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} diff --git a/api/tangled/tempgetTree.go b/api/tangled/tempgetTree.go new file mode 100644 --- /dev/null +++ b/api/tangled/tempgetTree.go @@ -0,0 +1,90 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.getTree + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempGetTreeNSID = "sh.tangled.git.temp.getTree" +) + +// GitTempGetTree_LastCommit is a "lastCommit" in the sh.tangled.git.temp.getTree schema. +type GitTempGetTree_LastCommit struct { + Author *GitTempGetTree_Signature `json:"author,omitempty" cborgen:"author,omitempty"` + // hash: Commit hash + Hash string `json:"hash" cborgen:"hash"` + // message: Commit message + Message string `json:"message" cborgen:"message"` + // when: Commit timestamp + When string `json:"when" cborgen:"when"` +} + +// GitTempGetTree_Output is the output of a sh.tangled.git.temp.getTree call. +type GitTempGetTree_Output struct { + // dotdot: Parent directory path + Dotdot *string `json:"dotdot,omitempty" cborgen:"dotdot,omitempty"` + Files []*GitTempGetTree_TreeEntry `json:"files" cborgen:"files"` + LastCommit *GitTempGetTree_LastCommit `json:"lastCommit,omitempty" cborgen:"lastCommit,omitempty"` + // parent: The parent path in the tree + Parent *string `json:"parent,omitempty" cborgen:"parent,omitempty"` + // readme: Readme for this file tree + Readme *GitTempGetTree_Readme `json:"readme,omitempty" cborgen:"readme,omitempty"` + // ref: The git reference used + Ref string `json:"ref" cborgen:"ref"` +} + +// GitTempGetTree_Readme is a "readme" in the sh.tangled.git.temp.getTree schema. +type GitTempGetTree_Readme struct { + // contents: Contents of the readme file + Contents string `json:"contents" cborgen:"contents"` + // filename: Name of the readme file + Filename string `json:"filename" cborgen:"filename"` +} + +// GitTempGetTree_Signature is a "signature" in the sh.tangled.git.temp.getTree schema. +type GitTempGetTree_Signature struct { + // email: Author email + Email string `json:"email" cborgen:"email"` + // name: Author name + Name string `json:"name" cborgen:"name"` + // when: Author timestamp + When string `json:"when" cborgen:"when"` +} + +// GitTempGetTree_TreeEntry is a "treeEntry" in the sh.tangled.git.temp.getTree schema. +type GitTempGetTree_TreeEntry struct { + Last_commit *GitTempGetTree_LastCommit `json:"last_commit,omitempty" cborgen:"last_commit,omitempty"` + // mode: File mode + Mode string `json:"mode" cborgen:"mode"` + // name: Relative file or directory name + Name string `json:"name" cborgen:"name"` + // size: File size in bytes + Size int64 `json:"size" cborgen:"size"` +} + +// GitTempGetTree calls the XRPC method "sh.tangled.git.temp.getTree". +// +// path: Path within the repository tree +// ref: Git reference (branch, tag, or commit SHA) +// repo: AT-URI of the repository +func GitTempGetTree(ctx context.Context, c util.LexClient, path string, ref string, repo string) (*GitTempGetTree_Output, error) { + var out GitTempGetTree_Output + + params := map[string]interface{}{} + if path != "" { + params["path"] = path + } + params["ref"] = ref + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getTree", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/templistBranches.go b/api/tangled/templistBranches.go new file mode 100644 --- /dev/null +++ b/api/tangled/templistBranches.go @@ -0,0 +1,39 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.listBranches + +import ( + "bytes" + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempListBranchesNSID = "sh.tangled.git.temp.listBranches" +) + +// GitTempListBranches calls the XRPC method "sh.tangled.git.temp.listBranches". +// +// cursor: Pagination cursor +// limit: Maximum number of branches to return +// repo: AT-URI of the repository +func GitTempListBranches(ctx context.Context, c util.LexClient, cursor string, limit int64, repo string) ([]byte, error) { + buf := new(bytes.Buffer) + + params := map[string]interface{}{} + if cursor != "" { + params["cursor"] = cursor + } + if limit != 0 { + params["limit"] = limit + } + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.listBranches", params, nil, buf); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} diff --git a/api/tangled/templistCommits.go b/api/tangled/templistCommits.go new file mode 100644 --- /dev/null +++ b/api/tangled/templistCommits.go @@ -0,0 +1,43 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.listCommits + +import ( + "bytes" + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempListCommitsNSID = "sh.tangled.git.temp.listCommits" +) + +// GitTempListCommits calls the XRPC method "sh.tangled.git.temp.listCommits". +// +// cursor: Pagination cursor (commit SHA) +// limit: Maximum number of commits to return +// ref: Git reference (branch, tag, or commit SHA) +// repo: AT-URI of the repository +func GitTempListCommits(ctx context.Context, c util.LexClient, cursor string, limit int64, ref string, repo string) ([]byte, error) { + buf := new(bytes.Buffer) + + params := map[string]interface{}{} + if cursor != "" { + params["cursor"] = cursor + } + if limit != 0 { + params["limit"] = limit + } + if ref != "" { + params["ref"] = ref + } + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.listCommits", params, nil, buf); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} diff --git a/api/tangled/templistLanguages.go b/api/tangled/templistLanguages.go new file mode 100644 --- /dev/null +++ b/api/tangled/templistLanguages.go @@ -0,0 +1,61 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.listLanguages + +import ( + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempListLanguagesNSID = "sh.tangled.git.temp.listLanguages" +) + +// GitTempListLanguages_Language is a "language" in the sh.tangled.git.temp.listLanguages schema. +type GitTempListLanguages_Language struct { + // color: Hex color code for this language + Color *string `json:"color,omitempty" cborgen:"color,omitempty"` + // extensions: File extensions associated with this language + Extensions []string `json:"extensions,omitempty" cborgen:"extensions,omitempty"` + // fileCount: Number of files in this language + FileCount *int64 `json:"fileCount,omitempty" cborgen:"fileCount,omitempty"` + // name: Programming language name + Name string `json:"name" cborgen:"name"` + // percentage: Percentage of total codebase (0-100) + Percentage int64 `json:"percentage" cborgen:"percentage"` + // size: Total size of files in this language (bytes) + Size int64 `json:"size" cborgen:"size"` +} + +// GitTempListLanguages_Output is the output of a sh.tangled.git.temp.listLanguages call. +type GitTempListLanguages_Output struct { + Languages []*GitTempListLanguages_Language `json:"languages" cborgen:"languages"` + // ref: The git reference used + Ref string `json:"ref" cborgen:"ref"` + // totalFiles: Total number of files analyzed + TotalFiles *int64 `json:"totalFiles,omitempty" cborgen:"totalFiles,omitempty"` + // totalSize: Total size of all analyzed files in bytes + TotalSize *int64 `json:"totalSize,omitempty" cborgen:"totalSize,omitempty"` +} + +// GitTempListLanguages calls the XRPC method "sh.tangled.git.temp.listLanguages". +// +// ref: Git reference (branch, tag, or commit SHA) +// repo: AT-URI of the repository +func GitTempListLanguages(ctx context.Context, c util.LexClient, ref string, repo string) (*GitTempListLanguages_Output, error) { + var out GitTempListLanguages_Output + + params := map[string]interface{}{} + if ref != "" { + params["ref"] = ref + } + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.listLanguages", params, nil, &out); err != nil { + return nil, err + } + + return &out, nil +} diff --git a/api/tangled/templistTags.go b/api/tangled/templistTags.go new file mode 100644 --- /dev/null +++ b/api/tangled/templistTags.go @@ -0,0 +1,39 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.listTags + +import ( + "bytes" + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempListTagsNSID = "sh.tangled.git.temp.listTags" +) + +// GitTempListTags calls the XRPC method "sh.tangled.git.temp.listTags". +// +// cursor: Pagination cursor +// limit: Maximum number of tags to return +// repo: AT-URI of the repository +func GitTempListTags(ctx context.Context, c util.LexClient, cursor string, limit int64, repo string) ([]byte, error) { + buf := new(bytes.Buffer) + + params := map[string]interface{}{} + if cursor != "" { + params["cursor"] = cursor + } + if limit != 0 { + params["limit"] = limit + } + params["repo"] = repo + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.listTags", params, nil, buf); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} diff --git a/knotmirror/db/db.go b/knotmirror/db/db.go --- a/knotmirror/db/db.go +++ b/knotmirror/db/db.go @@ -37,13 +37,13 @@ did text not null, rkey text not null, at_uri text generated always as ('at://' || did || '/' || 'sh.tangled.repo' || '/' || rkey) stored, - cid text not null, + cid text, -- record content name text not null, knot_domain text not null, - -- sync data + -- sync info git_rev text not null, repo_sha text not null, state text not null default 'pending', diff --git a/lexicons/git/temp/analyzeMerge.json b/lexicons/git/temp/analyzeMerge.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/analyzeMerge.json @@ -0,0 +1,64 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.analyzeMerge", + "defs": { + "main": { + "type": "query", + "description": "Check if a merge is possible between two branches", + "parameters": { + "type": "params", + "required": ["repo", "patch", "branch"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "patch": { + "type": "string", + "description": "Patch or pull request to check for merge conflicts" + }, + "branch": { + "type": "string", + "description": "Target branch to merge into" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["is_conflicted"], + "properties": { + "is_conflicted": { + "type": "boolean", + "description": "Whether the merge has conflicts" + }, + "conflicts": { + "type": "array", + "description": "List of files with merge conflicts", + "items": { + "type": "ref", + "ref": "#conflictInfo" + } + } + } + } + } + }, + "conflictInfo": { + "type": "object", + "required": ["filename", "reason"], + "properties": { + "filename": { + "type": "string", + "description": "Name of the conflicted file" + }, + "reason": { + "type": "string", + "description": "Reason for the conflict" + } + } + } + } +} diff --git a/lexicons/git/temp/defs.json b/lexicons/git/temp/defs.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/defs.json @@ -0,0 +1,112 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.defs", + "defs": { + "blob": { + "type": "object", + "description": "blob metadata. This object doesn't include the blob content", + "required": ["name", "mode", "size", "lastCommit"], + "properties": { + "name": { + "type": "string", + "description": "The file name" + }, + "mode": { + "type": "string" + }, + "size": { + "type": "integer", + "description": "File size in bytes" + }, + "lastCommit": { + "type": "ref", + "ref": "#commit" + }, + "submodule": { + "type": "ref", + "ref": "#submodule", + "description": "Submodule information if path is a submodule" + } + } + }, + "branch": { + "type": "object", + "required": ["name", "commit"], + "properties": { + "name": { + "type": "string", + "description": "branch name" + }, + "commit": { + "type": "ref", + "ref": "#commit", + "description": "hydrated commit object" + } + } + }, + "tag": { + "type": "object", + "required": ["name", "tagger", "target"], + "properties": { + "name": { + "type": "string", + "description": "tag name" + }, + "tagger": { "type": "ref", "ref": "#signature" }, + "message": { "type": "string" }, + "target": { "type": "unknown" } + } + }, + "commit": { + "type": "object", + "required": ["hash", "author", "committer", "message", "tree"], + "properties": { + "hash": { "type": "ref", "ref": "#hash" }, + "author": { "type": "ref", "ref": "#signature" }, + "committer": { "type": "ref", "ref": "#signature" }, + "message": { "type": "string" }, + "tree": { "type": "ref", "ref": "#hash" } + } + }, + "hash": { + "type": "string" + }, + "signature": { + "type": "object", + "required": ["name", "email", "when"], + "properties": { + "name": { + "type": "string", + "description": "Person name" + }, + "email": { + "type": "string", + "description": "Person email" + }, + "when": { + "type": "string", + "format": "datetime", + "description": "Timestamp of the signature" + } + } + }, + "submodule": { + "type": "object", + "required": ["name", "url"], + "properties": { + "name": { + "type": "string", + "description": "Submodule name" + }, + "url": { + "type": "string", + "description": "Submodule repository URL" + }, + "branch": { + "type": "string", + "description": "Branch to track in the submodule" + } + } + } + } +} diff --git a/lexicons/git/temp/getArchive.json b/lexicons/git/temp/getArchive.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/getArchive.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.getArchive", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo", "ref"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "ref": { + "type": "string", + "description": "Git reference (branch, tag, or commit SHA)" + }, + "format": { + "type": "string", + "description": "Archive format", + "enum": ["tar", "zip", "tar.gz", "tar.bz2", "tar.xz"], + "default": "tar.gz" + }, + "prefix": { + "type": "string", + "description": "Prefix for files in the archive" + } + } + }, + "output": { + "encoding": "*/*", + "description": "Binary archive data" + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "RefNotFound", + "description": "Git reference not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + }, + { + "name": "ArchiveError", + "description": "Failed to create archive" + } + ] + } + } +} diff --git a/lexicons/git/temp/getBlob.json b/lexicons/git/temp/getBlob.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/getBlob.json @@ -0,0 +1,47 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.getBlob", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo", "path"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "ref": { + "type": "string", + "description": "Git reference (branch, tag, or commit SHA)", + "default": "HEAD" + }, + "path": { + "type": "string", + "description": "Path within the repository tree" + } + } + }, + "output": { + "encoding": "*/*", + "description": "raw blob served in octet-stream" + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "BlobNotFound", + "description": "Blob not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} diff --git a/lexicons/git/temp/getBranch.json b/lexicons/git/temp/getBranch.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/getBranch.json @@ -0,0 +1,68 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.getBranch", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo", "name"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "name": { + "type": "string", + "description": "Branch name to get information for" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["name", "hash", "when"], + "properties": { + "name": { + "type": "string", + "description": "Branch name" + }, + "hash": { + "type": "string", + "description": "Latest commit hash on this branch" + }, + "when": { + "type": "string", + "format": "datetime", + "description": "Timestamp of latest commit" + }, + "message": { + "type": "string", + "description": "Latest commit message" + }, + "author": { + "type": "ref", + "ref": "sh.tangled.git.temp.defs#signature" + } + } + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "BranchNotFound", + "description": "Branch not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} diff --git a/lexicons/git/temp/getCommit.json b/lexicons/git/temp/getCommit.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/getCommit.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.getCommit", + "defs": { + "main": { + "type": "query", + "description": "resolve commit from given ref", + "parameters": { + "type": "params", + "required": ["repo", "ref"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "ref": { + "type": "string", + "description": "reference name to resolve" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "sh.tangled.git.temp.defs#commit" + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "CommitNotFound", + "description": "Commit not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} diff --git a/lexicons/git/temp/getDiff.json b/lexicons/git/temp/getDiff.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/getDiff.json @@ -0,0 +1,50 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.getDiff", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo", "rev1", "rev2"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "rev1": { + "type": "string", + "description": "First revision (commit, branch, or tag)" + }, + "rev2": { + "type": "string", + "description": "Second revision (commit, branch, or tag)" + } + } + }, + "output": { + "encoding": "*/*", + "description": "Compare output in application/json" + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "RevisionNotFound", + "description": "One or both revisions not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + }, + { + "name": "CompareError", + "description": "Failed to compare revisions" + } + ] + } + } +} diff --git a/lexicons/git/temp/getEntity.json b/lexicons/git/temp/getEntity.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/getEntity.json @@ -0,0 +1,51 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.getEntity", + "defs": { + "main": { + "type": "query", + "description": "get metadata of blob by ref and path", + "parameters": { + "type": "params", + "required": ["repo", "path"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "ref": { + "type": "string", + "description": "Git reference (branch, tag, or commit SHA)", + "default": "HEAD" + }, + "path": { + "type": "string", + "description": "path of the entity" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "sh.tangled.git.temp.defs#blob" + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "BlobNotFound", + "description": "Blob not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} diff --git a/lexicons/git/temp/getHead.json b/lexicons/git/temp/getHead.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/getHead.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.getHead", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "sh.tangled.git.temp.defs#branch" + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} diff --git a/lexicons/git/temp/getTag.json b/lexicons/git/temp/getTag.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/getTag.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.getTag", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [ + "repo", + "tag" + ], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "tag": { + "type": "string", + "description": "Name of tag, such as v1.3.0" + } + } + }, + "output": { + "encoding": "*/*" + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "TagNotFound", + "description": "Tag not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} diff --git a/lexicons/git/temp/getTree.json b/lexicons/git/temp/getTree.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/getTree.json @@ -0,0 +1,183 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.getTree", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [ + "repo", + "ref" + ], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "ref": { + "type": "string", + "description": "Git reference (branch, tag, or commit SHA)" + }, + "path": { + "type": "string", + "description": "Path within the repository tree", + "default": "" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "ref", + "files" + ], + "properties": { + "ref": { + "type": "string", + "description": "The git reference used" + }, + "parent": { + "type": "string", + "description": "The parent path in the tree" + }, + "dotdot": { + "type": "string", + "description": "Parent directory path" + }, + "readme": { + "type": "ref", + "ref": "#readme", + "description": "Readme for this file tree" + }, + "lastCommit": { + "type": "ref", + "ref": "#lastCommit" + }, + "files": { + "type": "array", + "items": { + "type": "ref", + "ref": "#treeEntry" + } + } + } + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "RefNotFound", + "description": "Git reference not found" + }, + { + "name": "PathNotFound", + "description": "Path not found in repository tree" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + }, + "readme": { + "type": "object", + "required": [ + "filename", + "contents" + ], + "properties": { + "filename": { + "type": "string", + "description": "Name of the readme file" + }, + "contents": { + "type": "string", + "description": "Contents of the readme file" + } + } + }, + "treeEntry": { + "type": "object", + "required": [ + "name", + "mode", + "size" + ], + "properties": { + "name": { + "type": "string", + "description": "Relative file or directory name" + }, + "mode": { + "type": "string", + "description": "File mode" + }, + "size": { + "type": "integer", + "description": "File size in bytes" + }, + "last_commit": { + "type": "ref", + "ref": "#lastCommit" + } + } + }, + "lastCommit": { + "type": "object", + "required": [ + "hash", + "message", + "when" + ], + "properties": { + "hash": { + "type": "string", + "description": "Commit hash" + }, + "message": { + "type": "string", + "description": "Commit message" + }, + "author": { + "type": "ref", + "ref": "#signature" + }, + "when": { + "type": "string", + "format": "datetime", + "description": "Commit timestamp" + } + } + }, + "signature": { + "type": "object", + "required": [ + "name", + "email", + "when" + ], + "properties": { + "name": { + "type": "string", + "description": "Author name" + }, + "email": { + "type": "string", + "description": "Author email" + }, + "when": { + "type": "string", + "format": "datetime", + "description": "Author timestamp" + } + } + } + } +} diff --git a/lexicons/git/temp/listBranches.json b/lexicons/git/temp/listBranches.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/listBranches.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.listBranches", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "limit": { + "type": "integer", + "description": "Maximum number of branches to return", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string", + "description": "Pagination cursor" + } + } + }, + "output": { + "encoding": "*/*" + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} diff --git a/lexicons/git/temp/listCommits.json b/lexicons/git/temp/listCommits.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/listCommits.json @@ -0,0 +1,56 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.listCommits", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "ref": { + "type": "string", + "description": "Git reference (branch, tag, or commit SHA)" + }, + "limit": { + "type": "integer", + "description": "Maximum number of commits to return", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string", + "description": "Pagination cursor (commit SHA)" + } + } + }, + "output": { + "encoding": "*/*" + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "RefNotFound", + "description": "Git reference not found" + }, + { + "name": "PathNotFound", + "description": "Path not found in repository" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} diff --git a/lexicons/git/temp/listLanguages.json b/lexicons/git/temp/listLanguages.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/listLanguages.json @@ -0,0 +1,100 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.listLanguages", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "ref": { + "type": "string", + "description": "Git reference (branch, tag, or commit SHA)", + "default": "HEAD" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["ref", "languages"], + "properties": { + "ref": { + "type": "string", + "description": "The git reference used" + }, + "languages": { + "type": "array", + "items": { + "type": "ref", + "ref": "#language" + } + }, + "totalSize": { + "type": "integer", + "description": "Total size of all analyzed files in bytes" + }, + "totalFiles": { + "type": "integer", + "description": "Total number of files analyzed" + } + } + } + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "RefNotFound", + "description": "Git reference not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + }, + "language": { + "type": "object", + "required": ["name", "size", "percentage"], + "properties": { + "name": { + "type": "string", + "description": "Programming language name" + }, + "size": { + "type": "integer", + "description": "Total size of files in this language (bytes)" + }, + "percentage": { + "type": "integer", + "description": "Percentage of total codebase (0-100)" + }, + "fileCount": { + "type": "integer", + "description": "Number of files in this language" + }, + "color": { + "type": "string", + "description": "Hex color code for this language" + }, + "extensions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "File extensions associated with this language" + } + } + } + } +} diff --git a/lexicons/git/temp/listTags.json b/lexicons/git/temp/listTags.json new file mode 100644 --- /dev/null +++ b/lexicons/git/temp/listTags.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.listTags", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo"], + "properties": { + "repo": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the repository" + }, + "limit": { + "type": "integer", + "description": "Maximum number of tags to return", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string", + "description": "Pagination cursor" + } + } + }, + "output": { + "encoding": "*/*" + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +} -- tangled.sh