@gitkraken/core-gitlens 0.4.0 → 0.4.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -1
- package/README.md +9 -2
- package/dist/git/cache.d.ts +29 -2
- package/dist/git/cache.d.ts.map +1 -1
- package/dist/git/cache.js +67 -7
- package/dist/git/cache.js.map +1 -1
- package/dist/git/context.d.ts.map +1 -1
- package/dist/git/errors.d.ts +31 -1
- package/dist/git/errors.d.ts.map +1 -1
- package/dist/git/errors.js +29 -0
- package/dist/git/errors.js.map +1 -1
- package/dist/git/models/author.d.ts.map +1 -1
- package/dist/git/models/author.js.map +1 -1
- package/dist/git/models/autolink.d.ts.map +1 -1
- package/dist/git/models/autolink.js.map +1 -1
- package/dist/git/models/blame.d.ts.map +1 -1
- package/dist/git/models/blame.js.map +1 -1
- package/dist/git/models/branch.d.ts.map +1 -1
- package/dist/git/models/branch.js.map +1 -1
- package/dist/git/models/commit.d.ts.map +1 -1
- package/dist/git/models/commit.js +1 -1
- package/dist/git/models/commit.js.map +1 -1
- package/dist/git/models/contributor.d.ts.map +1 -1
- package/dist/git/models/contributor.js.map +1 -1
- package/dist/git/models/defaultBranch.d.ts.map +1 -1
- package/dist/git/models/defaultBranch.js.map +1 -1
- package/dist/git/models/diff.d.ts.map +1 -1
- package/dist/git/models/diff.js.map +1 -1
- package/dist/git/models/file.d.ts.map +1 -1
- package/dist/git/models/file.js.map +1 -1
- package/dist/git/models/fileChange.d.ts.map +1 -1
- package/dist/git/models/fileChange.js.map +1 -1
- package/dist/git/models/fileStatus.d.ts +22 -22
- package/dist/git/models/fileStatus.d.ts.map +1 -1
- package/dist/git/models/fileStatus.js.map +1 -1
- package/dist/git/models/graph.d.ts +122 -1
- package/dist/git/models/graph.d.ts.map +1 -1
- package/dist/git/models/graph.js +4 -0
- package/dist/git/models/graph.js.map +1 -1
- package/dist/git/models/graphSearch.d.ts.map +1 -1
- package/dist/git/models/graphSearch.js.map +1 -1
- package/dist/git/models/graphSession.d.ts +177 -0
- package/dist/git/models/graphSession.d.ts.map +1 -0
- package/dist/git/models/graphSession.js +7 -0
- package/dist/git/models/graphSession.js.map +1 -0
- package/dist/git/models/issue.d.ts +12 -2
- package/dist/git/models/issue.d.ts.map +1 -1
- package/dist/git/models/issue.js +3 -1
- package/dist/git/models/issue.js.map +1 -1
- package/dist/git/models/issueOrPullRequest.d.ts.map +1 -1
- package/dist/git/models/issueOrPullRequest.js.map +1 -1
- package/dist/git/models/lineRange.d.ts.map +1 -1
- package/dist/git/models/lineRange.js.map +1 -1
- package/dist/git/models/log.d.ts.map +1 -1
- package/dist/git/models/log.js.map +1 -1
- package/dist/git/models/mergeConflicts.d.ts.map +1 -1
- package/dist/git/models/mergeConflicts.js.map +1 -1
- package/dist/git/models/patch.d.ts.map +1 -1
- package/dist/git/models/patch.js.map +1 -1
- package/dist/git/models/pausedOperationStatus.d.ts.map +1 -1
- package/dist/git/models/pausedOperationStatus.js.map +1 -1
- package/dist/git/models/pullRequest.d.ts +27 -2
- package/dist/git/models/pullRequest.d.ts.map +1 -1
- package/dist/git/models/pullRequest.js +7 -1
- package/dist/git/models/pullRequest.js.map +1 -1
- package/dist/git/models/rebase.d.ts.map +1 -1
- package/dist/git/models/rebase.js.map +1 -1
- package/dist/git/models/reference.d.ts.map +1 -1
- package/dist/git/models/reference.js.map +1 -1
- package/dist/git/models/reflog.d.ts.map +1 -1
- package/dist/git/models/reflog.js.map +1 -1
- package/dist/git/models/remote.d.ts.map +1 -1
- package/dist/git/models/remote.js.map +1 -1
- package/dist/git/models/remoteProvider.d.ts.map +1 -1
- package/dist/git/models/remoteProvider.js.map +1 -1
- package/dist/git/models/remoteResource.d.ts.map +1 -1
- package/dist/git/models/remoteResource.js.map +1 -1
- package/dist/git/models/repository.d.ts +20 -2
- package/dist/git/models/repository.d.ts.map +1 -1
- package/dist/git/models/repository.js +19 -0
- package/dist/git/models/repository.js.map +1 -1
- package/dist/git/models/repositoryChangeEvent.d.ts.map +1 -1
- package/dist/git/models/repositoryChangeEvent.js.map +1 -1
- package/dist/git/models/repositoryIdentities.d.ts.map +1 -1
- package/dist/git/models/repositoryIdentities.js.map +1 -1
- package/dist/git/models/repositoryMetadata.d.ts.map +1 -1
- package/dist/git/models/repositoryMetadata.js.map +1 -1
- package/dist/git/models/resourceDescriptor.d.ts +16 -0
- package/dist/git/models/resourceDescriptor.d.ts.map +1 -1
- package/dist/git/models/resourceDescriptor.js.map +1 -1
- package/dist/git/models/revision.d.ts.map +1 -1
- package/dist/git/models/revision.js.map +1 -1
- package/dist/git/models/search.d.ts.map +1 -1
- package/dist/git/models/search.js.map +1 -1
- package/dist/git/models/shortlog.d.ts.map +1 -1
- package/dist/git/models/shortlog.js.map +1 -1
- package/dist/git/models/signature.d.ts +14 -0
- package/dist/git/models/signature.d.ts.map +1 -1
- package/dist/git/models/signature.js.map +1 -1
- package/dist/git/models/staging.d.ts.map +1 -1
- package/dist/git/models/staging.js.map +1 -1
- package/dist/git/models/stash.d.ts.map +1 -1
- package/dist/git/models/stash.js.map +1 -1
- package/dist/git/models/status.d.ts.map +1 -1
- package/dist/git/models/status.js.map +1 -1
- package/dist/git/models/statusFile.d.ts.map +1 -1
- package/dist/git/models/statusFile.js.map +1 -1
- package/dist/git/models/tag.d.ts +11 -1
- package/dist/git/models/tag.d.ts.map +1 -1
- package/dist/git/models/tag.js +9 -2
- package/dist/git/models/tag.js.map +1 -1
- package/dist/git/models/tree.d.ts.map +1 -1
- package/dist/git/models/tree.js.map +1 -1
- package/dist/git/models/user.d.ts.map +1 -1
- package/dist/git/models/user.js.map +1 -1
- package/dist/git/models/worktree.d.ts.map +1 -1
- package/dist/git/models/worktree.js.map +1 -1
- package/dist/git/parsers/diffParser.d.ts.map +1 -1
- package/dist/git/parsers/diffParser.js +1 -1
- package/dist/git/parsers/diffParser.js.map +1 -1
- package/dist/git/parsers/rebaseTodoParser.d.ts.map +1 -1
- package/dist/git/parsers/rebaseTodoParser.js.map +1 -1
- package/dist/git/providers/blame.d.ts.map +1 -1
- package/dist/git/providers/blame.js.map +1 -1
- package/dist/git/providers/branches.d.ts +8 -1
- package/dist/git/providers/branches.d.ts.map +1 -1
- package/dist/git/providers/branches.js.map +1 -1
- package/dist/git/providers/commits.d.ts +6 -1
- package/dist/git/providers/commits.d.ts.map +1 -1
- package/dist/git/providers/commits.js.map +1 -1
- package/dist/git/providers/config.d.ts +6 -2
- package/dist/git/providers/config.d.ts.map +1 -1
- package/dist/git/providers/config.js.map +1 -1
- package/dist/git/providers/contributors.d.ts.map +1 -1
- package/dist/git/providers/contributors.js.map +1 -1
- package/dist/git/providers/diff.d.ts.map +1 -1
- package/dist/git/providers/diff.js.map +1 -1
- package/dist/git/providers/graph.d.ts +55 -1
- package/dist/git/providers/graph.d.ts.map +1 -1
- package/dist/git/providers/graph.js.map +1 -1
- package/dist/git/providers/operations.d.ts.map +1 -1
- package/dist/git/providers/operations.js.map +1 -1
- package/dist/git/providers/patch.d.ts.map +1 -1
- package/dist/git/providers/patch.js.map +1 -1
- package/dist/git/providers/pausedOperations.d.ts.map +1 -1
- package/dist/git/providers/pausedOperations.js.map +1 -1
- package/dist/git/providers/provider.d.ts.map +1 -1
- package/dist/git/providers/provider.js.map +1 -1
- package/dist/git/providers/refs.d.ts.map +1 -1
- package/dist/git/providers/refs.js.map +1 -1
- package/dist/git/providers/remotes.d.ts.map +1 -1
- package/dist/git/providers/remotes.js.map +1 -1
- package/dist/git/providers/revision.d.ts.map +1 -1
- package/dist/git/providers/revision.js.map +1 -1
- package/dist/git/providers/shared/remotes.d.ts.map +1 -1
- package/dist/git/providers/shared/remotes.js.map +1 -1
- package/dist/git/providers/staging.d.ts.map +1 -1
- package/dist/git/providers/staging.js.map +1 -1
- package/dist/git/providers/stash.d.ts.map +1 -1
- package/dist/git/providers/stash.js.map +1 -1
- package/dist/git/providers/status.d.ts +1 -0
- package/dist/git/providers/status.d.ts.map +1 -1
- package/dist/git/providers/status.js.map +1 -1
- package/dist/git/providers/tags.d.ts.map +1 -1
- package/dist/git/providers/tags.js.map +1 -1
- package/dist/git/providers/types.d.ts.map +1 -1
- package/dist/git/providers/types.js.map +1 -1
- package/dist/git/providers/worktrees.d.ts +3 -1
- package/dist/git/providers/worktrees.d.ts.map +1 -1
- package/dist/git/providers/worktrees.js.map +1 -1
- package/dist/git/remotes/azure-devops.d.ts.map +1 -1
- package/dist/git/remotes/azure-devops.js +27 -31
- package/dist/git/remotes/azure-devops.js.map +1 -1
- package/dist/git/remotes/bitbucket-server.d.ts.map +1 -1
- package/dist/git/remotes/bitbucket-server.js +21 -23
- package/dist/git/remotes/bitbucket-server.js.map +1 -1
- package/dist/git/remotes/bitbucket.d.ts.map +1 -1
- package/dist/git/remotes/bitbucket.js +21 -23
- package/dist/git/remotes/bitbucket.js.map +1 -1
- package/dist/git/remotes/custom.d.ts.map +1 -1
- package/dist/git/remotes/custom.js.map +1 -1
- package/dist/git/remotes/gerrit.d.ts.map +1 -1
- package/dist/git/remotes/gerrit.js +11 -13
- package/dist/git/remotes/gerrit.js.map +1 -1
- package/dist/git/remotes/gitea.d.ts.map +1 -1
- package/dist/git/remotes/gitea.js +12 -14
- package/dist/git/remotes/gitea.js.map +1 -1
- package/dist/git/remotes/github.d.ts.map +1 -1
- package/dist/git/remotes/github.js +54 -56
- package/dist/git/remotes/github.js.map +1 -1
- package/dist/git/remotes/gitlab.d.ts.map +1 -1
- package/dist/git/remotes/gitlab.js +93 -95
- package/dist/git/remotes/gitlab.js.map +1 -1
- package/dist/git/remotes/google-source.d.ts.map +1 -1
- package/dist/git/remotes/google-source.js.map +1 -1
- package/dist/git/remotes/matcher.d.ts.map +1 -1
- package/dist/git/remotes/matcher.js.map +1 -1
- package/dist/git/run.types.d.ts +62 -3
- package/dist/git/run.types.d.ts.map +1 -1
- package/dist/git/service.d.ts.map +1 -1
- package/dist/git/utils/autolink.utils.d.ts.map +1 -1
- package/dist/git/utils/autolink.utils.js.map +1 -1
- package/dist/git/utils/blame.utils.d.ts.map +1 -1
- package/dist/git/utils/blame.utils.js.map +1 -1
- package/dist/git/utils/branch.utils.d.ts.map +1 -1
- package/dist/git/utils/branch.utils.js +12 -1
- package/dist/git/utils/branch.utils.js.map +1 -1
- package/dist/git/utils/commit.utils.d.ts.map +1 -1
- package/dist/git/utils/commit.utils.js.map +1 -1
- package/dist/git/utils/conflictResolution.utils.d.ts.map +1 -1
- package/dist/git/utils/conflictResolution.utils.js.map +1 -1
- package/dist/git/utils/contributor.utils.d.ts +1 -1
- package/dist/git/utils/contributor.utils.d.ts.map +1 -1
- package/dist/git/utils/contributor.utils.js +1 -2
- package/dist/git/utils/contributor.utils.js.map +1 -1
- package/dist/git/utils/fetch.utils.d.ts.map +1 -1
- package/dist/git/utils/fetch.utils.js.map +1 -1
- package/dist/git/utils/fileStatus.utils.d.ts +7 -0
- package/dist/git/utils/fileStatus.utils.d.ts.map +1 -1
- package/dist/git/utils/fileStatus.utils.js +6 -0
- package/dist/git/utils/fileStatus.utils.js.map +1 -1
- package/dist/git/utils/graph.utils.d.ts +20 -0
- package/dist/git/utils/graph.utils.d.ts.map +1 -0
- package/dist/git/utils/graph.utils.js +40 -0
- package/dist/git/utils/graph.utils.js.map +1 -0
- package/dist/git/utils/issue.utils.d.ts.map +1 -1
- package/dist/git/utils/issue.utils.js +1 -0
- package/dist/git/utils/issue.utils.js.map +1 -1
- package/dist/git/utils/issueOrPullRequest.utils.d.ts.map +1 -1
- package/dist/git/utils/issueOrPullRequest.utils.js.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.d.ts.map +1 -1
- package/dist/git/utils/mergeConflicts.utils.js.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.d.ts +13 -13
- package/dist/git/utils/pausedOperationStatus.utils.d.ts.map +1 -1
- package/dist/git/utils/pausedOperationStatus.utils.js.map +1 -1
- package/dist/git/utils/pullRequest.utils.d.ts.map +1 -1
- package/dist/git/utils/pullRequest.utils.js +9 -0
- package/dist/git/utils/pullRequest.utils.js.map +1 -1
- package/dist/git/utils/reachability.utils.d.ts +20 -2
- package/dist/git/utils/reachability.utils.d.ts.map +1 -1
- package/dist/git/utils/reachability.utils.js +68 -7
- package/dist/git/utils/reachability.utils.js.map +1 -1
- package/dist/git/utils/rebase.utils.d.ts.map +1 -1
- package/dist/git/utils/rebase.utils.js.map +1 -1
- package/dist/git/utils/reference.utils.d.ts.map +1 -1
- package/dist/git/utils/reference.utils.js.map +1 -1
- package/dist/git/utils/remote.utils.d.ts.map +1 -1
- package/dist/git/utils/remote.utils.js.map +1 -1
- package/dist/git/utils/repository.utils.d.ts.map +1 -1
- package/dist/git/utils/repository.utils.js.map +1 -1
- package/dist/git/utils/resourceDescriptor.utils.d.ts.map +1 -1
- package/dist/git/utils/resourceDescriptor.utils.js.map +1 -1
- package/dist/git/utils/revision.utils.d.ts.map +1 -1
- package/dist/git/utils/revision.utils.js.map +1 -1
- package/dist/git/utils/search.utils.d.ts.map +1 -1
- package/dist/git/utils/search.utils.js.map +1 -1
- package/dist/git/utils/sorting.d.ts.map +1 -1
- package/dist/git/utils/sorting.js.map +1 -1
- package/dist/git/utils/sshKey.utils.d.ts +7 -0
- package/dist/git/utils/sshKey.utils.d.ts.map +1 -0
- package/dist/git/utils/sshKey.utils.js +25 -0
- package/dist/git/utils/sshKey.utils.js.map +1 -0
- package/dist/git/utils/status.utils.d.ts.map +1 -1
- package/dist/git/utils/status.utils.js.map +1 -1
- package/dist/git/utils/statusFile.utils.d.ts.map +1 -1
- package/dist/git/utils/statusFile.utils.js.map +1 -1
- package/dist/git/utils/tag.utils.d.ts.map +1 -1
- package/dist/git/utils/tag.utils.js.map +1 -1
- package/dist/git/utils/tooltip.utils.d.ts.map +1 -1
- package/dist/git/utils/tooltip.utils.js.map +1 -1
- package/dist/git/utils/uriAuthority.d.ts.map +1 -1
- package/dist/git/utils/uriAuthority.js.map +1 -1
- package/dist/git/utils/user.utils.d.ts.map +1 -1
- package/dist/git/utils/user.utils.js.map +1 -1
- package/dist/git/utils/worktree.utils.d.ts.map +1 -1
- package/dist/git/utils/worktree.utils.js.map +1 -1
- package/dist/git/watching/changeEvent.d.ts.map +1 -1
- package/dist/git/watching/changeEvent.js.map +1 -1
- package/dist/git/watching/classifyChange.d.ts.map +1 -1
- package/dist/git/watching/classifyChange.js.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.d.ts.map +1 -1
- package/dist/git/watching/gitIgnoreFilter.js.map +1 -1
- package/dist/git/watching/initWatcher.d.ts.map +1 -1
- package/dist/git/watching/initWatcher.js.map +1 -1
- package/dist/git/watching/provider.d.ts.map +1 -1
- package/dist/git/watching/provider.js.map +1 -1
- package/dist/git/watching/watchGroup.d.ts.map +1 -1
- package/dist/git/watching/watchGroup.js.map +1 -1
- package/dist/git/watching/watchService.d.ts +4 -0
- package/dist/git/watching/watchService.d.ts.map +1 -1
- package/dist/git/watching/watchService.js +15 -1
- package/dist/git/watching/watchService.js.map +1 -1
- package/dist/git/watching/watchSession.d.ts +7 -0
- package/dist/git/watching/watchSession.d.ts.map +1 -1
- package/dist/git/watching/watchSession.js +14 -2
- package/dist/git/watching/watchSession.js.map +1 -1
- package/dist/git/watching/watcherPatterns.d.ts.map +1 -1
- package/dist/git/watching/watcherPatterns.js.map +1 -1
- package/dist/git-cli/cliGitProvider.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.errors.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.errors.js.map +1 -1
- package/dist/git-cli/exec/exec.js.map +1 -1
- package/dist/git-cli/exec/exec.types.d.ts.map +1 -1
- package/dist/git-cli/exec/exec.types.js.map +1 -1
- package/dist/git-cli/exec/features.d.ts.map +1 -1
- package/dist/git-cli/exec/features.js.map +1 -1
- package/dist/git-cli/exec/git.d.ts +19 -27
- package/dist/git-cli/exec/git.d.ts.map +1 -1
- package/dist/git-cli/exec/git.js +126 -34
- package/dist/git-cli/exec/git.js.map +1 -1
- package/dist/git-cli/exec/gitQueue.d.ts.map +1 -1
- package/dist/git-cli/exec/gitQueue.js.map +1 -1
- package/dist/git-cli/exec/locator.d.ts.map +1 -1
- package/dist/git-cli/exec/locator.js.map +1 -1
- package/dist/git-cli/parsers/blameParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/blameParser.js.map +1 -1
- package/dist/git-cli/parsers/indexParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/indexParser.js.map +1 -1
- package/dist/git-cli/parsers/logParser.d.ts +9 -1
- package/dist/git-cli/parsers/logParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/logParser.js +141 -60
- package/dist/git-cli/parsers/logParser.js.map +1 -1
- package/dist/git-cli/parsers/mergeTreeParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/mergeTreeParser.js.map +1 -1
- package/dist/git-cli/parsers/refParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/refParser.js.map +1 -1
- package/dist/git-cli/parsers/reflogParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/reflogParser.js.map +1 -1
- package/dist/git-cli/parsers/remoteParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/remoteParser.js.map +1 -1
- package/dist/git-cli/parsers/shortlogParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/shortlogParser.js.map +1 -1
- package/dist/git-cli/parsers/signatureParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/signatureParser.js.map +1 -1
- package/dist/git-cli/parsers/sshSignatureParser.d.ts +21 -0
- package/dist/git-cli/parsers/sshSignatureParser.d.ts.map +1 -0
- package/dist/git-cli/parsers/sshSignatureParser.js +78 -0
- package/dist/git-cli/parsers/sshSignatureParser.js.map +1 -0
- package/dist/git-cli/parsers/statusParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/statusParser.js.map +1 -1
- package/dist/git-cli/parsers/treeParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/treeParser.js.map +1 -1
- package/dist/git-cli/parsers/worktreeParser.d.ts.map +1 -1
- package/dist/git-cli/parsers/worktreeParser.js +5 -7
- package/dist/git-cli/parsers/worktreeParser.js.map +1 -1
- package/dist/git-cli/providers/blame.d.ts.map +1 -1
- package/dist/git-cli/providers/blame.js.map +1 -1
- package/dist/git-cli/providers/branches.d.ts +1 -0
- package/dist/git-cli/providers/branches.d.ts.map +1 -1
- package/dist/git-cli/providers/branches.js +51 -32
- package/dist/git-cli/providers/branches.js.map +1 -1
- package/dist/git-cli/providers/commitFilesetUtils.d.ts.map +1 -1
- package/dist/git-cli/providers/commitFilesetUtils.js.map +1 -1
- package/dist/git-cli/providers/commits.d.ts +12 -1
- package/dist/git-cli/providers/commits.d.ts.map +1 -1
- package/dist/git-cli/providers/commits.js +89 -8
- package/dist/git-cli/providers/commits.js.map +1 -1
- package/dist/git-cli/providers/config.d.ts.map +1 -1
- package/dist/git-cli/providers/config.js.map +1 -1
- package/dist/git-cli/providers/contributors.d.ts.map +1 -1
- package/dist/git-cli/providers/contributors.js.map +1 -1
- package/dist/git-cli/providers/diff.d.ts.map +1 -1
- package/dist/git-cli/providers/diff.js.map +1 -1
- package/dist/git-cli/providers/graph.d.ts +35 -1
- package/dist/git-cli/providers/graph.d.ts.map +1 -1
- package/dist/git-cli/providers/graph.js +1434 -330
- package/dist/git-cli/providers/graph.js.map +1 -1
- package/dist/git-cli/providers/operations.d.ts.map +1 -1
- package/dist/git-cli/providers/operations.js.map +1 -1
- package/dist/git-cli/providers/patch.d.ts.map +1 -1
- package/dist/git-cli/providers/patch.js.map +1 -1
- package/dist/git-cli/providers/pausedOperations.d.ts.map +1 -1
- package/dist/git-cli/providers/pausedOperations.js +3 -3
- package/dist/git-cli/providers/pausedOperations.js.map +1 -1
- package/dist/git-cli/providers/refs.d.ts.map +1 -1
- package/dist/git-cli/providers/refs.js.map +1 -1
- package/dist/git-cli/providers/remotes.d.ts.map +1 -1
- package/dist/git-cli/providers/remotes.js.map +1 -1
- package/dist/git-cli/providers/revision.d.ts +1 -0
- package/dist/git-cli/providers/revision.d.ts.map +1 -1
- package/dist/git-cli/providers/revision.js +33 -0
- package/dist/git-cli/providers/revision.js.map +1 -1
- package/dist/git-cli/providers/staging.d.ts.map +1 -1
- package/dist/git-cli/providers/staging.js.map +1 -1
- package/dist/git-cli/providers/stash.d.ts.map +1 -1
- package/dist/git-cli/providers/stash.js.map +1 -1
- package/dist/git-cli/providers/status.d.ts +28 -0
- package/dist/git-cli/providers/status.d.ts.map +1 -1
- package/dist/git-cli/providers/status.js +240 -154
- package/dist/git-cli/providers/status.js.map +1 -1
- package/dist/git-cli/providers/tags.d.ts.map +1 -1
- package/dist/git-cli/providers/tags.js +2 -1
- package/dist/git-cli/providers/tags.js.map +1 -1
- package/dist/git-cli/providers/worktrees.d.ts +2 -1
- package/dist/git-cli/providers/worktrees.d.ts.map +1 -1
- package/dist/git-cli/providers/worktrees.js +28 -3
- package/dist/git-cli/providers/worktrees.js.map +1 -1
- package/dist/git-cli/service.d.ts.map +1 -1
- package/dist/git-cli/service.js +8 -0
- package/dist/git-cli/service.js.map +1 -1
- package/dist/ipc/ipcServer.d.ts.map +1 -1
- package/dist/ipc/ipcServer.js +1 -1
- package/dist/ipc/ipcServer.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeProvider.d.ts +6 -1
- package/dist/plus/agents/providers/claudeCodeProvider.d.ts.map +1 -1
- package/dist/plus/agents/providers/claudeCodeProvider.js +19 -0
- package/dist/plus/agents/providers/claudeCodeProvider.js.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts +68 -0
- package/dist/plus/agents/providers/claudeCodeTranscript.d.ts.map +1 -1
- package/dist/plus/agents/providers/claudeCodeTranscript.js +262 -8
- package/dist/plus/agents/providers/claudeCodeTranscript.js.map +1 -1
- package/dist/plus/agents/types.d.ts +36 -2
- package/dist/plus/agents/types.d.ts.map +1 -1
- package/dist/plus/ai/constants.d.ts +1 -2
- package/dist/plus/ai/constants.d.ts.map +1 -1
- package/dist/plus/ai/constants.js +1 -8
- package/dist/plus/ai/constants.js.map +1 -1
- package/dist/plus/ai/errors.d.ts.map +1 -1
- package/dist/plus/ai/errors.js.map +1 -1
- package/dist/plus/ai/models/conversation.d.ts.map +1 -1
- package/dist/plus/ai/models/conversation.js.map +1 -1
- package/dist/plus/ai/models/model.d.ts +2 -1
- package/dist/plus/ai/models/model.d.ts.map +1 -1
- package/dist/plus/ai/models/model.js +50 -1
- package/dist/plus/ai/models/model.js.map +1 -1
- package/dist/plus/ai/models/promptTemplates.d.ts +5 -2
- package/dist/plus/ai/models/promptTemplates.d.ts.map +1 -1
- package/dist/plus/ai/models/promptTemplates.js.map +1 -1
- package/dist/plus/ai/models/provider.d.ts.map +1 -1
- package/dist/plus/ai/models/provider.js.map +1 -1
- package/dist/plus/ai/models/results.d.ts.map +1 -1
- package/dist/plus/ai/models/results.js.map +1 -1
- package/dist/plus/ai/prompts.d.ts +1 -1
- package/dist/plus/ai/prompts.d.ts.map +1 -1
- package/dist/plus/ai/prompts.js +15 -47
- package/dist/plus/ai/prompts.js.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.d.ts +5 -0
- package/dist/plus/ai/providers/anthropicProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/anthropicProvider.js +40 -3
- package/dist/plus/ai/providers/anthropicProvider.js.map +1 -1
- package/dist/plus/ai/providers/azureProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/azureProvider.js.map +1 -1
- package/dist/plus/ai/providers/context.d.ts.map +1 -1
- package/dist/plus/ai/providers/context.js.map +1 -1
- package/dist/plus/ai/providers/deepSeekProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/deepSeekProvider.js +17 -1
- package/dist/plus/ai/providers/deepSeekProvider.js.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/geminiProvider.js +25 -6
- package/dist/plus/ai/providers/geminiProvider.js.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/gitkrakenProvider.js +1 -0
- package/dist/plus/ai/providers/gitkrakenProvider.js.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/huggingFaceProvider.js +21 -18
- package/dist/plus/ai/providers/huggingFaceProvider.js.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/mistralProvider.js.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/ollamaProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProvider.js.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts +10 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.d.ts.map +1 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js +9 -1
- package/dist/plus/ai/providers/openAICompatibleProviderBase.js.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openRouterProvider.js.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/openaiProvider.js.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.d.ts.map +1 -1
- package/dist/plus/ai/providers/xaiProvider.js +14 -1
- package/dist/plus/ai/providers/xaiProvider.js.map +1 -1
- package/dist/plus/ai/utils/ai.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/ai.utils.js +0 -2
- package/dist/plus/ai/utils/ai.utils.js.map +1 -1
- package/dist/plus/ai/utils/results.utils.d.ts +3 -0
- package/dist/plus/ai/utils/results.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/results.utils.js +26 -0
- package/dist/plus/ai/utils/results.utils.js.map +1 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts +1 -1
- package/dist/plus/ai/utils/truncation.utils.d.ts.map +1 -1
- package/dist/plus/ai/utils/truncation.utils.js.map +1 -1
- package/dist/plus/git-github/api/config.d.ts.map +1 -1
- package/dist/plus/git-github/api/config.js.map +1 -1
- package/dist/plus/git-github/api/github.d.ts +66 -3
- package/dist/plus/git-github/api/github.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.js +345 -74
- package/dist/plus/git-github/api/github.js.map +1 -1
- package/dist/plus/git-github/api/github.utils.d.ts.map +1 -1
- package/dist/plus/git-github/api/github.utils.js.map +1 -1
- package/dist/plus/git-github/api/token.d.ts.map +1 -1
- package/dist/plus/git-github/api/token.js.map +1 -1
- package/dist/plus/git-github/api/tokenUtils.d.ts.map +1 -1
- package/dist/plus/git-github/api/tokenUtils.js.map +1 -1
- package/dist/plus/git-github/api/types.d.ts.map +1 -1
- package/dist/plus/git-github/api/types.js.map +1 -1
- package/dist/plus/git-github/context.d.ts.map +1 -1
- package/dist/plus/git-github/models.d.ts +5 -0
- package/dist/plus/git-github/models.d.ts.map +1 -1
- package/dist/plus/git-github/models.js +27 -2
- package/dist/plus/git-github/models.js.map +1 -1
- package/dist/plus/git-github/providers/github/blame.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/blame.js.map +1 -1
- package/dist/plus/git-github/providers/github/branches.d.ts +2 -1
- package/dist/plus/git-github/providers/github/branches.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/branches.js +7 -3
- package/dist/plus/git-github/providers/github/branches.js.map +1 -1
- package/dist/plus/git-github/providers/github/commits.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/commits.js.map +1 -1
- package/dist/plus/git-github/providers/github/config.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/config.js.map +1 -1
- package/dist/plus/git-github/providers/github/contributors.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/contributors.js.map +1 -1
- package/dist/plus/git-github/providers/github/diff.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/diff.js +2 -2
- package/dist/plus/git-github/providers/github/diff.js.map +1 -1
- package/dist/plus/git-github/providers/github/graph.d.ts +12 -1
- package/dist/plus/git-github/providers/github/graph.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/graph.js +85 -0
- package/dist/plus/git-github/providers/github/graph.js.map +1 -1
- package/dist/plus/git-github/providers/github/refs.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/refs.js.map +1 -1
- package/dist/plus/git-github/providers/github/remotes.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/remotes.js.map +1 -1
- package/dist/plus/git-github/providers/github/revision.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/revision.js.map +1 -1
- package/dist/plus/git-github/providers/github/status.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/status.js.map +1 -1
- package/dist/plus/git-github/providers/github/tags.d.ts.map +1 -1
- package/dist/plus/git-github/providers/github/tags.js +3 -1
- package/dist/plus/git-github/providers/github/tags.js.map +1 -1
- package/dist/plus/git-github/providers/githubGitProvider.d.ts.map +1 -1
- package/dist/plus/git-github/providers/githubGitProvider.js.map +1 -1
- package/dist/plus/git-github/providers/githubProvider.d.ts.map +1 -1
- package/dist/plus/git-github/providers/githubProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts +20 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/cloudIntegrationService.js +134 -10
- package/dist/plus/integrations/authentication/cloudIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts +52 -5
- package/dist/plus/integrations/authentication/configuredIntegrationService.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/configuredIntegrationService.js +248 -46
- package/dist/plus/integrations/authentication/configuredIntegrationService.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts +24 -4
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js +58 -26
- package/dist/plus/integrations/authentication/integrationAuthenticationProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js +7 -3
- package/dist/plus/integrations/authentication/integrationAuthenticationService.js.map +1 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts +1 -0
- package/dist/plus/integrations/authentication/manualTokenProvider.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/manualTokenProvider.js +9 -5
- package/dist/plus/integrations/authentication/manualTokenProvider.js.map +1 -1
- package/dist/plus/integrations/authentication/models.d.ts +33 -0
- package/dist/plus/integrations/authentication/models.d.ts.map +1 -1
- package/dist/plus/integrations/authentication/models.js.map +1 -1
- package/dist/plus/integrations/collectionMetadata.d.ts +21 -0
- package/dist/plus/integrations/collectionMetadata.d.ts.map +1 -0
- package/dist/plus/integrations/collectionMetadata.js +121 -0
- package/dist/plus/integrations/collectionMetadata.js.map +1 -0
- package/dist/plus/integrations/constants.d.ts +12 -2
- package/dist/plus/integrations/constants.d.ts.map +1 -1
- package/dist/plus/integrations/constants.js +10 -0
- package/dist/plus/integrations/constants.js.map +1 -1
- package/dist/plus/integrations/context.d.ts +10 -6
- package/dist/plus/integrations/context.d.ts.map +1 -1
- package/dist/plus/integrations/errors.d.ts +65 -0
- package/dist/plus/integrations/errors.d.ts.map +1 -1
- package/dist/plus/integrations/errors.js +135 -0
- package/dist/plus/integrations/errors.js.map +1 -1
- package/dist/plus/integrations/index.d.ts +57 -12
- package/dist/plus/integrations/index.d.ts.map +1 -1
- package/dist/plus/integrations/index.js +39 -37
- package/dist/plus/integrations/index.js.map +1 -1
- package/dist/plus/integrations/integrationService.d.ts +297 -13
- package/dist/plus/integrations/integrationService.d.ts.map +1 -1
- package/dist/plus/integrations/integrationService.js +672 -36
- package/dist/plus/integrations/integrationService.js.map +1 -1
- package/dist/plus/integrations/lite.d.ts +47 -0
- package/dist/plus/integrations/lite.d.ts.map +1 -0
- package/dist/plus/integrations/lite.js +141 -0
- package/dist/plus/integrations/lite.js.map +1 -0
- package/dist/plus/integrations/manager.d.ts +332 -0
- package/dist/plus/integrations/manager.d.ts.map +1 -0
- package/dist/plus/integrations/manager.js +2 -0
- package/dist/plus/integrations/manager.js.map +1 -0
- package/dist/plus/integrations/models/gitHostIntegration.d.ts +262 -10
- package/dist/plus/integrations/models/gitHostIntegration.d.ts.map +1 -1
- package/dist/plus/integrations/models/gitHostIntegration.js +675 -101
- package/dist/plus/integrations/models/gitHostIntegration.js.map +1 -1
- package/dist/plus/integrations/models/integration.d.ts +88 -3
- package/dist/plus/integrations/models/integration.d.ts.map +1 -1
- package/dist/plus/integrations/models/integration.js +192 -21
- package/dist/plus/integrations/models/integration.js.map +1 -1
- package/dist/plus/integrations/models/issuesIntegration.d.ts +70 -7
- package/dist/plus/integrations/models/issuesIntegration.d.ts.map +1 -1
- package/dist/plus/integrations/models/issuesIntegration.js +108 -35
- package/dist/plus/integrations/models/issuesIntegration.js.map +1 -1
- package/dist/plus/integrations/providerFilters.d.ts +12 -0
- package/dist/plus/integrations/providerFilters.d.ts.map +1 -0
- package/dist/plus/integrations/providerFilters.js +14 -0
- package/dist/plus/integrations/providerFilters.js.map +1 -0
- package/dist/plus/integrations/providers/apiClients.d.ts.map +1 -1
- package/dist/plus/integrations/providers/apiClients.js +3 -3
- package/dist/plus/integrations/providers/apiClients.js.map +1 -1
- package/dist/plus/integrations/providers/apiConfig.d.ts +52 -0
- package/dist/plus/integrations/providers/apiConfig.d.ts.map +1 -0
- package/dist/plus/integrations/providers/apiConfig.js +19 -0
- package/dist/plus/integrations/providers/apiConfig.js.map +1 -0
- package/dist/plus/integrations/providers/azure/azure.d.ts +14 -2
- package/dist/plus/integrations/providers/azure/azure.d.ts.map +1 -1
- package/dist/plus/integrations/providers/azure/azure.js +107 -32
- package/dist/plus/integrations/providers/azure/azure.js.map +1 -1
- package/dist/plus/integrations/providers/azure/models.d.ts +16 -0
- package/dist/plus/integrations/providers/azure/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/azure/models.js +6 -6
- package/dist/plus/integrations/providers/azure/models.js.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.d.ts +55 -9
- package/dist/plus/integrations/providers/azureDevOps.d.ts.map +1 -1
- package/dist/plus/integrations/providers/azureDevOps.js +572 -79
- package/dist/plus/integrations/providers/azureDevOps.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts +13 -2
- package/dist/plus/integrations/providers/bitbucket/bitbucket.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js +108 -32
- package/dist/plus/integrations/providers/bitbucket/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts +19 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.js +20 -1
- package/dist/plus/integrations/providers/bitbucket-server/models.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.d.ts +28 -4
- package/dist/plus/integrations/providers/bitbucket-server.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket-server.js +110 -6
- package/dist/plus/integrations/providers/bitbucket-server.js.map +1 -1
- package/dist/plus/integrations/providers/bitbucket.d.ts +38 -4
- package/dist/plus/integrations/providers/bitbucket.d.ts.map +1 -1
- package/dist/plus/integrations/providers/bitbucket.js +330 -34
- package/dist/plus/integrations/providers/bitbucket.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github/github.js +1 -1
- package/dist/plus/integrations/providers/github/github.js.map +1 -1
- package/dist/plus/integrations/providers/github/github.utils.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github/github.utils.js.map +1 -1
- package/dist/plus/integrations/providers/github/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github/models.js.map +1 -1
- package/dist/plus/integrations/providers/github.d.ts +49 -6
- package/dist/plus/integrations/providers/github.d.ts.map +1 -1
- package/dist/plus/integrations/providers/github.js +289 -4
- package/dist/plus/integrations/providers/github.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts +11 -3
- package/dist/plus/integrations/providers/gitlab/gitlab.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.js +121 -47
- package/dist/plus/integrations/providers/gitlab/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts +6 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js +8 -0
- package/dist/plus/integrations/providers/gitlab/gitlab.utils.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab/models.d.ts +10 -0
- package/dist/plus/integrations/providers/gitlab/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab/models.js +8 -5
- package/dist/plus/integrations/providers/gitlab/models.js.map +1 -1
- package/dist/plus/integrations/providers/gitlab.d.ts +50 -5
- package/dist/plus/integrations/providers/gitlab.d.ts.map +1 -1
- package/dist/plus/integrations/providers/gitlab.js +274 -8
- package/dist/plus/integrations/providers/gitlab.js.map +1 -1
- package/dist/plus/integrations/providers/jira.d.ts +13 -2
- package/dist/plus/integrations/providers/jira.d.ts.map +1 -1
- package/dist/plus/integrations/providers/jira.js +200 -30
- package/dist/plus/integrations/providers/jira.js.map +1 -1
- package/dist/plus/integrations/providers/linear.d.ts +16 -5
- package/dist/plus/integrations/providers/linear.d.ts.map +1 -1
- package/dist/plus/integrations/providers/linear.js +127 -21
- package/dist/plus/integrations/providers/linear.js.map +1 -1
- package/dist/plus/integrations/providers/models.d.ts +339 -60
- package/dist/plus/integrations/providers/models.d.ts.map +1 -1
- package/dist/plus/integrations/providers/models.js +307 -59
- package/dist/plus/integrations/providers/models.js.map +1 -1
- package/dist/plus/integrations/providers/providersApi.d.ts +144 -11
- package/dist/plus/integrations/providers/providersApi.d.ts.map +1 -1
- package/dist/plus/integrations/providers/providersApi.js +486 -55
- package/dist/plus/integrations/providers/providersApi.js.map +1 -1
- package/dist/plus/integrations/providers/trello.d.ts +47 -0
- package/dist/plus/integrations/providers/trello.d.ts.map +1 -0
- package/dist/plus/integrations/providers/trello.js +141 -0
- package/dist/plus/integrations/providers/trello.js.map +1 -0
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts +29 -0
- package/dist/plus/integrations/providers/utils/providerPaging.d.ts.map +1 -0
- package/dist/plus/integrations/providers/utils/providerPaging.js +154 -0
- package/dist/plus/integrations/providers/utils/providerPaging.js.map +1 -0
- package/dist/plus/integrations/providers/utils.d.ts +21 -0
- package/dist/plus/integrations/providers/utils.d.ts.map +1 -1
- package/dist/plus/integrations/providers/utils.js +57 -6
- package/dist/plus/integrations/providers/utils.js.map +1 -1
- package/dist/plus/integrations/reads/broaden.d.ts +20 -0
- package/dist/plus/integrations/reads/broaden.d.ts.map +1 -0
- package/dist/plus/integrations/reads/broaden.js +326 -0
- package/dist/plus/integrations/reads/broaden.js.map +1 -0
- package/dist/plus/integrations/reads/context.d.ts +74 -0
- package/dist/plus/integrations/reads/context.d.ts.map +1 -0
- package/dist/plus/integrations/reads/context.js +2 -0
- package/dist/plus/integrations/reads/context.js.map +1 -0
- package/dist/plus/integrations/reads/cursors.d.ts +66 -0
- package/dist/plus/integrations/reads/cursors.d.ts.map +1 -0
- package/dist/plus/integrations/reads/cursors.js +133 -0
- package/dist/plus/integrations/reads/cursors.js.map +1 -0
- package/dist/plus/integrations/reads/drains.d.ts +60 -0
- package/dist/plus/integrations/reads/drains.d.ts.map +1 -0
- package/dist/plus/integrations/reads/drains.js +255 -0
- package/dist/plus/integrations/reads/drains.js.map +1 -0
- package/dist/plus/integrations/reads/filters.d.ts +81 -0
- package/dist/plus/integrations/reads/filters.d.ts.map +1 -0
- package/dist/plus/integrations/reads/filters.js +87 -0
- package/dist/plus/integrations/reads/filters.js.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.d.ts +17 -0
- package/dist/plus/integrations/reads/hierarchy.d.ts.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.js +320 -0
- package/dist/plus/integrations/reads/hierarchy.js.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts +77 -0
- package/dist/plus/integrations/reads/hierarchy.utils.d.ts.map +1 -0
- package/dist/plus/integrations/reads/hierarchy.utils.js +128 -0
- package/dist/plus/integrations/reads/hierarchy.utils.js.map +1 -0
- package/dist/plus/integrations/reads/issueTracker.d.ts +19 -0
- package/dist/plus/integrations/reads/issueTracker.d.ts.map +1 -0
- package/dist/plus/integrations/reads/issueTracker.js +334 -0
- package/dist/plus/integrations/reads/issueTracker.js.map +1 -0
- package/dist/plus/integrations/reads/issues.d.ts +34 -0
- package/dist/plus/integrations/reads/issues.d.ts.map +1 -0
- package/dist/plus/integrations/reads/issues.js +244 -0
- package/dist/plus/integrations/reads/issues.js.map +1 -0
- package/dist/plus/integrations/reads/paging.d.ts +136 -0
- package/dist/plus/integrations/reads/paging.d.ts.map +1 -0
- package/dist/plus/integrations/reads/paging.js +221 -0
- package/dist/plus/integrations/reads/paging.js.map +1 -0
- package/dist/plus/integrations/reads/pullRequests.d.ts +32 -0
- package/dist/plus/integrations/reads/pullRequests.d.ts.map +1 -0
- package/dist/plus/integrations/reads/pullRequests.js +151 -0
- package/dist/plus/integrations/reads/pullRequests.js.map +1 -0
- package/dist/plus/integrations/reads/resolveRepository.d.ts +25 -0
- package/dist/plus/integrations/reads/resolveRepository.d.ts.map +1 -0
- package/dist/plus/integrations/reads/resolveRepository.js +235 -0
- package/dist/plus/integrations/reads/resolveRepository.js.map +1 -0
- package/dist/plus/integrations/reads/sweeps.d.ts +11 -0
- package/dist/plus/integrations/reads/sweeps.d.ts.map +1 -0
- package/dist/plus/integrations/reads/sweeps.js +125 -0
- package/dist/plus/integrations/reads/sweeps.js.map +1 -0
- package/dist/plus/integrations/reads/warnings.d.ts +47 -0
- package/dist/plus/integrations/reads/warnings.d.ts.map +1 -0
- package/dist/plus/integrations/reads/warnings.js +81 -0
- package/dist/plus/integrations/reads/warnings.js.map +1 -0
- package/dist/plus/integrations/results.d.ts +189 -0
- package/dist/plus/integrations/results.d.ts.map +1 -0
- package/dist/plus/integrations/results.js +62 -0
- package/dist/plus/integrations/results.js.map +1 -0
- package/dist/plus/integrations/utils/domain.utils.d.ts +5 -0
- package/dist/plus/integrations/utils/domain.utils.d.ts.map +1 -0
- package/dist/plus/integrations/utils/domain.utils.js +27 -0
- package/dist/plus/integrations/utils/domain.utils.js.map +1 -0
- package/dist/plus/integrations/utils/integration.utils.d.ts +27 -1
- package/dist/plus/integrations/utils/integration.utils.d.ts.map +1 -1
- package/dist/plus/integrations/utils/integration.utils.js +86 -15
- package/dist/plus/integrations/utils/integration.utils.js.map +1 -1
- package/dist/utils/array.d.ts.map +1 -1
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/brand.d.ts.map +1 -1
- package/dist/utils/cancellation.d.ts +13 -0
- package/dist/utils/cancellation.d.ts.map +1 -1
- package/dist/utils/cancellation.js +52 -7
- package/dist/utils/cancellation.js.map +1 -1
- package/dist/utils/charCode.d.ts.map +1 -1
- package/dist/utils/coalescedRun.d.ts +16 -0
- package/dist/utils/coalescedRun.d.ts.map +1 -0
- package/dist/utils/coalescedRun.js +43 -0
- package/dist/utils/coalescedRun.js.map +1 -0
- package/dist/utils/color.d.ts.map +1 -1
- package/dist/utils/color.js +3 -3
- package/dist/utils/color.js.map +1 -1
- package/dist/utils/date.d.ts +24 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +62 -0
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/debounce.js +1 -1
- package/dist/utils/debounce.js.map +1 -1
- package/dist/utils/decorators/debounce.d.ts.map +1 -1
- package/dist/utils/decorators/debounce.js.map +1 -1
- package/dist/utils/decorators/gate.d.ts.map +1 -1
- package/dist/utils/decorators/gate.js +2 -2
- package/dist/utils/decorators/gate.js.map +1 -1
- package/dist/utils/decorators/log.d.ts.map +1 -1
- package/dist/utils/decorators/log.js +5 -5
- package/dist/utils/decorators/log.js.map +1 -1
- package/dist/utils/decorators/memoize.d.ts.map +1 -1
- package/dist/utils/decorators/memoize.js +2 -2
- package/dist/utils/decorators/memoize.js.map +1 -1
- package/dist/utils/decorators/resolver.d.ts.map +1 -1
- package/dist/utils/decorators/resolver.js.map +1 -1
- package/dist/utils/decorators/sequentialize.d.ts.map +1 -1
- package/dist/utils/decorators/sequentialize.js +2 -2
- package/dist/utils/decorators/sequentialize.js.map +1 -1
- package/dist/utils/decorators/serializable.d.ts.map +1 -1
- package/dist/utils/decorators/serializable.js +1 -1
- package/dist/utils/decorators/serializable.js.map +1 -1
- package/dist/utils/dedupedAsyncCache.d.ts.map +1 -1
- package/dist/utils/env/browser/base64.d.ts.map +1 -1
- package/dist/utils/env/browser/base64.js.map +1 -1
- package/dist/utils/env/browser/crypto.d.ts.map +1 -1
- package/dist/utils/env/browser/crypto.js.map +1 -1
- package/dist/utils/env/browser/fs.d.ts.map +1 -1
- package/dist/utils/env/browser/fs.js.map +1 -1
- package/dist/utils/env/browser/hex.d.ts.map +1 -1
- package/dist/utils/env/browser/hex.js.map +1 -1
- package/dist/utils/env/browser/hrtime.d.ts.map +1 -1
- package/dist/utils/env/browser/hrtime.js.map +1 -1
- package/dist/utils/env/browser/logScope.d.ts.map +1 -1
- package/dist/utils/env/browser/logScope.js.map +1 -1
- package/dist/utils/env/browser/md5.d.ts.map +1 -1
- package/dist/utils/env/browser/md5.js.map +1 -1
- package/dist/utils/env/browser/platform.d.ts.map +1 -1
- package/dist/utils/env/browser/platform.js.map +1 -1
- package/dist/utils/env/node/base64.d.ts.map +1 -1
- package/dist/utils/env/node/base64.js.map +1 -1
- package/dist/utils/env/node/crypto.d.ts.map +1 -1
- package/dist/utils/env/node/crypto.js.map +1 -1
- package/dist/utils/env/node/exec.d.ts +9 -1
- package/dist/utils/env/node/exec.d.ts.map +1 -1
- package/dist/utils/env/node/exec.js +11 -4
- package/dist/utils/env/node/exec.js.map +1 -1
- package/dist/utils/env/node/fs.d.ts.map +1 -1
- package/dist/utils/env/node/fs.js.map +1 -1
- package/dist/utils/env/node/hex.d.ts.map +1 -1
- package/dist/utils/env/node/hex.js.map +1 -1
- package/dist/utils/env/node/hrtime.d.ts.map +1 -1
- package/dist/utils/env/node/hrtime.js.map +1 -1
- package/dist/utils/env/node/logScope.d.ts.map +1 -1
- package/dist/utils/env/node/logScope.js.map +1 -1
- package/dist/utils/env/node/platform.d.ts.map +1 -1
- package/dist/utils/env/node/platform.js.map +1 -1
- package/dist/utils/event.d.ts.map +1 -1
- package/dist/utils/event.js +18 -22
- package/dist/utils/event.js.map +1 -1
- package/dist/utils/formatter.d.ts.map +1 -1
- package/dist/utils/formatter.js.map +1 -1
- package/dist/utils/function.d.ts.map +1 -1
- package/dist/utils/function.js +3 -3
- package/dist/utils/function.js.map +1 -1
- package/dist/utils/hash.js.map +1 -1
- package/dist/utils/iterable.d.ts.map +1 -1
- package/dist/utils/iterable.js +2 -6
- package/dist/utils/iterable.js.map +1 -1
- package/dist/utils/lazy.d.ts.map +1 -1
- package/dist/utils/lazy.js.map +1 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/logger.scoped.js +1 -1
- package/dist/utils/logger.scoped.js.map +1 -1
- package/dist/utils/lruMap.d.ts.map +1 -1
- package/dist/utils/lruMap.js.map +1 -1
- package/dist/utils/mru.d.ts.map +1 -1
- package/dist/utils/mru.js.map +1 -1
- package/dist/utils/object.js.map +1 -1
- package/dist/utils/paging.d.ts +29 -0
- package/dist/utils/paging.d.ts.map +1 -1
- package/dist/utils/paging.js +18 -0
- package/dist/utils/paging.js.map +1 -1
- package/dist/utils/path.js.map +1 -1
- package/dist/utils/promise.d.ts +10 -0
- package/dist/utils/promise.d.ts.map +1 -1
- package/dist/utils/promise.js +26 -3
- package/dist/utils/promise.js.map +1 -1
- package/dist/utils/promiseCache.d.ts +12 -2
- package/dist/utils/promiseCache.d.ts.map +1 -1
- package/dist/utils/promiseCache.js +80 -50
- package/dist/utils/promiseCache.js.map +1 -1
- package/dist/utils/searchTree.d.ts.map +1 -1
- package/dist/utils/searchTree.js +4 -1
- package/dist/utils/searchTree.js.map +1 -1
- package/dist/utils/stopwatch.d.ts.map +1 -1
- package/dist/utils/string.js +1 -1
- package/dist/utils/string.js.map +1 -1
- package/dist/utils/subscriptionManager.d.ts.map +1 -1
- package/dist/utils/subscriptionManager.js.map +1 -1
- package/dist/utils/trie.d.ts.map +1 -1
- package/dist/utils/trie.js +1 -0
- package/dist/utils/trie.js.map +1 -1
- package/docs/integrations.md +372 -0
- package/docs/kepler-read-api-parity.md +112 -0
- package/package.json +238 -213
- package/src/git/cache.ts +75 -8
- package/src/git/errors.ts +36 -1
- package/src/git/models/commit.ts +1 -1
- package/src/git/models/graph.ts +147 -0
- package/src/git/models/graphSession.ts +205 -0
- package/src/git/models/issue.ts +12 -1
- package/src/git/models/pullRequest.ts +27 -1
- package/src/git/models/repository.ts +24 -1
- package/src/git/models/resourceDescriptor.ts +17 -0
- package/src/git/models/signature.ts +16 -0
- package/src/git/models/tag.ts +6 -1
- package/src/git/parsers/diffParser.ts +1 -1
- package/src/git/providers/branches.ts +6 -1
- package/src/git/providers/commits.ts +6 -1
- package/src/git/providers/config.ts +5 -1
- package/src/git/providers/graph.ts +69 -2
- package/src/git/providers/status.ts +1 -1
- package/src/git/providers/worktrees.ts +3 -1
- package/src/git/remotes/azure-devops.ts +29 -33
- package/src/git/remotes/bitbucket-server.ts +23 -25
- package/src/git/remotes/bitbucket.ts +23 -25
- package/src/git/remotes/gerrit.ts +12 -14
- package/src/git/remotes/gitea.ts +13 -15
- package/src/git/remotes/github.ts +56 -58
- package/src/git/remotes/gitlab.ts +102 -104
- package/src/git/run.types.ts +54 -4
- package/src/git/utils/branch.utils.ts +12 -1
- package/src/git/utils/contributor.utils.ts +1 -1
- package/src/git/utils/fileStatus.utils.ts +7 -0
- package/src/git/utils/graph.utils.ts +46 -0
- package/src/git/utils/issue.utils.ts +1 -0
- package/src/git/utils/pullRequest.utils.ts +9 -0
- package/src/git/utils/reachability.utils.ts +79 -8
- package/src/git/utils/sshKey.utils.ts +30 -0
- package/src/git/watching/watchService.ts +16 -1
- package/src/git/watching/watchSession.ts +20 -2
- package/src/git-cli/exec/git.ts +144 -42
- package/src/git-cli/parsers/logParser.ts +83 -1
- package/src/git-cli/parsers/sshSignatureParser.ts +85 -0
- package/src/git-cli/parsers/worktreeParser.ts +5 -7
- package/src/git-cli/providers/branches.ts +60 -38
- package/src/git-cli/providers/commits.ts +102 -9
- package/src/git-cli/providers/graph.ts +1771 -393
- package/src/git-cli/providers/pausedOperations.ts +3 -3
- package/src/git-cli/providers/revision.ts +42 -0
- package/src/git-cli/providers/status.ts +333 -178
- package/src/git-cli/providers/tags.ts +2 -0
- package/src/git-cli/providers/worktrees.ts +40 -4
- package/src/git-cli/service.ts +9 -0
- package/src/ipc/ipcServer.ts +1 -1
- package/src/plus/agents/providers/claudeCodeProvider.ts +25 -0
- package/src/plus/agents/providers/claudeCodeTranscript.ts +320 -8
- package/src/plus/agents/types.ts +34 -0
- package/src/plus/ai/constants.ts +1 -9
- package/src/plus/ai/models/model.ts +53 -2
- package/src/plus/ai/models/promptTemplates.ts +9 -2
- package/src/plus/ai/prompts.ts +16 -48
- package/src/plus/ai/providers/anthropicProvider.ts +45 -3
- package/src/plus/ai/providers/deepSeekProvider.ts +17 -1
- package/src/plus/ai/providers/geminiProvider.ts +25 -6
- package/src/plus/ai/providers/gitkrakenProvider.ts +2 -0
- package/src/plus/ai/providers/huggingFaceProvider.ts +28 -21
- package/src/plus/ai/providers/openAICompatibleProviderBase.ts +16 -1
- package/src/plus/ai/providers/xaiProvider.ts +14 -1
- package/src/plus/ai/utils/ai.utils.ts +0 -2
- package/src/plus/ai/utils/results.utils.ts +32 -0
- package/src/plus/ai/utils/truncation.utils.ts +0 -1
- package/src/plus/git-github/api/github.ts +484 -104
- package/src/plus/git-github/models.ts +33 -0
- package/src/plus/git-github/providers/github/branches.ts +6 -3
- package/src/plus/git-github/providers/github/diff.ts +1 -1
- package/src/plus/git-github/providers/github/graph.ts +131 -0
- package/src/plus/git-github/providers/github/tags.ts +2 -0
- package/src/plus/integrations/authentication/cloudIntegrationService.ts +189 -17
- package/src/plus/integrations/authentication/configuredIntegrationService.ts +287 -50
- package/src/plus/integrations/authentication/integrationAuthenticationProvider.ts +105 -31
- package/src/plus/integrations/authentication/integrationAuthenticationService.ts +7 -3
- package/src/plus/integrations/authentication/manualTokenProvider.ts +12 -5
- package/src/plus/integrations/authentication/models.ts +35 -1
- package/src/plus/integrations/collectionMetadata.ts +143 -0
- package/src/plus/integrations/constants.ts +21 -0
- package/src/plus/integrations/context.ts +8 -9
- package/src/plus/integrations/errors.ts +153 -0
- package/src/plus/integrations/index.ts +148 -51
- package/src/plus/integrations/integrationService.ts +940 -49
- package/src/plus/integrations/lite.ts +233 -0
- package/src/plus/integrations/manager.ts +359 -0
- package/src/plus/integrations/models/gitHostIntegration.ts +1005 -134
- package/src/plus/integrations/models/integration.ts +293 -24
- package/src/plus/integrations/models/issuesIntegration.ts +132 -39
- package/src/plus/integrations/providerFilters.ts +12 -0
- package/src/plus/integrations/providers/apiClients.ts +8 -11
- package/src/plus/integrations/providers/apiConfig.ts +71 -0
- package/src/plus/integrations/providers/azure/azure.ts +164 -33
- package/src/plus/integrations/providers/azure/models.ts +19 -6
- package/src/plus/integrations/providers/azureDevOps.ts +766 -101
- package/src/plus/integrations/providers/bitbucket/bitbucket.ts +164 -34
- package/src/plus/integrations/providers/bitbucket-server/models.ts +32 -1
- package/src/plus/integrations/providers/bitbucket-server.ts +173 -8
- package/src/plus/integrations/providers/bitbucket.ts +489 -45
- package/src/plus/integrations/providers/github/github.ts +2 -2
- package/src/plus/integrations/providers/github/github.utils.ts +1 -1
- package/src/plus/integrations/providers/github.ts +390 -6
- package/src/plus/integrations/providers/gitlab/gitlab.ts +170 -60
- package/src/plus/integrations/providers/gitlab/gitlab.utils.ts +9 -0
- package/src/plus/integrations/providers/gitlab/models.ts +19 -5
- package/src/plus/integrations/providers/gitlab.ts +369 -10
- package/src/plus/integrations/providers/jira.ts +247 -42
- package/src/plus/integrations/providers/linear.ts +154 -27
- package/src/plus/integrations/providers/models.ts +583 -75
- package/src/plus/integrations/providers/providersApi.ts +849 -86
- package/src/plus/integrations/providers/trello.ts +205 -0
- package/src/plus/integrations/providers/utils/providerPaging.ts +177 -0
- package/src/plus/integrations/providers/utils.ts +68 -8
- package/src/plus/integrations/reads/broaden.ts +452 -0
- package/src/plus/integrations/reads/context.ts +99 -0
- package/src/plus/integrations/reads/cursors.ts +224 -0
- package/src/plus/integrations/reads/drains.ts +343 -0
- package/src/plus/integrations/reads/filters.ts +124 -0
- package/src/plus/integrations/reads/hierarchy.ts +473 -0
- package/src/plus/integrations/reads/hierarchy.utils.ts +155 -0
- package/src/plus/integrations/reads/issueTracker.ts +468 -0
- package/src/plus/integrations/reads/issues.ts +409 -0
- package/src/plus/integrations/reads/paging.ts +277 -0
- package/src/plus/integrations/reads/pullRequests.ts +260 -0
- package/src/plus/integrations/reads/resolveRepository.ts +272 -0
- package/src/plus/integrations/reads/sweeps.ts +185 -0
- package/src/plus/integrations/reads/warnings.ts +170 -0
- package/src/plus/integrations/results.ts +275 -0
- package/src/plus/integrations/utils/domain.utils.ts +26 -0
- package/src/plus/integrations/utils/integration.utils.ts +93 -16
- package/src/utils/brand.ts +0 -2
- package/src/utils/cancellation.ts +56 -7
- package/src/utils/coalescedRun.ts +45 -0
- package/src/utils/color.ts +3 -3
- package/src/utils/date.ts +72 -0
- package/src/utils/debounce.ts +1 -1
- package/src/utils/decorators/gate.ts +2 -2
- package/src/utils/decorators/log.ts +5 -5
- package/src/utils/decorators/memoize.ts +2 -2
- package/src/utils/decorators/sequentialize.ts +2 -2
- package/src/utils/decorators/serializable.ts +1 -1
- package/src/utils/env/node/exec.ts +20 -5
- package/src/utils/event.ts +19 -25
- package/src/utils/function.ts +3 -3
- package/src/utils/iterable.ts +2 -6
- package/src/utils/logger.scoped.ts +1 -1
- package/src/utils/logger.ts +1 -1
- package/src/utils/paging.ts +46 -0
- package/src/utils/promise.ts +33 -3
- package/src/utils/promiseCache.ts +81 -51
- package/src/utils/searchTree.ts +4 -2
- package/src/utils/string.ts +1 -1
- package/src/utils/trie.ts +1 -0
- package/dist/plus/ai/providers/githubModelsProvider.d.ts +0 -19
- package/dist/plus/ai/providers/githubModelsProvider.d.ts.map +0 -1
- package/dist/plus/ai/providers/githubModelsProvider.js +0 -51
- package/dist/plus/ai/providers/githubModelsProvider.js.map +0 -1
- package/src/plus/ai/providers/githubModelsProvider.ts +0 -92
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import type { IntegrationIds } from '../constants.js';
|
|
2
|
+
import { toPageCursor } from '../providers/utils/providerPaging.js';
|
|
3
|
+
import { hostFromDomain } from '../utils/domain.utils.js';
|
|
4
|
+
import { pageToCursor } from './paging.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The COMPOSITE cursors, for the two reads a single provider cursor can't address.
|
|
8
|
+
*
|
|
9
|
+
* A plain paged read threads the provider's own opaque continuation. These two fan out instead — the
|
|
10
|
+
* issue-tracker read over a window of projects, the broaden read over a set of orgs — so one round produces
|
|
11
|
+
* several provider positions plus the bookkeeping needed to resume: which scopes failed and should be retried,
|
|
12
|
+
* and which are already drained and must NOT be re-read (a cursor-only provider handed a fresh page-1 request
|
|
13
|
+
* answers with its first page again, duplicating items).
|
|
14
|
+
*
|
|
15
|
+
* Both encodings are opaque to consumers and are parsed defensively: a cursor is caller-supplied data that may
|
|
16
|
+
* be stale, truncated, or from another read entirely, so anything unrecognized degrades to "no cursor" (which
|
|
17
|
+
* falls back to page paging) rather than throwing or being forwarded to a provider as a foreign string.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
// ---------------------------------------------------------------------------------------------------------
|
|
21
|
+
// Issue-tracker page cursor (Jira/Linear/Trello: resource → project, paginated by a window of PROJECTS)
|
|
22
|
+
// ---------------------------------------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
export interface IssueTrackerPageCursor {
|
|
25
|
+
type: 'issue-tracker-page';
|
|
26
|
+
currentPage: number;
|
|
27
|
+
unpaged?: boolean;
|
|
28
|
+
nextPage?: number;
|
|
29
|
+
retryPages?: number[];
|
|
30
|
+
retryProjects?: string[];
|
|
31
|
+
completedProjects?: string[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Positive safe integers only, deduped; `undefined` when nothing survives (so the field is omitted). */
|
|
35
|
+
function positiveIntegers(values: unknown): number[] | undefined {
|
|
36
|
+
if (!Array.isArray(values)) return undefined;
|
|
37
|
+
|
|
38
|
+
const valid = values.filter(
|
|
39
|
+
(value): value is number => typeof value === 'number' && Number.isSafeInteger(value) && value > 0,
|
|
40
|
+
);
|
|
41
|
+
return valid.length > 0 ? [...new Set(valid)] : undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Non-empty strings only, deduped; `undefined` when nothing survives (so the field is omitted). */
|
|
45
|
+
function nonEmptyStrings(values: unknown): string[] | undefined {
|
|
46
|
+
if (!Array.isArray(values)) return undefined;
|
|
47
|
+
|
|
48
|
+
const valid = values.filter((value): value is string => typeof value === 'string' && value.length > 0);
|
|
49
|
+
return valid.length > 0 ? [...new Set(valid)] : undefined;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function parseIssueTrackerPageCursor(cursor: string | undefined): IssueTrackerPageCursor | undefined {
|
|
53
|
+
if (cursor == null) return undefined;
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
const parsed = JSON.parse(cursor) as Partial<IssueTrackerPageCursor>;
|
|
57
|
+
if (
|
|
58
|
+
parsed.type !== 'issue-tracker-page' ||
|
|
59
|
+
typeof parsed.currentPage !== 'number' ||
|
|
60
|
+
!Number.isSafeInteger(parsed.currentPage) ||
|
|
61
|
+
parsed.currentPage < 1
|
|
62
|
+
) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const retryPages = positiveIntegers(parsed.retryPages);
|
|
67
|
+
const retryProjects = nonEmptyStrings(parsed.retryProjects);
|
|
68
|
+
const completedProjects = nonEmptyStrings(parsed.completedProjects);
|
|
69
|
+
return {
|
|
70
|
+
type: 'issue-tracker-page',
|
|
71
|
+
currentPage: parsed.currentPage,
|
|
72
|
+
...(parsed.unpaged === true ? { unpaged: true } : {}),
|
|
73
|
+
...(typeof parsed.nextPage === 'number' && Number.isSafeInteger(parsed.nextPage) && parsed.nextPage > 0
|
|
74
|
+
? { nextPage: parsed.nextPage }
|
|
75
|
+
: {}),
|
|
76
|
+
...(retryPages != null ? { retryPages: retryPages } : {}),
|
|
77
|
+
...(retryProjects != null ? { retryProjects: retryProjects } : {}),
|
|
78
|
+
...(completedProjects != null ? { completedProjects: completedProjects } : {}),
|
|
79
|
+
};
|
|
80
|
+
} catch {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function toIssueTrackerPageCursor(options: {
|
|
86
|
+
currentPage: number;
|
|
87
|
+
unpaged?: boolean;
|
|
88
|
+
nextPage?: number;
|
|
89
|
+
retryPages: readonly number[];
|
|
90
|
+
retryProjects: readonly string[];
|
|
91
|
+
completedProjects?: readonly string[];
|
|
92
|
+
}): string | undefined {
|
|
93
|
+
const retryPages = [...new Set(options.retryPages)].sort((a, b) => a - b);
|
|
94
|
+
const retryProjects = [...new Set(options.retryProjects)].sort();
|
|
95
|
+
const completedProjects =
|
|
96
|
+
retryPages.length > 0 || retryProjects.length > 0 || options.nextPage != null
|
|
97
|
+
? [...new Set(options.completedProjects ?? [])].sort()
|
|
98
|
+
: [];
|
|
99
|
+
if (retryPages.length === 0 && retryProjects.length === 0 && options.nextPage == null) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
// Nothing to carry beyond the next window: emit the plain page cursor instead of a composite one, so an
|
|
103
|
+
// ordinary forward read round-trips through the same encoding every other paged read uses.
|
|
104
|
+
if (
|
|
105
|
+
retryPages.length === 0 &&
|
|
106
|
+
retryProjects.length === 0 &&
|
|
107
|
+
completedProjects.length === 0 &&
|
|
108
|
+
options.nextPage != null &&
|
|
109
|
+
options.unpaged !== true
|
|
110
|
+
) {
|
|
111
|
+
return toPageCursor(options.nextPage);
|
|
112
|
+
}
|
|
113
|
+
return JSON.stringify({
|
|
114
|
+
type: 'issue-tracker-page',
|
|
115
|
+
currentPage: options.currentPage,
|
|
116
|
+
...(options.unpaged === true ? { unpaged: true } : {}),
|
|
117
|
+
...(options.nextPage != null ? { nextPage: options.nextPage } : {}),
|
|
118
|
+
...(retryPages.length > 0 ? { retryPages: retryPages } : {}),
|
|
119
|
+
...(retryProjects.length > 0 ? { retryProjects: retryProjects } : {}),
|
|
120
|
+
...(completedProjects.length > 0 ? { completedProjects: completedProjects } : {}),
|
|
121
|
+
} satisfies IssueTrackerPageCursor);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// ---------------------------------------------------------------------------------------------------------
|
|
125
|
+
// Broaden-issues cursor bundle (one provider position per org in the fan-out)
|
|
126
|
+
// ---------------------------------------------------------------------------------------------------------
|
|
127
|
+
|
|
128
|
+
/** Identifies one org slice of the fan-out. Connection and domain are part of the key: two accounts, or two
|
|
129
|
+
* self-managed hosts, can each have an org of the same name. */
|
|
130
|
+
export interface BroadenIssuesOrgKey {
|
|
131
|
+
providerId: IntegrationIds;
|
|
132
|
+
name: string;
|
|
133
|
+
connectionId?: string;
|
|
134
|
+
domain?: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** One org's position in the bundle: either the provider's own cursor, or a page to retry after a failure. */
|
|
138
|
+
export interface BroadenIssuesOrgCursor {
|
|
139
|
+
providerId: IntegrationIds;
|
|
140
|
+
org: string;
|
|
141
|
+
connectionId?: string;
|
|
142
|
+
domain?: string;
|
|
143
|
+
cursor?: string;
|
|
144
|
+
retryPage?: number;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type BroadenIssuesExhaustedOrg = Omit<BroadenIssuesOrgCursor, 'cursor' | 'retryPage'>;
|
|
148
|
+
|
|
149
|
+
/** Whether a bundle entry addresses the same org slice as `org`, comparing domains by host. */
|
|
150
|
+
function matchesOrg(
|
|
151
|
+
entry: { providerId?: IntegrationIds; org?: string; connectionId?: string; domain?: string },
|
|
152
|
+
org: BroadenIssuesOrgKey,
|
|
153
|
+
): boolean {
|
|
154
|
+
return (
|
|
155
|
+
entry.providerId === org.providerId &&
|
|
156
|
+
entry.org === org.name &&
|
|
157
|
+
entry.connectionId === org.connectionId &&
|
|
158
|
+
(hostFromDomain(entry.domain) ?? entry.domain) === (hostFromDomain(org.domain) ?? org.domain)
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The cursor to send for one org in this round: its entry in the bundle, or a synthesized page cursor.
|
|
164
|
+
*
|
|
165
|
+
* A single-org fan-out has no bundle to key into — its cursor IS the provider's, threaded straight through.
|
|
166
|
+
*/
|
|
167
|
+
export function getBroadenIssuesCursor(
|
|
168
|
+
cursor: string | undefined,
|
|
169
|
+
org: BroadenIssuesOrgKey,
|
|
170
|
+
page: number,
|
|
171
|
+
orgCount: number,
|
|
172
|
+
): string | undefined {
|
|
173
|
+
if (orgCount === 1) return cursor ?? pageToCursor(page);
|
|
174
|
+
|
|
175
|
+
if (cursor != null) {
|
|
176
|
+
try {
|
|
177
|
+
const parsed = JSON.parse(cursor) as { cursors?: BroadenIssuesOrgCursor[] };
|
|
178
|
+
const match = parsed.cursors?.find(c => matchesOrg(c, org));
|
|
179
|
+
if (match?.cursor != null) return match.cursor;
|
|
180
|
+
if (typeof match?.retryPage === 'number' && Number.isSafeInteger(match.retryPage) && match.retryPage > 0) {
|
|
181
|
+
return toPageCursor(match.retryPage);
|
|
182
|
+
}
|
|
183
|
+
} catch {}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return pageToCursor(page);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Whether a prior round already drained this org (multi-org fan-out only). Once an org runs out of pages while
|
|
191
|
+
* another org keeps paging, the bundle records it as exhausted so the next round skips it instead of re-issuing
|
|
192
|
+
* a page-1 read — which cursor-only providers (having no page-number cursor to honor) would answer with their
|
|
193
|
+
* first page again, duplicating results.
|
|
194
|
+
*/
|
|
195
|
+
export function isBroadenIssuesOrgExhausted(
|
|
196
|
+
cursor: string | undefined,
|
|
197
|
+
org: BroadenIssuesOrgKey,
|
|
198
|
+
orgCount: number,
|
|
199
|
+
): boolean {
|
|
200
|
+
if (orgCount === 1 || cursor == null) return false;
|
|
201
|
+
|
|
202
|
+
try {
|
|
203
|
+
const parsed = JSON.parse(cursor) as { exhausted?: BroadenIssuesExhaustedOrg[] };
|
|
204
|
+
return parsed.exhausted?.some(e => matchesOrg(e, org)) ?? false;
|
|
205
|
+
} catch {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/** Encodes the round's per-org positions. A single-org fan-out emits that org's cursor directly, unwrapped. */
|
|
211
|
+
export function toBroadenIssuesCursor(
|
|
212
|
+
cursors: BroadenIssuesOrgCursor[],
|
|
213
|
+
exhausted: BroadenIssuesExhaustedOrg[],
|
|
214
|
+
orgCount: number,
|
|
215
|
+
): string | undefined {
|
|
216
|
+
if (cursors.length === 0) return undefined;
|
|
217
|
+
if (orgCount === 1) {
|
|
218
|
+
return cursors[0].cursor ?? (cursors[0].retryPage != null ? toPageCursor(cursors[0].retryPage) : undefined);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Carry the exhausted orgs alongside the still-active cursors so the next round can skip them (see
|
|
222
|
+
// isBroadenIssuesOrgExhausted). Only meaningful while at least one org still has more to read.
|
|
223
|
+
return JSON.stringify({ cursors: cursors, exhausted: exhausted });
|
|
224
|
+
}
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import type { PullRequestStateFilter } from '../../../git/models/pullRequest.js';
|
|
2
|
+
import { mergeAssessmentInto } from '../collectionMetadata.js';
|
|
3
|
+
import type { IntegrationIds } from '../constants.js';
|
|
4
|
+
import { supportedOrderedCloudIntegrationIds } from '../constants.js';
|
|
5
|
+
import type { ProviderSweepTarget, PullRequestSweepOptions } from '../manager.js';
|
|
6
|
+
import type { GitHostIntegration } from '../models/gitHostIntegration.js';
|
|
7
|
+
import type { IntegrationResult } from '../models/integration.js';
|
|
8
|
+
import type { PullRequestFilter } from '../providerFilters.js';
|
|
9
|
+
import type { ProviderPullRequest, ProviderReposInput, ProviderRepository } from '../providers/models.js';
|
|
10
|
+
import { getProviderPullRequestIdentity } from '../providers/models.js';
|
|
11
|
+
import type { ProviderWarning } from '../results.js';
|
|
12
|
+
import { appendDedupedWarning, toProviderWarning } from '../results.js';
|
|
13
|
+
import { isIssuesHostIntegrationId } from '../utils/integration.utils.js';
|
|
14
|
+
import { noConnectionWarning, truncationWarning } from './warnings.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The all-pages reads: a provider read run repeatedly until it runs out of pages, as opposed to the single-page
|
|
18
|
+
* reads the facade's paged surface exposes. `sweepPullRequests` and `broadenIssues` are built on these.
|
|
19
|
+
*
|
|
20
|
+
* A drain's job is to keep going where a single page would stop, so what distinguishes it is its failure
|
|
21
|
+
* bookkeeping rather than its loop: it must return the prefix it did read plus enough signal for the caller to
|
|
22
|
+
* know the result is not authoritative — `truncated` when pages remain unread (a page backstop, or a provider
|
|
23
|
+
* claiming another page while handing back no usable cursor), `fetchFailed` when a page or scope failed
|
|
24
|
+
* outright. Discarding the prefix on a late failure, or returning it as if complete, are the two mistakes these
|
|
25
|
+
* exist to prevent.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Runs a result-returning read and captures failure as a neutral {@link ProviderWarning} rather than
|
|
30
|
+
* letting it throw or silently vanish. Handles both a returned `{ error }` (the read cores' contract)
|
|
31
|
+
* and a hard throw; a soft warning (`{ value, error }`) yields the value *and* a warning.
|
|
32
|
+
*/
|
|
33
|
+
export async function runCaptured<T>(
|
|
34
|
+
id: IntegrationIds,
|
|
35
|
+
domain: string | undefined,
|
|
36
|
+
connectionId: string | undefined,
|
|
37
|
+
fn: () => Promise<IntegrationResult<T>>,
|
|
38
|
+
options?: { warnOnMissingSession?: boolean },
|
|
39
|
+
): Promise<{ value?: T; warning?: ProviderWarning }> {
|
|
40
|
+
try {
|
|
41
|
+
const result = await fn();
|
|
42
|
+
if (result == null) {
|
|
43
|
+
// The read core returns undefined only when it couldn't resolve a session. For a per-connection
|
|
44
|
+
// or explicit-domain read that means the requested target is gone or its authentication is invalid,
|
|
45
|
+
// which must not be reported as an empty account. The untargeted primary path legitimately yields
|
|
46
|
+
// nothing when the provider isn't connected, so leave it as an empty result.
|
|
47
|
+
return connectionId != null || options?.warnOnMissingSession
|
|
48
|
+
? { warning: noConnectionWarning(id, domain, connectionId) }
|
|
49
|
+
: {};
|
|
50
|
+
}
|
|
51
|
+
if (result.error != null) {
|
|
52
|
+
return { value: result.value, warning: toProviderWarning(id, domain, connectionId, result.error) };
|
|
53
|
+
}
|
|
54
|
+
return { value: result.value };
|
|
55
|
+
} catch (ex) {
|
|
56
|
+
return { warning: toProviderWarning(id, domain, connectionId, ex) };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Drains every page of the user's pull requests for one git-host integration, threading the opaque
|
|
62
|
+
* next-cursor the provider returns (so it works for both page- and cursor-based hosts). Stops at
|
|
63
|
+
* `maxPages` (marking `truncated`) or on a hard read failure (marking `fetchFailed`), keeping the
|
|
64
|
+
* pages fetched so far. A soft warning (`{ value, error }`) is recorded but the drain continues.
|
|
65
|
+
*/
|
|
66
|
+
export async function drainPullRequests(
|
|
67
|
+
integration: GitHostIntegration,
|
|
68
|
+
id: IntegrationIds,
|
|
69
|
+
domain: string | undefined,
|
|
70
|
+
repos: ProviderReposInput,
|
|
71
|
+
state: PullRequestStateFilter[] | undefined,
|
|
72
|
+
filters: PullRequestFilter[] | undefined,
|
|
73
|
+
includeReviewRequested: boolean,
|
|
74
|
+
connectionId: string | undefined,
|
|
75
|
+
maxPages: number,
|
|
76
|
+
attributeUnavailableProvider: boolean,
|
|
77
|
+
): Promise<{
|
|
78
|
+
items: ProviderPullRequest[];
|
|
79
|
+
warnings: ProviderWarning[];
|
|
80
|
+
fetchFailed: boolean;
|
|
81
|
+
truncated: boolean;
|
|
82
|
+
failedProvider: boolean;
|
|
83
|
+
}> {
|
|
84
|
+
const items: ProviderPullRequest[] = [];
|
|
85
|
+
const itemIndexByIdentity = new Map<string, number>();
|
|
86
|
+
const warnings: ProviderWarning[] = [];
|
|
87
|
+
let cursor: string | undefined;
|
|
88
|
+
let page = 0;
|
|
89
|
+
// SDK metadata failures across pages mean the collection is incomplete even when no page threw; carry
|
|
90
|
+
// this through the terminal returns instead of resetting it to false at the last page.
|
|
91
|
+
let fetchFailed = false;
|
|
92
|
+
let truncated = false;
|
|
93
|
+
|
|
94
|
+
// With no repos this is an account-wide "my PRs" sweep. The repo-scoped core rejects an empty `repos`
|
|
95
|
+
// input, so read the provider-native account-wide core instead.
|
|
96
|
+
const accountWide = repos.length === 0;
|
|
97
|
+
|
|
98
|
+
for (;;) {
|
|
99
|
+
page++;
|
|
100
|
+
// Snapshot the mutable loop cursor so the read closure doesn't capture a later-reassigned value.
|
|
101
|
+
const pageCursor = cursor;
|
|
102
|
+
const { value, warning } = await runCaptured(id, domain, connectionId, () =>
|
|
103
|
+
accountWide
|
|
104
|
+
? integration.getMyPullRequestsForUserResult(
|
|
105
|
+
{
|
|
106
|
+
state: state,
|
|
107
|
+
cursor: pageCursor,
|
|
108
|
+
includeReviewRequested: includeReviewRequested,
|
|
109
|
+
filters: filters,
|
|
110
|
+
summary: true,
|
|
111
|
+
},
|
|
112
|
+
connectionId,
|
|
113
|
+
)
|
|
114
|
+
: integration.getMyPullRequestsForReposResult(
|
|
115
|
+
repos,
|
|
116
|
+
{ state: state, filters: filters, cursor: pageCursor },
|
|
117
|
+
connectionId,
|
|
118
|
+
),
|
|
119
|
+
);
|
|
120
|
+
if (warning != null) {
|
|
121
|
+
appendDedupedWarning(warnings, warning);
|
|
122
|
+
}
|
|
123
|
+
if (value == null) {
|
|
124
|
+
// An implicit sweep may silently skip a provider that has no session before it yields data.
|
|
125
|
+
// Once a page has been returned, however, losing that session leaves an unread tail and must
|
|
126
|
+
// be attributed even when the provider wasn't explicitly requested.
|
|
127
|
+
const sessionLostAfterProgress = warning == null && page > 1;
|
|
128
|
+
const unavailable = warning == null && (attributeUnavailableProvider || sessionLostAfterProgress);
|
|
129
|
+
if (unavailable) {
|
|
130
|
+
appendDedupedWarning(warnings, noConnectionWarning(id, domain, connectionId));
|
|
131
|
+
}
|
|
132
|
+
// `warning` set → a hard read failure (incomplete items); otherwise not connected / no session.
|
|
133
|
+
return {
|
|
134
|
+
items: items,
|
|
135
|
+
warnings: warnings,
|
|
136
|
+
fetchFailed: fetchFailed || warning != null || unavailable,
|
|
137
|
+
truncated: truncated || sessionLostAfterProgress,
|
|
138
|
+
// Only a top-level first-page rejection means the provider itself failed. A later-page or
|
|
139
|
+
// per-scope failure still yielded a usable provider slice and stays represented separately.
|
|
140
|
+
failedProvider: page === 1 && (warning != null || unavailable),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Composite account-wide queries can surface the same PR on different relationship/state pages
|
|
145
|
+
// (for example authored + review-requested, or closed + merged). Keep the first stable position but
|
|
146
|
+
// replace its value with the latest representation so a later, richer merged state wins. A provider
|
|
147
|
+
// row without a canonical URL falls back to repository-scoped identity; a row with neither stays
|
|
148
|
+
// unkeyed and is retained so unrelated incomplete rows are never collapsed.
|
|
149
|
+
for (const pullRequest of value.values) {
|
|
150
|
+
const identity = getProviderPullRequestIdentity(pullRequest);
|
|
151
|
+
if (identity == null) {
|
|
152
|
+
items.push(pullRequest);
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const existingIndex = itemIndexByIdentity.get(identity);
|
|
157
|
+
if (existingIndex == null) {
|
|
158
|
+
itemIndexByIdentity.set(identity, items.length);
|
|
159
|
+
items.push(pullRequest);
|
|
160
|
+
} else {
|
|
161
|
+
items[existingIndex] = pullRequest;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Assess this page's SDK metadata: append scope-aware warnings (deduped across pages), and remember
|
|
166
|
+
// whether a structured failure or incompleteness occurred.
|
|
167
|
+
const assessment = mergeAssessmentInto(warnings, id, domain, connectionId, value.metadata);
|
|
168
|
+
fetchFailed = fetchFailed || assessment.fetchFailed;
|
|
169
|
+
const pageTruncated =
|
|
170
|
+
(value as { truncated?: boolean }).truncated === true ||
|
|
171
|
+
value.paging?.truncated === true ||
|
|
172
|
+
assessment.truncated;
|
|
173
|
+
truncated = truncated || pageTruncated;
|
|
174
|
+
if (pageTruncated && !assessment.truncated) {
|
|
175
|
+
appendDedupedWarning(warnings, truncationWarning(id, domain, connectionId, 'Pull request'));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (!(value.paging?.more ?? false)) {
|
|
179
|
+
// A read that can't confirm completeness (single-page provider reads with no `hasNextPage`)
|
|
180
|
+
// sets `paging.truncated`; propagate it (and any top-level `truncated` and SDK incompleteness)
|
|
181
|
+
// so the sweep doesn't claim an all-pages result.
|
|
182
|
+
return {
|
|
183
|
+
items: items,
|
|
184
|
+
warnings: warnings,
|
|
185
|
+
fetchFailed: fetchFailed,
|
|
186
|
+
truncated: truncated,
|
|
187
|
+
failedProvider: false,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
if (page >= maxPages) {
|
|
191
|
+
appendDedupedWarning(warnings, truncationWarning(id, domain, connectionId, 'Pull request'));
|
|
192
|
+
return {
|
|
193
|
+
items: items,
|
|
194
|
+
warnings: warnings,
|
|
195
|
+
fetchFailed: fetchFailed,
|
|
196
|
+
truncated: true,
|
|
197
|
+
failedProvider: false,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const nextCursor = value.paging?.cursor;
|
|
202
|
+
if (nextCursor == null || nextCursor === '{}') {
|
|
203
|
+
// Provider says there is more but didn't return a usable cursor; stop rather than refetch the same page.
|
|
204
|
+
appendDedupedWarning(warnings, truncationWarning(id, domain, connectionId, 'Pull request'));
|
|
205
|
+
return {
|
|
206
|
+
items: items,
|
|
207
|
+
warnings: warnings,
|
|
208
|
+
fetchFailed: fetchFailed,
|
|
209
|
+
truncated: true,
|
|
210
|
+
failedProvider: false,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
cursor = nextCursor;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Drains every page of repositories under an org for one git-host integration, threading the opaque
|
|
220
|
+
* next-cursor the provider returns. Stops at `maxPages` (marking `truncated`) or on a hard read failure
|
|
221
|
+
* (marking `fetchFailed`), keeping the pages fetched so far.
|
|
222
|
+
*/
|
|
223
|
+
export async function drainRepositories(
|
|
224
|
+
integration: GitHostIntegration,
|
|
225
|
+
id: IntegrationIds,
|
|
226
|
+
domain: string | undefined,
|
|
227
|
+
org: string,
|
|
228
|
+
project: string | undefined,
|
|
229
|
+
connectionId: string | undefined,
|
|
230
|
+
maxPages: number,
|
|
231
|
+
): Promise<{
|
|
232
|
+
repos: ProviderRepository[];
|
|
233
|
+
warnings: ProviderWarning[];
|
|
234
|
+
fetchFailed: boolean;
|
|
235
|
+
truncated: boolean;
|
|
236
|
+
}> {
|
|
237
|
+
const repos: ProviderRepository[] = [];
|
|
238
|
+
const warnings: ProviderWarning[] = [];
|
|
239
|
+
let fetchFailed = false;
|
|
240
|
+
let truncated = false;
|
|
241
|
+
let cursor: string | undefined;
|
|
242
|
+
let page = 0;
|
|
243
|
+
|
|
244
|
+
for (;;) {
|
|
245
|
+
page++;
|
|
246
|
+
const pageCursor = cursor;
|
|
247
|
+
const { value, warning } = await runCaptured(
|
|
248
|
+
id,
|
|
249
|
+
domain,
|
|
250
|
+
connectionId,
|
|
251
|
+
() =>
|
|
252
|
+
integration.getRepositoriesForOrgResult(org, {
|
|
253
|
+
project: project,
|
|
254
|
+
cursor: pageCursor,
|
|
255
|
+
connectionId: connectionId,
|
|
256
|
+
}),
|
|
257
|
+
{ warnOnMissingSession: true },
|
|
258
|
+
);
|
|
259
|
+
if (warning != null) {
|
|
260
|
+
warnings.push(warning);
|
|
261
|
+
}
|
|
262
|
+
if (value == null) {
|
|
263
|
+
const interruptedAfterProgress = page > 1;
|
|
264
|
+
if (interruptedAfterProgress && warning == null) {
|
|
265
|
+
appendDedupedWarning(warnings, truncationWarning(id, domain, connectionId, 'Repository'));
|
|
266
|
+
}
|
|
267
|
+
return {
|
|
268
|
+
repos: repos,
|
|
269
|
+
warnings: warnings,
|
|
270
|
+
fetchFailed: fetchFailed || warning != null || interruptedAfterProgress,
|
|
271
|
+
truncated: truncated || interruptedAfterProgress,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
repos.push(...value.values);
|
|
276
|
+
const assessment = mergeAssessmentInto(warnings, id, domain, connectionId, value.metadata);
|
|
277
|
+
fetchFailed = fetchFailed || assessment.fetchFailed;
|
|
278
|
+
truncated = truncated || value.truncated === true || value.paging?.truncated === true || assessment.truncated;
|
|
279
|
+
if (!(value.paging?.more ?? false)) {
|
|
280
|
+
return {
|
|
281
|
+
repos: repos,
|
|
282
|
+
warnings: warnings,
|
|
283
|
+
fetchFailed: fetchFailed,
|
|
284
|
+
truncated: truncated,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
if (page >= maxPages) {
|
|
288
|
+
return { repos: repos, warnings: warnings, fetchFailed: fetchFailed, truncated: true };
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const nextCursor = value.paging?.cursor;
|
|
292
|
+
if (nextCursor == null || nextCursor === '{}') {
|
|
293
|
+
// Provider says there is more but didn't return a usable cursor; stop rather than refetch the same page.
|
|
294
|
+
return { repos: repos, warnings: warnings, fetchFailed: fetchFailed, truncated: true };
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
cursor = nextCursor;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export function resolvePullRequestSweepTargets(options: PullRequestSweepOptions | undefined): {
|
|
302
|
+
targets: readonly ProviderSweepTarget[];
|
|
303
|
+
attributeUnavailableProviders: boolean;
|
|
304
|
+
} {
|
|
305
|
+
if (options?.targets != null) {
|
|
306
|
+
if (options.providerIds != null || options.connectionId != null) {
|
|
307
|
+
throw new TypeError("Pull request sweep 'targets' cannot be combined with 'providerIds' or 'connectionId'");
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
const seenProviderIds = new Set<IntegrationIds>();
|
|
311
|
+
for (const target of options.targets) {
|
|
312
|
+
if (seenProviderIds.has(target.providerId)) {
|
|
313
|
+
throw new TypeError(
|
|
314
|
+
`Pull request sweep targets must contain at most one target per provider; duplicate '${target.providerId}'`,
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
seenProviderIds.add(target.providerId);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
return { targets: options.targets, attributeUnavailableProviders: true };
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const providerIds =
|
|
325
|
+
options?.providerIds ?? supportedOrderedCloudIntegrationIds.filter(id => !isIssuesHostIntegrationId(id));
|
|
326
|
+
const connectionId = providerIds.length === 1 ? options?.connectionId : undefined;
|
|
327
|
+
return {
|
|
328
|
+
targets: providerIds.map(providerId => ({ providerId: providerId, connectionId: connectionId })),
|
|
329
|
+
attributeUnavailableProviders: options?.providerIds != null,
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export async function getCurrentAccountId(
|
|
334
|
+
integration: GitHostIntegration,
|
|
335
|
+
connectionId: string | undefined,
|
|
336
|
+
): Promise<string | undefined> {
|
|
337
|
+
try {
|
|
338
|
+
return (await integration.getCurrentAccount({ connectionId: connectionId }))?.id;
|
|
339
|
+
} catch {
|
|
340
|
+
// Authorship is optional enrichment; don't turn a successful PR read into a failure if identity lookup fails.
|
|
341
|
+
return undefined;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { IntegrationIds } from '../constants.js';
|
|
2
|
+
import type { IssueFilter, PullRequestFilter } from '../providerFilters.js';
|
|
3
|
+
import { providersMetadata } from '../providers/models.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Validation of a caller-supplied relationship filter set against what a provider can express server-side.
|
|
7
|
+
*
|
|
8
|
+
* Every one of these is ALL-OR-NOTHING, and deliberately so: dropping the members a provider can't express
|
|
9
|
+
* would silently widen the read past what was asked for (requesting Author+Mention on a host without Mention
|
|
10
|
+
* would return every authored item rather than the requested set), and narrowing the returned page afterward
|
|
11
|
+
* would leave `items` describing a different result set than the `hasMore`/`cursor` the provider produced with
|
|
12
|
+
* it. So an inexpressible set is refused whole, and the caller surfaces a warning instead of reading unfiltered.
|
|
13
|
+
*
|
|
14
|
+
* The three differ only in WHICH capability they check, because they govern three different provider queries —
|
|
15
|
+
* see `IntegrationManager.getSupportedFilters`, which exposes the same capability table so a consumer can
|
|
16
|
+
* intersect against it and never reach a refusal.
|
|
17
|
+
*/
|
|
18
|
+
export interface ResolvedFilters<T> {
|
|
19
|
+
filters?: T[];
|
|
20
|
+
unsupported: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Validates a repo-scoped PR filter set, so an unsupported filter never trips the read core's "Unsupported
|
|
25
|
+
* filters" guard. `unsupported: true` when the caller DID request filters and the provider can't express even
|
|
26
|
+
* ONE of them — the exact negation of the read core's `providerSupportsPullRequestFilters` (`every`), so this
|
|
27
|
+
* can only ever pre-empt that guard, never disagree with it.
|
|
28
|
+
*
|
|
29
|
+
* Returns `{ filters }` (possibly undefined when none were requested — an unfiltered read is intended). Genuine
|
|
30
|
+
* "my pull requests" self-scoping is delivered by the account-wide path
|
|
31
|
+
* (`GitHostIntegration.getMyPullRequestsForUserResult`); this only governs the optional repo-scoped narrowing.
|
|
32
|
+
*/
|
|
33
|
+
export function resolvePullRequestFilters(
|
|
34
|
+
id: IntegrationIds,
|
|
35
|
+
filters: PullRequestFilter[] | undefined,
|
|
36
|
+
): ResolvedFilters<PullRequestFilter> {
|
|
37
|
+
if (filters == null || filters.length === 0) return { unsupported: false };
|
|
38
|
+
|
|
39
|
+
const supported = providersMetadata[id]?.supportedPullRequestFilters;
|
|
40
|
+
if (supported == null || filters.some(f => !supported.includes(f))) return { unsupported: true };
|
|
41
|
+
|
|
42
|
+
return { filters: filters, unsupported: false };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Validates an account-wide PR relationship union independently from the repo-scoped capability. Dropping an
|
|
47
|
+
* unsupported member would change the requested OR set, so validation is all-or-nothing.
|
|
48
|
+
*/
|
|
49
|
+
export function resolveAccountWidePullRequestFilters(
|
|
50
|
+
id: IntegrationIds,
|
|
51
|
+
filters: PullRequestFilter[] | undefined,
|
|
52
|
+
): ResolvedFilters<PullRequestFilter> {
|
|
53
|
+
if (filters == null || filters.length === 0) return { unsupported: false };
|
|
54
|
+
|
|
55
|
+
const supported = providersMetadata[id]?.supportedAccountWidePullRequestFilters;
|
|
56
|
+
if (supported == null || filters.some(f => !supported.includes(f))) return { unsupported: true };
|
|
57
|
+
|
|
58
|
+
return { filters: [...new Set(filters)], unsupported: false };
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Validates a caller-provided issue filter set against what the provider's ACCOUNT-WIDE issue read can express
|
|
63
|
+
* server-side (`ProviderMetadata.supportedAccountWideIssueFilters`), which is a different — usually narrower —
|
|
64
|
+
* set than the repo-scoped `ProviderMetadata.supportedIssueFilters`.
|
|
65
|
+
*
|
|
66
|
+
* Dropping the unexpressible members would silently widen the read back toward the provider's own union
|
|
67
|
+
* (authored ∪ assigned ∪ mentioned for GitHub), which is the opposite of what a caller narrowing to
|
|
68
|
+
* `[Assignee]` asked for.
|
|
69
|
+
*/
|
|
70
|
+
export function resolveAccountWideIssueFilters(
|
|
71
|
+
id: IntegrationIds,
|
|
72
|
+
filters: IssueFilter[] | undefined,
|
|
73
|
+
): ResolvedFilters<IssueFilter> {
|
|
74
|
+
if (filters == null || filters.length === 0) return { unsupported: false };
|
|
75
|
+
|
|
76
|
+
const supported = providersMetadata[id]?.supportedAccountWideIssueFilters;
|
|
77
|
+
if (supported == null || filters.some(f => !supported.includes(f))) return { unsupported: true };
|
|
78
|
+
|
|
79
|
+
return { filters: filters, unsupported: false };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The filters `listPullRequestsPage`/`listIssuesPage` (and the sweeps) accept for a provider, so a caller can
|
|
84
|
+
* narrow to what the provider can express BEFORE issuing the read.
|
|
85
|
+
*
|
|
86
|
+
* This matters because the filter contract is all-or-nothing: a set containing even one unsupported filter is
|
|
87
|
+
* refused outright ({@link resolvePullRequestFilters}) rather than silently narrowed, since falling through to
|
|
88
|
+
* an unfiltered fetch would return every PR instead of the user's. Without this accessor a consumer had to
|
|
89
|
+
* hardcode its own copy of the table — reachable only by importing the internal `providers/models.js`
|
|
90
|
+
* subpath — and a copy that drifts turns a supported read into an empty page with `fetchFailed`.
|
|
91
|
+
*
|
|
92
|
+
* Empty means "no filter of that kind is expressible": either the provider has no such surface (issue trackers
|
|
93
|
+
* have no pull requests; Bitbucket exposes no issues) or its metadata declares none. Callers should treat it as
|
|
94
|
+
* "don't pass filters", not as an error. Returns copies, so mutating the result can't corrupt the metadata.
|
|
95
|
+
*
|
|
96
|
+
* `issues` and `issuesAccountWide` are separate because the repo-scoped and account-wide issue reads are
|
|
97
|
+
* different provider queries with different filter surfaces, and the same `filters` input is validated against
|
|
98
|
+
* whichever one the read uses (`repos` present or not). `issuesAccountWide` is generally the narrower of the
|
|
99
|
+
* two: GitLab, for instance, can express `Assignee` and `Author` account-wide, but not `Mention`.
|
|
100
|
+
*
|
|
101
|
+
* That split describes the GIT-HOST reads only. An issue tracker (Jira/Linear/Trello) has neither — its issues
|
|
102
|
+
* live under resource → project — so it reports its filters under `issues`, which is what
|
|
103
|
+
* {@link IntegrationService.listIssueTrackerIssuesPage} validates against, and leaves `issuesAccountWide`
|
|
104
|
+
* empty. Reading a tracker's capability off `issuesAccountWide` therefore under-reports it.
|
|
105
|
+
*
|
|
106
|
+
* Note this is a CAPABILITY table — "what the provider can express" — not a recommendation. A consumer
|
|
107
|
+
* matching another tool's behavior may deliberately pass fewer filters than are listed here (or none, where an
|
|
108
|
+
* already-scoped read would only be narrowed by them). Intersecting against this table is what keeps a
|
|
109
|
+
* filtered read from being refused; it isn't a directive to use every filter in it.
|
|
110
|
+
*/
|
|
111
|
+
export function getSupportedFilters(providerId: IntegrationIds): {
|
|
112
|
+
pullRequests: PullRequestFilter[];
|
|
113
|
+
pullRequestsAccountWide: PullRequestFilter[];
|
|
114
|
+
issues: IssueFilter[];
|
|
115
|
+
issuesAccountWide: IssueFilter[];
|
|
116
|
+
} {
|
|
117
|
+
const metadata = providersMetadata[providerId];
|
|
118
|
+
return {
|
|
119
|
+
pullRequests: [...(metadata?.supportedPullRequestFilters ?? [])],
|
|
120
|
+
pullRequestsAccountWide: [...(metadata?.supportedAccountWidePullRequestFilters ?? [])],
|
|
121
|
+
issues: [...(metadata?.supportedIssueFilters ?? [])],
|
|
122
|
+
issuesAccountWide: [...(metadata?.supportedAccountWideIssueFilters ?? [])],
|
|
123
|
+
};
|
|
124
|
+
}
|