@rnsk/toolkits 0.0.1 → 0.0.3
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/README.md +104 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +2 -0
- package/dist/core/schema-helpers.d.ts +20 -0
- package/dist/core/schema-helpers.js +157 -0
- package/dist/core/scope.d.ts +4 -0
- package/dist/core/scope.js +12 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +15 -3
- package/dist/runtime/meta-tools.js +2 -0
- package/dist/toolkits/github/icon.d.ts +5 -0
- package/dist/toolkits/github/icon.js +15 -0
- package/dist/toolkits/github/manifest.d.ts +3 -0
- package/dist/toolkits/github/manifest.js +36 -0
- package/dist/toolkits/github/tools/Actions/delete-artifact.d.ts +13 -0
- package/dist/toolkits/github/tools/Actions/delete-artifact.js +31 -0
- package/dist/toolkits/github/tools/Actions/get-artifact.d.ts +31 -0
- package/dist/toolkits/github/tools/Actions/get-artifact.js +39 -0
- package/dist/toolkits/github/tools/Actions/get-workflow-job.d.ts +36 -0
- package/dist/toolkits/github/tools/Actions/get-workflow-job.js +48 -0
- package/dist/toolkits/github/tools/Actions/list-artifacts.d.ts +23 -0
- package/dist/toolkits/github/tools/Actions/list-artifacts.js +43 -0
- package/dist/toolkits/github/tools/Actions/list-workflow-jobs.d.ts +27 -0
- package/dist/toolkits/github/tools/Actions/list-workflow-jobs.js +49 -0
- package/dist/toolkits/github/tools/Actions/list-workflow-run-artifacts.d.ts +24 -0
- package/dist/toolkits/github/tools/Actions/list-workflow-run-artifacts.js +45 -0
- package/dist/toolkits/github/tools/Activity/list-notifications.d.ts +24 -0
- package/dist/toolkits/github/tools/Activity/list-notifications.js +45 -0
- package/dist/toolkits/github/tools/Activity/list-public-events.d.ts +18 -0
- package/dist/toolkits/github/tools/Activity/list-public-events.js +37 -0
- package/dist/toolkits/github/tools/Activity/list-repo-events.d.ts +19 -0
- package/dist/toolkits/github/tools/Activity/list-repo-events.js +40 -0
- package/dist/toolkits/github/tools/Activity/list-user-events.d.ts +17 -0
- package/dist/toolkits/github/tools/Activity/list-user-events.js +37 -0
- package/dist/toolkits/github/tools/Activity/mark-notifications-read.d.ts +11 -0
- package/dist/toolkits/github/tools/Activity/mark-notifications-read.js +27 -0
- package/dist/toolkits/github/tools/Apps/get-authenticated-app.d.ts +24 -0
- package/dist/toolkits/github/tools/Apps/get-authenticated-app.js +36 -0
- package/dist/toolkits/github/tools/Apps/get-installation.d.ts +76 -0
- package/dist/toolkits/github/tools/Apps/get-installation.js +36 -0
- package/dist/toolkits/github/tools/Apps/list-installations.d.ts +19 -0
- package/dist/toolkits/github/tools/Apps/list-installations.js +38 -0
- package/dist/toolkits/github/tools/Checks/create-check-run.d.ts +24 -0
- package/dist/toolkits/github/tools/Checks/create-check-run.js +43 -0
- package/dist/toolkits/github/tools/Checks/create-check-suite.d.ts +21 -0
- package/dist/toolkits/github/tools/Checks/create-check-suite.js +37 -0
- package/dist/toolkits/github/tools/Checks/get-check-run.d.ts +25 -0
- package/dist/toolkits/github/tools/Checks/get-check-run.js +39 -0
- package/dist/toolkits/github/tools/Checks/get-check-suite.d.ts +25 -0
- package/dist/toolkits/github/tools/Checks/get-check-suite.js +39 -0
- package/dist/toolkits/github/tools/Checks/list-check-runs.d.ts +27 -0
- package/dist/toolkits/github/tools/Checks/list-check-runs.js +50 -0
- package/dist/toolkits/github/tools/Checks/update-check-run.d.ts +23 -0
- package/dist/toolkits/github/tools/Checks/update-check-run.js +41 -0
- package/dist/toolkits/github/tools/CodeScanning/get-alert.d.ts +25 -0
- package/dist/toolkits/github/tools/CodeScanning/get-alert.js +41 -0
- package/dist/toolkits/github/tools/CodeScanning/list-alerts.d.ts +23 -0
- package/dist/toolkits/github/tools/CodeScanning/list-alerts.js +50 -0
- package/dist/toolkits/github/tools/CodeScanning/update-alert.d.ts +19 -0
- package/dist/toolkits/github/tools/CodeScanning/update-alert.js +39 -0
- package/dist/toolkits/github/tools/Collaborators/add-collaborator.d.ts +14 -0
- package/dist/toolkits/github/tools/Collaborators/add-collaborator.js +33 -0
- package/dist/toolkits/github/tools/Collaborators/check-collaborator.d.ts +13 -0
- package/dist/toolkits/github/tools/Collaborators/check-collaborator.js +34 -0
- package/dist/toolkits/github/tools/Collaborators/list-collaborators.d.ts +25 -0
- package/dist/toolkits/github/tools/Collaborators/list-collaborators.js +41 -0
- package/dist/toolkits/github/tools/Collaborators/remove-collaborator.d.ts +13 -0
- package/dist/toolkits/github/tools/Collaborators/remove-collaborator.js +31 -0
- package/dist/toolkits/github/tools/Commits/compare-commits.d.ts +30 -0
- package/dist/toolkits/github/tools/Commits/compare-commits.js +37 -0
- package/dist/toolkits/github/tools/Commits/get-commit.d.ts +46 -0
- package/dist/toolkits/github/tools/Commits/get-commit.js +35 -0
- package/dist/toolkits/github/tools/Commits/list-branches-for-head-commit.d.ts +20 -0
- package/dist/toolkits/github/tools/Commits/list-branches-for-head-commit.js +31 -0
- package/dist/toolkits/github/tools/Commits/list-commits.d.ts +21 -0
- package/dist/toolkits/github/tools/Commits/list-commits.js +43 -0
- package/dist/toolkits/github/tools/Commits/list-pull-requests-associated-with-commit.d.ts +81 -0
- package/dist/toolkits/github/tools/Commits/list-pull-requests-associated-with-commit.js +35 -0
- package/dist/toolkits/github/tools/Dependabot/get-alert.d.ts +53 -0
- package/dist/toolkits/github/tools/Dependabot/get-alert.js +37 -0
- package/dist/toolkits/github/tools/Dependabot/list-alerts.d.ts +23 -0
- package/dist/toolkits/github/tools/Dependabot/list-alerts.js +46 -0
- package/dist/toolkits/github/tools/Dependabot/update-alert.d.ts +19 -0
- package/dist/toolkits/github/tools/Dependabot/update-alert.js +39 -0
- package/dist/toolkits/github/tools/DeployKeys/create-deploy-key.d.ts +23 -0
- package/dist/toolkits/github/tools/DeployKeys/create-deploy-key.js +43 -0
- package/dist/toolkits/github/tools/DeployKeys/delete-deploy-key.d.ts +13 -0
- package/dist/toolkits/github/tools/DeployKeys/delete-deploy-key.js +31 -0
- package/dist/toolkits/github/tools/DeployKeys/get-deploy-key.d.ts +21 -0
- package/dist/toolkits/github/tools/DeployKeys/get-deploy-key.js +39 -0
- package/dist/toolkits/github/tools/DeployKeys/list-deploy-keys.d.ts +21 -0
- package/dist/toolkits/github/tools/DeployKeys/list-deploy-keys.js +44 -0
- package/dist/toolkits/github/tools/Deployments/create-deployment.d.ts +33 -0
- package/dist/toolkits/github/tools/Deployments/create-deployment.js +51 -0
- package/dist/toolkits/github/tools/Deployments/delete-deployment.d.ts +13 -0
- package/dist/toolkits/github/tools/Deployments/delete-deployment.js +31 -0
- package/dist/toolkits/github/tools/Deployments/get-deployment.d.ts +27 -0
- package/dist/toolkits/github/tools/Deployments/get-deployment.js +42 -0
- package/dist/toolkits/github/tools/Deployments/list-deployments.d.ts +27 -0
- package/dist/toolkits/github/tools/Deployments/list-deployments.js +52 -0
- package/dist/toolkits/github/tools/Environments/create-or-update-environment.d.ts +32 -0
- package/dist/toolkits/github/tools/Environments/create-or-update-environment.js +50 -0
- package/dist/toolkits/github/tools/Environments/delete-environment.d.ts +13 -0
- package/dist/toolkits/github/tools/Environments/delete-environment.js +31 -0
- package/dist/toolkits/github/tools/Environments/get-environment.d.ts +48 -0
- package/dist/toolkits/github/tools/Environments/get-environment.js +42 -0
- package/dist/toolkits/github/tools/Environments/list-environments.d.ts +23 -0
- package/dist/toolkits/github/tools/Environments/list-environments.js +45 -0
- package/dist/toolkits/github/tools/Files/create-or-update-file.d.ts +21 -0
- package/dist/toolkits/github/tools/Files/create-or-update-file.js +44 -0
- package/dist/toolkits/github/tools/Files/delete-file.d.ts +18 -0
- package/dist/toolkits/github/tools/Files/delete-file.js +40 -0
- package/dist/toolkits/github/tools/Files/get-file-content.d.ts +32 -0
- package/dist/toolkits/github/tools/Files/get-file-content.js +51 -0
- package/dist/toolkits/github/tools/Gists/create-gist.d.ts +19 -0
- package/dist/toolkits/github/tools/Gists/create-gist.js +37 -0
- package/dist/toolkits/github/tools/Gists/get-gist.d.ts +23 -0
- package/dist/toolkits/github/tools/Gists/get-gist.js +43 -0
- package/dist/toolkits/github/tools/Gists/list-gists.d.ts +19 -0
- package/dist/toolkits/github/tools/Gists/list-gists.js +38 -0
- package/dist/toolkits/github/tools/Git/create-blob.d.ts +16 -0
- package/dist/toolkits/github/tools/Git/create-blob.js +38 -0
- package/dist/toolkits/github/tools/Git/create-git-commit.d.ts +47 -0
- package/dist/toolkits/github/tools/Git/create-git-commit.js +51 -0
- package/dist/toolkits/github/tools/Git/create-ref.d.ts +24 -0
- package/dist/toolkits/github/tools/Git/create-ref.js +40 -0
- package/dist/toolkits/github/tools/Git/create-tree.d.ts +31 -0
- package/dist/toolkits/github/tools/Git/create-tree.js +52 -0
- package/dist/toolkits/github/tools/Git/delete-ref.d.ts +13 -0
- package/dist/toolkits/github/tools/Git/delete-ref.js +31 -0
- package/dist/toolkits/github/tools/Git/get-blob.d.ts +21 -0
- package/dist/toolkits/github/tools/Git/get-blob.js +39 -0
- package/dist/toolkits/github/tools/Git/get-git-commit.d.ts +40 -0
- package/dist/toolkits/github/tools/Git/get-git-commit.js +41 -0
- package/dist/toolkits/github/tools/Git/get-ref.d.ts +18 -0
- package/dist/toolkits/github/tools/Git/get-ref.js +42 -0
- package/dist/toolkits/github/tools/Git/get-tree.d.ts +27 -0
- package/dist/toolkits/github/tools/Git/get-tree.js +47 -0
- package/dist/toolkits/github/tools/Git/update-ref.d.ts +25 -0
- package/dist/toolkits/github/tools/Git/update-ref.js +42 -0
- package/dist/toolkits/github/tools/Issues/add-issue-assignees.d.ts +14 -0
- package/dist/toolkits/github/tools/Issues/add-issue-assignees.js +35 -0
- package/dist/toolkits/github/tools/Issues/add-issue-comment.d.ts +20 -0
- package/dist/toolkits/github/tools/Issues/add-issue-comment.js +38 -0
- package/dist/toolkits/github/tools/Issues/add-issue-labels.d.ts +14 -0
- package/dist/toolkits/github/tools/Issues/add-issue-labels.js +35 -0
- package/dist/toolkits/github/tools/Issues/create-issue.d.ts +22 -0
- package/dist/toolkits/github/tools/Issues/create-issue.js +34 -0
- package/dist/toolkits/github/tools/Issues/get-issue.d.ts +29 -0
- package/dist/toolkits/github/tools/Issues/get-issue.js +36 -0
- package/dist/toolkits/github/tools/Issues/list-authenticated-user-issues.d.ts +21 -0
- package/dist/toolkits/github/tools/Issues/list-authenticated-user-issues.js +34 -0
- package/dist/toolkits/github/tools/Issues/list-issue-comments.d.ts +19 -0
- package/dist/toolkits/github/tools/Issues/list-issue-comments.js +40 -0
- package/dist/toolkits/github/tools/Issues/list-org-issues.d.ts +22 -0
- package/dist/toolkits/github/tools/Issues/list-org-issues.js +38 -0
- package/dist/toolkits/github/tools/Issues/list-repo-issues.d.ts +28 -0
- package/dist/toolkits/github/tools/Issues/list-repo-issues.js +42 -0
- package/dist/toolkits/github/tools/Issues/list-user-account-issues.d.ts +21 -0
- package/dist/toolkits/github/tools/Issues/list-user-account-issues.js +36 -0
- package/dist/toolkits/github/tools/Issues/lock-issue.d.ts +15 -0
- package/dist/toolkits/github/tools/Issues/lock-issue.js +44 -0
- package/dist/toolkits/github/tools/Issues/remove-issue-label.d.ts +14 -0
- package/dist/toolkits/github/tools/Issues/remove-issue-label.js +33 -0
- package/dist/toolkits/github/tools/Issues/unlock-issue.d.ts +13 -0
- package/dist/toolkits/github/tools/Issues/unlock-issue.js +31 -0
- package/dist/toolkits/github/tools/Issues/update-issue.d.ts +22 -0
- package/dist/toolkits/github/tools/Issues/update-issue.js +42 -0
- package/dist/toolkits/github/tools/Licenses/get-license.d.ts +33 -0
- package/dist/toolkits/github/tools/Licenses/get-license.js +42 -0
- package/dist/toolkits/github/tools/Licenses/get-repo-license.d.ts +47 -0
- package/dist/toolkits/github/tools/Licenses/get-repo-license.js +45 -0
- package/dist/toolkits/github/tools/Licenses/list-licenses.d.ts +12 -0
- package/dist/toolkits/github/tools/Licenses/list-licenses.js +32 -0
- package/dist/toolkits/github/tools/Markdown/render-markdown.d.ts +13 -0
- package/dist/toolkits/github/tools/Markdown/render-markdown.js +31 -0
- package/dist/toolkits/github/tools/Organizations/get-org-membership.d.ts +58 -0
- package/dist/toolkits/github/tools/Organizations/get-org-membership.js +38 -0
- package/dist/toolkits/github/tools/Organizations/get-organization.d.ts +65 -0
- package/dist/toolkits/github/tools/Organizations/get-organization.js +58 -0
- package/dist/toolkits/github/tools/Organizations/list-org-members.d.ts +18 -0
- package/dist/toolkits/github/tools/Organizations/list-org-members.js +44 -0
- package/dist/toolkits/github/tools/Organizations/list-org-repositories.d.ts +50 -0
- package/dist/toolkits/github/tools/Organizations/list-org-repositories.js +69 -0
- package/dist/toolkits/github/tools/Organizations/list-organizations.d.ts +13 -0
- package/dist/toolkits/github/tools/Organizations/list-organizations.js +36 -0
- package/dist/toolkits/github/tools/Organizations/list-user-organizations.d.ts +20 -0
- package/dist/toolkits/github/tools/Organizations/list-user-organizations.js +43 -0
- package/dist/toolkits/github/tools/Organizations/update-organization.d.ts +33 -0
- package/dist/toolkits/github/tools/Organizations/update-organization.js +50 -0
- package/dist/toolkits/github/tools/PRs/check-pull-request-merged.d.ts +13 -0
- package/dist/toolkits/github/tools/PRs/check-pull-request-merged.js +34 -0
- package/dist/toolkits/github/tools/PRs/create-pull-request-review.d.ts +19 -0
- package/dist/toolkits/github/tools/PRs/create-pull-request-review.js +39 -0
- package/dist/toolkits/github/tools/PRs/create-pull-request.d.ts +23 -0
- package/dist/toolkits/github/tools/PRs/create-pull-request.js +44 -0
- package/dist/toolkits/github/tools/PRs/get-pull-request.d.ts +41 -0
- package/dist/toolkits/github/tools/PRs/get-pull-request.js +47 -0
- package/dist/toolkits/github/tools/PRs/list-pull-request-commits.d.ts +15 -0
- package/dist/toolkits/github/tools/PRs/list-pull-request-commits.js +37 -0
- package/dist/toolkits/github/tools/PRs/list-pull-request-files.d.ts +22 -0
- package/dist/toolkits/github/tools/PRs/list-pull-request-files.js +42 -0
- package/dist/toolkits/github/tools/PRs/list-pull-requests.d.ts +24 -0
- package/dist/toolkits/github/tools/PRs/list-pull-requests.js +44 -0
- package/dist/toolkits/github/tools/PRs/merge-pull-request.d.ts +20 -0
- package/dist/toolkits/github/tools/PRs/merge-pull-request.js +41 -0
- package/dist/toolkits/github/tools/PRs/update-pull-request-branch.d.ts +16 -0
- package/dist/toolkits/github/tools/PRs/update-pull-request-branch.js +36 -0
- package/dist/toolkits/github/tools/PRs/update-pull-request.d.ts +26 -0
- package/dist/toolkits/github/tools/PRs/update-pull-request.js +47 -0
- package/dist/toolkits/github/tools/Projects/create-org-project.d.ts +27 -0
- package/dist/toolkits/github/tools/Projects/create-org-project.js +43 -0
- package/dist/toolkits/github/tools/Projects/delete-project.d.ts +11 -0
- package/dist/toolkits/github/tools/Projects/delete-project.js +27 -0
- package/dist/toolkits/github/tools/Projects/get-project.d.ts +31 -0
- package/dist/toolkits/github/tools/Projects/get-project.js +42 -0
- package/dist/toolkits/github/tools/Projects/list-org-projects.d.ts +20 -0
- package/dist/toolkits/github/tools/Projects/list-org-projects.js +45 -0
- package/dist/toolkits/github/tools/Projects/list-project-columns.d.ts +16 -0
- package/dist/toolkits/github/tools/Projects/list-project-columns.js +40 -0
- package/dist/toolkits/github/tools/Projects/list-repo-projects.d.ts +21 -0
- package/dist/toolkits/github/tools/Projects/list-repo-projects.js +47 -0
- package/dist/toolkits/github/tools/Projects/update-project.d.ts +22 -0
- package/dist/toolkits/github/tools/Projects/update-project.js +41 -0
- package/dist/toolkits/github/tools/RateLimit/get-rate-limit.d.ts +19 -0
- package/dist/toolkits/github/tools/RateLimit/get-rate-limit.js +26 -0
- package/dist/toolkits/github/tools/Reactions/create-commit-comment-reaction.d.ts +20 -0
- package/dist/toolkits/github/tools/Reactions/create-commit-comment-reaction.js +40 -0
- package/dist/toolkits/github/tools/Reactions/create-issue-reaction.d.ts +20 -0
- package/dist/toolkits/github/tools/Reactions/create-issue-reaction.js +40 -0
- package/dist/toolkits/github/tools/Reactions/delete-reaction.d.ts +11 -0
- package/dist/toolkits/github/tools/Reactions/delete-reaction.js +27 -0
- package/dist/toolkits/github/tools/Reactions/list-commit-comment-reactions.d.ts +17 -0
- package/dist/toolkits/github/tools/Reactions/list-commit-comment-reactions.js +44 -0
- package/dist/toolkits/github/tools/Reactions/list-issue-reactions.d.ts +17 -0
- package/dist/toolkits/github/tools/Reactions/list-issue-reactions.js +44 -0
- package/dist/toolkits/github/tools/Reactions/list-pr-comment-reactions.d.ts +17 -0
- package/dist/toolkits/github/tools/Reactions/list-pr-comment-reactions.js +44 -0
- package/dist/toolkits/github/tools/Releases/create-release.d.ts +27 -0
- package/dist/toolkits/github/tools/Releases/create-release.js +45 -0
- package/dist/toolkits/github/tools/Releases/delete-release.d.ts +13 -0
- package/dist/toolkits/github/tools/Releases/delete-release.js +31 -0
- package/dist/toolkits/github/tools/Releases/generate-release-notes.d.ts +18 -0
- package/dist/toolkits/github/tools/Releases/generate-release-notes.js +39 -0
- package/dist/toolkits/github/tools/Releases/get-latest-release.d.ts +22 -0
- package/dist/toolkits/github/tools/Releases/get-latest-release.js +38 -0
- package/dist/toolkits/github/tools/Releases/get-release.d.ts +37 -0
- package/dist/toolkits/github/tools/Releases/get-release.js +50 -0
- package/dist/toolkits/github/tools/Releases/list-releases.d.ts +22 -0
- package/dist/toolkits/github/tools/Releases/list-releases.js +47 -0
- package/dist/toolkits/github/tools/Releases/update-release.d.ts +27 -0
- package/dist/toolkits/github/tools/Releases/update-release.js +46 -0
- package/dist/toolkits/github/tools/Repos/create-repo.d.ts +32 -0
- package/dist/toolkits/github/tools/Repos/create-repo.js +57 -0
- package/dist/toolkits/github/tools/Repos/fork-repo.d.ts +17 -0
- package/dist/toolkits/github/tools/Repos/fork-repo.js +35 -0
- package/dist/toolkits/github/tools/Repos/get-repo-contributors.d.ts +20 -0
- package/dist/toolkits/github/tools/Repos/get-repo-contributors.js +39 -0
- package/dist/toolkits/github/tools/Repos/get-repo-languages.d.ts +14 -0
- package/dist/toolkits/github/tools/Repos/get-repo-languages.js +29 -0
- package/dist/toolkits/github/tools/Repos/get-repo.d.ts +36 -0
- package/dist/toolkits/github/tools/Repos/get-repo.js +43 -0
- package/dist/toolkits/github/tools/Repos/list-branches.d.ts +17 -0
- package/dist/toolkits/github/tools/Repos/list-branches.js +37 -0
- package/dist/toolkits/github/tools/Repos/list-repos.d.ts +22 -0
- package/dist/toolkits/github/tools/Repos/list-repos.js +36 -0
- package/dist/toolkits/github/tools/Repos/star-repo.d.ts +13 -0
- package/dist/toolkits/github/tools/Repos/star-repo.js +39 -0
- package/dist/toolkits/github/tools/Repos/watch-repo.d.ts +18 -0
- package/dist/toolkits/github/tools/Repos/watch-repo.js +37 -0
- package/dist/toolkits/github/tools/Search/search-code.d.ts +14 -0
- package/dist/toolkits/github/tools/Search/search-code.js +33 -0
- package/dist/toolkits/github/tools/Search/search-commits.d.ts +14 -0
- package/dist/toolkits/github/tools/Search/search-commits.js +33 -0
- package/dist/toolkits/github/tools/Search/search-issues.d.ts +23 -0
- package/dist/toolkits/github/tools/Search/search-issues.js +43 -0
- package/dist/toolkits/github/tools/Search/search-labels.d.ts +15 -0
- package/dist/toolkits/github/tools/Search/search-labels.js +35 -0
- package/dist/toolkits/github/tools/Search/search-repos.d.ts +22 -0
- package/dist/toolkits/github/tools/Search/search-repos.js +47 -0
- package/dist/toolkits/github/tools/Search/search-topics.d.ts +12 -0
- package/dist/toolkits/github/tools/Search/search-topics.js +29 -0
- package/dist/toolkits/github/tools/Search/search-users.d.ts +21 -0
- package/dist/toolkits/github/tools/Search/search-users.js +41 -0
- package/dist/toolkits/github/tools/SecretScanning/get-alert.d.ts +33 -0
- package/dist/toolkits/github/tools/SecretScanning/get-alert.js +45 -0
- package/dist/toolkits/github/tools/SecretScanning/list-alerts.d.ts +25 -0
- package/dist/toolkits/github/tools/SecretScanning/list-alerts.js +53 -0
- package/dist/toolkits/github/tools/SecretScanning/update-alert.d.ts +19 -0
- package/dist/toolkits/github/tools/SecretScanning/update-alert.js +41 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/create-repository-advisory.d.ts +34 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/create-repository-advisory.js +52 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/get-repository-advisory.d.ts +27 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/get-repository-advisory.js +42 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/list-global-advisories.d.ts +14 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/list-global-advisories.js +37 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/list-repository-advisories.d.ts +22 -0
- package/dist/toolkits/github/tools/SecurityAdvisories/list-repository-advisories.js +47 -0
- package/dist/toolkits/github/tools/Stars/check-repo-starred.d.ts +12 -0
- package/dist/toolkits/github/tools/Stars/check-repo-starred.js +32 -0
- package/dist/toolkits/github/tools/Stars/list-stargazers.d.ts +15 -0
- package/dist/toolkits/github/tools/Stars/list-stargazers.js +40 -0
- package/dist/toolkits/github/tools/Stars/list-starred-repos.d.ts +15 -0
- package/dist/toolkits/github/tools/Stars/list-starred-repos.js +38 -0
- package/dist/toolkits/github/tools/Stars/star-repo.d.ts +12 -0
- package/dist/toolkits/github/tools/Stars/star-repo.js +29 -0
- package/dist/toolkits/github/tools/Stars/unstar-repo.d.ts +12 -0
- package/dist/toolkits/github/tools/Stars/unstar-repo.js +29 -0
- package/dist/toolkits/github/tools/Statuses/create-commit-status.d.ts +25 -0
- package/dist/toolkits/github/tools/Statuses/create-commit-status.js +44 -0
- package/dist/toolkits/github/tools/Statuses/get-combined-status.d.ts +26 -0
- package/dist/toolkits/github/tools/Statuses/get-combined-status.js +44 -0
- package/dist/toolkits/github/tools/Statuses/list-commit-statuses.d.ts +18 -0
- package/dist/toolkits/github/tools/Statuses/list-commit-statuses.js +44 -0
- package/dist/toolkits/github/tools/Teams/add-team-repo.d.ts +15 -0
- package/dist/toolkits/github/tools/Teams/add-team-repo.js +35 -0
- package/dist/toolkits/github/tools/Teams/create-team.d.ts +32 -0
- package/dist/toolkits/github/tools/Teams/create-team.js +46 -0
- package/dist/toolkits/github/tools/Teams/delete-team.d.ts +12 -0
- package/dist/toolkits/github/tools/Teams/delete-team.js +29 -0
- package/dist/toolkits/github/tools/Teams/get-team.d.ts +28 -0
- package/dist/toolkits/github/tools/Teams/get-team.js +41 -0
- package/dist/toolkits/github/tools/Teams/list-team-members.d.ts +16 -0
- package/dist/toolkits/github/tools/Teams/list-team-members.js +42 -0
- package/dist/toolkits/github/tools/Teams/list-team-repos.d.ts +22 -0
- package/dist/toolkits/github/tools/Teams/list-team-repos.js +41 -0
- package/dist/toolkits/github/tools/Teams/list-teams.d.ts +18 -0
- package/dist/toolkits/github/tools/Teams/list-teams.js +42 -0
- package/dist/toolkits/github/tools/Teams/remove-team-repo.d.ts +14 -0
- package/dist/toolkits/github/tools/Teams/remove-team-repo.js +33 -0
- package/dist/toolkits/github/tools/Teams/update-team.d.ts +27 -0
- package/dist/toolkits/github/tools/Teams/update-team.js +44 -0
- package/dist/toolkits/github/tools/Users/follow-user.d.ts +12 -0
- package/dist/toolkits/github/tools/Users/follow-user.js +36 -0
- package/dist/toolkits/github/tools/Users/get-github-user.d.ts +64 -0
- package/dist/toolkits/github/tools/Users/get-github-user.js +48 -0
- package/dist/toolkits/github/tools/Users/get-user-by-id.d.ts +53 -0
- package/dist/toolkits/github/tools/Users/get-user-by-id.js +27 -0
- package/dist/toolkits/github/tools/Users/get-user-context.d.ts +14 -0
- package/dist/toolkits/github/tools/Users/get-user-context.js +32 -0
- package/dist/toolkits/github/tools/Users/get-user.d.ts +53 -0
- package/dist/toolkits/github/tools/Users/get-user.js +27 -0
- package/dist/toolkits/github/tools/Users/list-users.d.ts +31 -0
- package/dist/toolkits/github/tools/Users/list-users.js +29 -0
- package/dist/toolkits/github/tools/Users/update-authenticated-user.d.ts +62 -0
- package/dist/toolkits/github/tools/Users/update-authenticated-user.js +39 -0
- package/dist/toolkits/github/tools/Webhooks/create-repo-webhook.d.ts +34 -0
- package/dist/toolkits/github/tools/Webhooks/create-repo-webhook.js +47 -0
- package/dist/toolkits/github/tools/Webhooks/delete-repo-webhook.d.ts +13 -0
- package/dist/toolkits/github/tools/Webhooks/delete-repo-webhook.js +31 -0
- package/dist/toolkits/github/tools/Webhooks/get-repo-webhook.d.ts +30 -0
- package/dist/toolkits/github/tools/Webhooks/get-repo-webhook.js +41 -0
- package/dist/toolkits/github/tools/Webhooks/list-repo-webhooks.d.ts +31 -0
- package/dist/toolkits/github/tools/Webhooks/list-repo-webhooks.js +47 -0
- package/dist/toolkits/github/tools/Webhooks/update-repo-webhook.d.ts +36 -0
- package/dist/toolkits/github/tools/Webhooks/update-repo-webhook.js +50 -0
- package/dist/toolkits/github/tools/Workflows/get-workflow-run.d.ts +31 -0
- package/dist/toolkits/github/tools/Workflows/get-workflow-run.js +42 -0
- package/dist/toolkits/github/tools/Workflows/list-workflow-runs.d.ts +25 -0
- package/dist/toolkits/github/tools/Workflows/list-workflow-runs.js +59 -0
- package/dist/toolkits/github/tools/Workflows/list-workflows.d.ts +21 -0
- package/dist/toolkits/github/tools/Workflows/list-workflows.js +40 -0
- package/dist/toolkits/github/tools/Workflows/trigger-workflow.d.ts +15 -0
- package/dist/toolkits/github/tools/Workflows/trigger-workflow.js +35 -0
- package/dist/toolkits/github/tools/index.d.ts +176 -0
- package/dist/toolkits/github/tools/index.js +646 -0
- package/dist/toolkits/gmail/icon.js +25 -1
- package/dist/toolkits/gmail/manifest.js +78 -5
- package/dist/toolkits/gmail/tools/create-draft.d.ts +34 -0
- package/dist/toolkits/gmail/tools/create-draft.js +60 -0
- package/dist/toolkits/gmail/tools/delete-draft.d.ts +23 -0
- package/dist/toolkits/gmail/tools/delete-draft.js +34 -0
- package/dist/toolkits/gmail/tools/get-draft.d.ts +32 -0
- package/dist/toolkits/gmail/tools/get-draft.js +36 -0
- package/dist/toolkits/gmail/tools/get-message.d.ts +12 -12
- package/dist/toolkits/gmail/tools/get-message.js +3 -24
- package/dist/toolkits/gmail/tools/get-thread.d.ts +29 -0
- package/dist/toolkits/gmail/tools/get-thread.js +39 -0
- package/dist/toolkits/gmail/tools/index.d.ts +17 -0
- package/dist/toolkits/gmail/tools/index.js +17 -0
- package/dist/toolkits/gmail/tools/list-drafts.d.ts +28 -0
- package/dist/toolkits/gmail/tools/list-drafts.js +43 -0
- package/dist/toolkits/gmail/tools/list-labels.d.ts +20 -0
- package/dist/toolkits/gmail/tools/list-labels.js +46 -0
- package/dist/toolkits/gmail/tools/list-threads.d.ts +28 -0
- package/dist/toolkits/gmail/tools/list-threads.js +43 -0
- package/dist/toolkits/gmail/tools/modify-message-labels.d.ts +31 -0
- package/dist/toolkits/gmail/tools/modify-message-labels.js +44 -0
- package/dist/toolkits/gmail/tools/reply-to-thread.d.ts +33 -0
- package/dist/toolkits/gmail/tools/reply-to-thread.js +58 -0
- package/dist/toolkits/gmail/tools/send-draft.d.ts +29 -0
- package/dist/toolkits/gmail/tools/send-draft.js +41 -0
- package/dist/toolkits/gmail/tools/send-message.d.ts +4 -1
- package/dist/toolkits/gmail/tools/send-message.js +18 -16
- package/dist/toolkits/gmail/tools/trash-message.d.ts +29 -0
- package/dist/toolkits/gmail/tools/trash-message.js +37 -0
- package/dist/toolkits/gmail/tools/untrash-message.d.ts +29 -0
- package/dist/toolkits/gmail/tools/untrash-message.js +37 -0
- package/dist/toolkits/gmail/tools/utils.d.ts +41 -0
- package/dist/toolkits/gmail/tools/utils.js +97 -0
- package/dist/toolkits/google-calendar/icon.d.ts +5 -0
- package/dist/toolkits/google-calendar/icon.js +6 -0
- package/dist/toolkits/google-calendar/manifest.d.ts +3 -0
- package/dist/toolkits/google-calendar/manifest.js +45 -0
- package/dist/toolkits/google-calendar/tools/create-event.d.ts +27 -0
- package/dist/toolkits/google-calendar/tools/create-event.js +54 -0
- package/dist/toolkits/google-calendar/tools/delete-event.d.ts +27 -0
- package/dist/toolkits/google-calendar/tools/delete-event.js +38 -0
- package/dist/toolkits/google-calendar/tools/get-event.d.ts +24 -0
- package/dist/toolkits/google-calendar/tools/get-event.js +37 -0
- package/dist/toolkits/google-calendar/tools/index.d.ts +185 -0
- package/dist/toolkits/google-calendar/tools/index.js +47 -0
- package/dist/toolkits/google-calendar/tools/list-events.d.ts +24 -0
- package/dist/toolkits/google-calendar/tools/list-events.js +46 -0
- package/dist/toolkits/google-calendar/tools/search-events.d.ts +27 -0
- package/dist/toolkits/google-calendar/tools/search-events.js +49 -0
- package/dist/toolkits/google-calendar/tools/update-event.d.ts +29 -0
- package/dist/toolkits/google-calendar/tools/update-event.js +56 -0
- package/dist/toolkits/google-sheets/icon.d.ts +5 -0
- package/dist/toolkits/google-sheets/icon.js +13 -0
- package/dist/toolkits/google-sheets/manifest.d.ts +3 -0
- package/dist/toolkits/google-sheets/manifest.js +45 -0
- package/dist/toolkits/google-sheets/tools/append-values.d.ts +41 -0
- package/dist/toolkits/google-sheets/tools/append-values.js +51 -0
- package/dist/toolkits/google-sheets/tools/clear-values.d.ts +27 -0
- package/dist/toolkits/google-sheets/tools/clear-values.js +41 -0
- package/dist/toolkits/google-sheets/tools/create-spreadsheet.d.ts +33 -0
- package/dist/toolkits/google-sheets/tools/create-spreadsheet.js +59 -0
- package/dist/toolkits/google-sheets/tools/get-spreadsheet.d.ts +5 -0
- package/dist/toolkits/google-sheets/tools/get-spreadsheet.js +33 -0
- package/dist/toolkits/google-sheets/tools/get-values.d.ts +6 -0
- package/dist/toolkits/google-sheets/tools/get-values.js +34 -0
- package/dist/toolkits/google-sheets/tools/index.d.ts +209 -0
- package/dist/toolkits/google-sheets/tools/index.js +61 -0
- package/dist/toolkits/google-sheets/tools/list-spreadsheets.d.ts +21 -0
- package/dist/toolkits/google-sheets/tools/list-spreadsheets.js +43 -0
- package/dist/toolkits/google-sheets/tools/update-values.d.ts +38 -0
- package/dist/toolkits/google-sheets/tools/update-values.js +50 -0
- package/dist/toolkits/linear/icon.js +24 -1
- package/dist/toolkits/mathematics/icon.js +1 -1
- package/dist/toolkits/notion/icon.d.ts +5 -0
- package/dist/toolkits/notion/icon.js +10 -0
- package/dist/toolkits/notion/manifest.d.ts +3 -0
- package/dist/toolkits/notion/manifest.js +37 -0
- package/dist/toolkits/notion/tools/append-block-children.d.ts +6 -0
- package/dist/toolkits/notion/tools/append-block-children.js +30 -0
- package/dist/toolkits/notion/tools/create-page.d.ts +12 -0
- package/dist/toolkits/notion/tools/create-page.js +40 -0
- package/dist/toolkits/notion/tools/get-database.d.ts +5 -0
- package/dist/toolkits/notion/tools/get-database.js +25 -0
- package/dist/toolkits/notion/tools/get-page.d.ts +15 -0
- package/dist/toolkits/notion/tools/get-page.js +42 -0
- package/dist/toolkits/notion/tools/index.d.ts +16 -0
- package/dist/toolkits/notion/tools/index.js +61 -0
- package/dist/toolkits/notion/tools/list-databases.d.ts +5 -0
- package/dist/toolkits/notion/tools/list-databases.js +33 -0
- package/dist/toolkits/notion/tools/query-database.d.ts +8 -0
- package/dist/toolkits/notion/tools/query-database.js +34 -0
- package/dist/toolkits/notion/tools/search.d.ts +14 -0
- package/dist/toolkits/notion/tools/search.js +41 -0
- package/dist/toolkits/notion/tools/update-page.d.ts +9 -0
- package/dist/toolkits/notion/tools/update-page.js +36 -0
- package/dist/toolkits/web-search/icon.js +3 -1
- package/package.json +5 -6
- package/dist/core/categories.d.ts.map +0 -1
- package/dist/core/categories.js.map +0 -1
- package/dist/core/define.d.ts.map +0 -1
- package/dist/core/define.js.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js.map +0 -1
- package/dist/core/validate.d.ts.map +0 -1
- package/dist/core/validate.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/runtime/credentials.d.ts.map +0 -1
- package/dist/runtime/credentials.js.map +0 -1
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/meta-tools.d.ts.map +0 -1
- package/dist/runtime/meta-tools.js.map +0 -1
- package/dist/runtime/registry.d.ts.map +0 -1
- package/dist/runtime/registry.js.map +0 -1
- package/dist/runtime/schema-helpers.d.ts.map +0 -1
- package/dist/runtime/schema-helpers.js.map +0 -1
- package/dist/toolkits/gmail/icon.d.ts.map +0 -1
- package/dist/toolkits/gmail/icon.js.map +0 -1
- package/dist/toolkits/gmail/manifest.d.ts.map +0 -1
- package/dist/toolkits/gmail/manifest.js.map +0 -1
- package/dist/toolkits/gmail/tools/get-message.d.ts.map +0 -1
- package/dist/toolkits/gmail/tools/get-message.js.map +0 -1
- package/dist/toolkits/gmail/tools/list-messages.d.ts.map +0 -1
- package/dist/toolkits/gmail/tools/list-messages.js.map +0 -1
- package/dist/toolkits/gmail/tools/send-message.d.ts.map +0 -1
- package/dist/toolkits/gmail/tools/send-message.js.map +0 -1
- package/dist/toolkits/linear/icon.d.ts.map +0 -1
- package/dist/toolkits/linear/icon.js.map +0 -1
- package/dist/toolkits/linear/manifest.d.ts.map +0 -1
- package/dist/toolkits/linear/manifest.js.map +0 -1
- package/dist/toolkits/linear/tools/create-issue.d.ts.map +0 -1
- package/dist/toolkits/linear/tools/create-issue.js.map +0 -1
- package/dist/toolkits/linear/tools/list-teams.d.ts.map +0 -1
- package/dist/toolkits/linear/tools/list-teams.js.map +0 -1
- package/dist/toolkits/linear/tools/search-issues.d.ts.map +0 -1
- package/dist/toolkits/linear/tools/search-issues.js.map +0 -1
- package/dist/toolkits/mathematics/icon.d.ts.map +0 -1
- package/dist/toolkits/mathematics/icon.js.map +0 -1
- package/dist/toolkits/mathematics/manifest.d.ts.map +0 -1
- package/dist/toolkits/mathematics/manifest.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-combinatorics.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-combinatorics.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-matrix-determinant.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-matrix-determinant.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-percentage.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-percentage.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-product.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-product.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-quadratic-roots.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-quadratic-roots.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-statistics.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-statistics.js.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-sum.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/calculate-sum.js.map +0 -1
- package/dist/toolkits/mathematics/tools/get-random-number.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/get-random-number.js.map +0 -1
- package/dist/toolkits/mathematics/tools/solve-linear-equations.d.ts.map +0 -1
- package/dist/toolkits/mathematics/tools/solve-linear-equations.js.map +0 -1
- package/dist/toolkits/web-search/icon.d.ts.map +0 -1
- package/dist/toolkits/web-search/icon.js.map +0 -1
- package/dist/toolkits/web-search/manifest.d.ts.map +0 -1
- package/dist/toolkits/web-search/manifest.js.map +0 -1
- package/dist/toolkits/web-search/tools/firecrawl-client.d.ts.map +0 -1
- package/dist/toolkits/web-search/tools/firecrawl-client.js.map +0 -1
- package/dist/toolkits/web-search/tools/web-scrape.d.ts.map +0 -1
- package/dist/toolkits/web-search/tools/web-scrape.js.map +0 -1
- package/dist/toolkits/web-search/tools/web-search.d.ts.map +0 -1
- package/dist/toolkits/web-search/tools/web-search.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# @rnsk/toolkits
|
|
2
|
+
|
|
3
|
+
Manifest-driven toolkit registry for AI agents — connector definitions you publish as npm and wire into [Runstack](https://runstack.engineer).
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@rnsk/toolkits)
|
|
6
|
+
[](../../LICENSE)
|
|
7
|
+
|
|
8
|
+
> This is **not** [`@rnsk/tools`](https://www.npmjs.com/package/@rnsk/tools) (the MCP client SDK). `@rnsk/toolkits` ships **connector implementations** — manifests, tools, OAuth specs, and icons.
|
|
9
|
+
|
|
10
|
+
## What this package contains
|
|
11
|
+
|
|
12
|
+
| Export | Purpose |
|
|
13
|
+
|--------|---------|
|
|
14
|
+
| `@rnsk/toolkits` | All toolkit manifests, `registerAllTools()`, `getAllTools()` |
|
|
15
|
+
| `@rnsk/toolkits/core` | Types, `defineToolkit`, validation, schema helpers |
|
|
16
|
+
|
|
17
|
+
## Seed toolkits (v0.0.3)
|
|
18
|
+
|
|
19
|
+
**223 tools** across **8 toolkits**.
|
|
20
|
+
|
|
21
|
+
| Toolkit | Tools | Auth |
|
|
22
|
+
|---------|------:|------|
|
|
23
|
+
| mathematics | 9 | none |
|
|
24
|
+
| linear | 3 | OAuth2 |
|
|
25
|
+
| gmail | 15 | OAuth2 |
|
|
26
|
+
| web-search (Firecrawl) | 2 | service env |
|
|
27
|
+
| github | 173 | OAuth2 |
|
|
28
|
+
| notion | 8 | OAuth2 |
|
|
29
|
+
| google-calendar | 6 | OAuth2 |
|
|
30
|
+
| google-sheets | 7 | OAuth2 |
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install @rnsk/toolkits
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Peer dependencies: `ai`, `zod`.
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
Register every toolkit tool into your application's registry:
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { toolkits, registerAllTools } from '@rnsk/toolkits';
|
|
46
|
+
|
|
47
|
+
registerAllTools(myRegistry);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Inspect manifests or build custom registration:
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
import { toolkits } from '@rnsk/toolkits';
|
|
54
|
+
import { defineToolkit, validateManifests } from '@rnsk/toolkits/core';
|
|
55
|
+
|
|
56
|
+
for (const manifest of toolkits) {
|
|
57
|
+
console.log(manifest.id, manifest.tools.length);
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Runstack loads this package server-side, registers tools, and routes agent requests through its own meta-tool layer. You can publish a **private fork** or scoped package and point Runstack at your version to host connectors outside the public registry.
|
|
62
|
+
|
|
63
|
+
## Toolkit structure
|
|
64
|
+
|
|
65
|
+
Each toolkit lives under `src/toolkits/<id>/`:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
<id>/
|
|
69
|
+
manifest.ts # defineToolkit({ displayName, auth, tools, ... })
|
|
70
|
+
icon.ts # SVG/PNG data URI
|
|
71
|
+
tools/
|
|
72
|
+
*.ts # one tool per file (AI SDK tool() + execute)
|
|
73
|
+
index.ts # exports array
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
After adding a toolkit, register it in `src/index.ts`, then run `npm run validate && npm run build`.
|
|
77
|
+
|
|
78
|
+
## Local testing
|
|
79
|
+
|
|
80
|
+
The repo includes a **sandbox** (not published to npm) for exercising tools at runtime:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
cd ../../sandbox
|
|
84
|
+
cp .env.local.example .env.local
|
|
85
|
+
npm run dev
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Use `POST /api/tools/execute` to invoke a tool directly with the same credential-injection pattern Runstack uses. See the [repository README](../../README.md) for sandbox endpoints.
|
|
89
|
+
|
|
90
|
+
## Versioning
|
|
91
|
+
|
|
92
|
+
Pre-1.0 (`0.0.x`): patch releases add toolkits and tools. Pin an exact version in production (e.g. `"0.0.3"`).
|
|
93
|
+
|
|
94
|
+
## Contributing
|
|
95
|
+
|
|
96
|
+
See [CONTRIBUTING.md](../../CONTRIBUTING.md) in the repository root.
|
|
97
|
+
|
|
98
|
+
## Security
|
|
99
|
+
|
|
100
|
+
Report vulnerabilities privately — [SECURITY.md](../../SECURITY.md). Toolkit `execute` functions run server-side with user credentials; every PR is reviewed for token handling and outbound hosts.
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
MIT
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { CONNECTOR_CATEGORIES, type ConnectorCategory } from './categories.js';
|
|
2
2
|
export { defineToolkit, defineTool, toolkitCamelId } from './define.js';
|
|
3
|
+
export { inferToolScope } from './scope.js';
|
|
3
4
|
export { validateManifests, getAuthType, } from './validate.js';
|
|
5
|
+
export { TOOL_OUTPUT_JSON_SCHEMA, getToolInputZodSchema, resolveZodObjectShape, toolInputToJsonSchema, extractParameterInfo, coerceArguments, type ParameterInfo, } from './schema-helpers.js';
|
|
4
6
|
export type { ToolkitManifest, ToolDefinition, ToolkitIcon, ToolkitAuthSpec, ToolkitAuthType, ToolScope, OAuthProviderSpec, EnvVarSpec, ToolkitAvailability, } from './types.js';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { CONNECTOR_CATEGORIES } from './categories.js';
|
|
2
2
|
export { defineToolkit, defineTool, toolkitCamelId } from './define.js';
|
|
3
|
+
export { inferToolScope } from './scope.js';
|
|
3
4
|
export { validateManifests, getAuthType, } from './validate.js';
|
|
5
|
+
export { TOOL_OUTPUT_JSON_SCHEMA, getToolInputZodSchema, resolveZodObjectShape, toolInputToJsonSchema, extractParameterInfo, coerceArguments, } from './schema-helpers.js';
|
|
4
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const TOOL_OUTPUT_JSON_SCHEMA: Record<string, unknown>;
|
|
2
|
+
export declare function getToolInputZodSchema(tool: any): any | null;
|
|
3
|
+
export declare function resolveZodObjectShape(schema: {
|
|
4
|
+
shape?: Record<string, unknown>;
|
|
5
|
+
_def?: {
|
|
6
|
+
shape?: Record<string, unknown> | (() => Record<string, unknown>);
|
|
7
|
+
};
|
|
8
|
+
} | null | undefined): Record<string, unknown> | null;
|
|
9
|
+
export declare function toolInputToJsonSchema(tool: any, requiredAuth?: string): Record<string, unknown>;
|
|
10
|
+
export interface ParameterInfo {
|
|
11
|
+
type: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
description?: string;
|
|
14
|
+
itemType?: string;
|
|
15
|
+
options?: string[];
|
|
16
|
+
values?: string[];
|
|
17
|
+
}
|
|
18
|
+
export declare function extractParameterInfo(zodType: any): ParameterInfo | Record<string, unknown>;
|
|
19
|
+
export declare function coerceArguments(args: Record<string, unknown>, schema: any): Record<string, unknown>;
|
|
20
|
+
//# sourceMappingURL=schema-helpers.d.ts.map
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
2
|
+
export const TOOL_OUTPUT_JSON_SCHEMA = {
|
|
3
|
+
type: 'object',
|
|
4
|
+
description: 'JSON object returned by the tool. May include result data or an error field.',
|
|
5
|
+
additionalProperties: true,
|
|
6
|
+
};
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
|
+
export function getToolInputZodSchema(tool) {
|
|
9
|
+
if (!tool || typeof tool !== 'object')
|
|
10
|
+
return null;
|
|
11
|
+
return tool.inputSchema ?? tool._def?.parameters ?? null;
|
|
12
|
+
}
|
|
13
|
+
export function resolveZodObjectShape(schema) {
|
|
14
|
+
if (!schema)
|
|
15
|
+
return null;
|
|
16
|
+
if (schema.shape)
|
|
17
|
+
return schema.shape;
|
|
18
|
+
const defShape = schema._def?.shape;
|
|
19
|
+
if (typeof defShape === 'function')
|
|
20
|
+
return defShape();
|
|
21
|
+
if (defShape && typeof defShape === 'object')
|
|
22
|
+
return defShape;
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
function flattenJsonSchema(schema) {
|
|
26
|
+
if (schema.$ref && typeof schema.$ref === 'string' && schema.definitions) {
|
|
27
|
+
const refName = schema.$ref.replace('#/definitions/', '');
|
|
28
|
+
const definitions = schema.definitions;
|
|
29
|
+
const resolved = definitions[refName];
|
|
30
|
+
if (resolved) {
|
|
31
|
+
return {
|
|
32
|
+
...resolved,
|
|
33
|
+
...(schema.$schema ? { $schema: schema.$schema } : {}),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return schema;
|
|
38
|
+
}
|
|
39
|
+
function stripAuthFromJsonSchema(schema, requiredAuth) {
|
|
40
|
+
const properties = schema.properties;
|
|
41
|
+
if (!properties)
|
|
42
|
+
return schema;
|
|
43
|
+
const filtered = { ...properties };
|
|
44
|
+
for (const key of Object.keys(filtered)) {
|
|
45
|
+
if (key === requiredAuth || key.endsWith('Token')) {
|
|
46
|
+
delete filtered[key];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const required = Array.isArray(schema.required)
|
|
50
|
+
? schema.required.filter((key) => key !== requiredAuth && !key.endsWith('Token'))
|
|
51
|
+
: undefined;
|
|
52
|
+
return {
|
|
53
|
+
...schema,
|
|
54
|
+
properties: filtered,
|
|
55
|
+
...(required && required.length > 0 ? { required } : {}),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
59
|
+
export function toolInputToJsonSchema(tool, requiredAuth) {
|
|
60
|
+
const zodSchema = getToolInputZodSchema(tool);
|
|
61
|
+
if (!zodSchema) {
|
|
62
|
+
return { type: 'object', properties: {} };
|
|
63
|
+
}
|
|
64
|
+
const jsonSchema = zodToJsonSchema(zodSchema, {
|
|
65
|
+
$refStrategy: 'none',
|
|
66
|
+
});
|
|
67
|
+
return stripAuthFromJsonSchema(flattenJsonSchema(jsonSchema), requiredAuth);
|
|
68
|
+
}
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
|
+
export function extractParameterInfo(zodType) {
|
|
71
|
+
const typeName = zodType._def?.typeName;
|
|
72
|
+
const info = {
|
|
73
|
+
type: typeName?.replace('Zod', '').toLowerCase() || 'unknown',
|
|
74
|
+
required: !(zodType?.isOptional?.() ?? false),
|
|
75
|
+
description: zodType.description || undefined,
|
|
76
|
+
};
|
|
77
|
+
switch (typeName) {
|
|
78
|
+
case 'ZodNumber':
|
|
79
|
+
info.type = 'number';
|
|
80
|
+
break;
|
|
81
|
+
case 'ZodString':
|
|
82
|
+
info.type = 'string';
|
|
83
|
+
break;
|
|
84
|
+
case 'ZodBoolean':
|
|
85
|
+
info.type = 'boolean';
|
|
86
|
+
break;
|
|
87
|
+
case 'ZodArray':
|
|
88
|
+
info.type = 'array';
|
|
89
|
+
info.itemType = extractParameterInfo(zodType._def.type).type;
|
|
90
|
+
break;
|
|
91
|
+
case 'ZodObject':
|
|
92
|
+
info.type = 'object';
|
|
93
|
+
break;
|
|
94
|
+
case 'ZodUnion':
|
|
95
|
+
info.type = 'union';
|
|
96
|
+
info.options =
|
|
97
|
+
zodType._def.options?.map(
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
99
|
+
(opt) => extractParameterInfo(opt).type) || [];
|
|
100
|
+
break;
|
|
101
|
+
case 'ZodEnum':
|
|
102
|
+
info.type = 'enum';
|
|
103
|
+
info.values = zodType._def.values || [];
|
|
104
|
+
break;
|
|
105
|
+
case 'ZodOptional': {
|
|
106
|
+
const innerInfo = extractParameterInfo(zodType._def.innerType);
|
|
107
|
+
return { ...innerInfo, required: false };
|
|
108
|
+
}
|
|
109
|
+
default:
|
|
110
|
+
info.type = typeName?.replace('Zod', '').toLowerCase() || 'any';
|
|
111
|
+
}
|
|
112
|
+
return info;
|
|
113
|
+
}
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
115
|
+
export function coerceArguments(args, schema) {
|
|
116
|
+
const shape = resolveZodObjectShape(schema);
|
|
117
|
+
if (!shape)
|
|
118
|
+
return args;
|
|
119
|
+
const coercedArgs = {};
|
|
120
|
+
for (const [key, value] of Object.entries(args)) {
|
|
121
|
+
const fieldSchema = shape[key];
|
|
122
|
+
if (!fieldSchema) {
|
|
123
|
+
coercedArgs[key] = value;
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
let typeName = fieldSchema._def?.typeName;
|
|
127
|
+
let actualSchema = fieldSchema;
|
|
128
|
+
if (typeName === 'ZodOptional') {
|
|
129
|
+
actualSchema = fieldSchema._def?.innerType;
|
|
130
|
+
typeName = actualSchema?._def?.typeName;
|
|
131
|
+
}
|
|
132
|
+
try {
|
|
133
|
+
switch (typeName) {
|
|
134
|
+
case 'ZodNumber':
|
|
135
|
+
coercedArgs[key] = typeof value === 'string' ? parseFloat(value) : Number(value);
|
|
136
|
+
break;
|
|
137
|
+
case 'ZodString':
|
|
138
|
+
coercedArgs[key] = String(value);
|
|
139
|
+
break;
|
|
140
|
+
case 'ZodBoolean':
|
|
141
|
+
coercedArgs[key] =
|
|
142
|
+
typeof value === 'string' ? value.toLowerCase() === 'true' : Boolean(value);
|
|
143
|
+
break;
|
|
144
|
+
case 'ZodArray':
|
|
145
|
+
coercedArgs[key] = Array.isArray(value) ? value : [value];
|
|
146
|
+
break;
|
|
147
|
+
default:
|
|
148
|
+
coercedArgs[key] = value;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
coercedArgs[key] = value;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return coercedArgs;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=schema-helpers.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Heuristic scope inference for migrated tools; explicit scope in manifests is preferred. */
|
|
2
|
+
export function inferToolScope(name) {
|
|
3
|
+
const normalized = name.toLowerCase();
|
|
4
|
+
if (/^(delete|remove|unfollow|unstar|destroy|revoke|cancel)/.test(normalized)) {
|
|
5
|
+
return 'delete';
|
|
6
|
+
}
|
|
7
|
+
if (/^(create|add|update|send|post|put|patch|trigger|generate|follow|star|merge|approve|dispatch|set|invite|assign|upload|publish|enable|disable|lock|unlock|rerun|reopen|close|append|fork|watch)/.test(normalized)) {
|
|
8
|
+
return 'write';
|
|
9
|
+
}
|
|
10
|
+
return 'read';
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=scope.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,14 @@ import mathematics from './toolkits/mathematics/manifest.js';
|
|
|
2
2
|
import linear from './toolkits/linear/manifest.js';
|
|
3
3
|
import gmail from './toolkits/gmail/manifest.js';
|
|
4
4
|
import webSearch from './toolkits/web-search/manifest.js';
|
|
5
|
+
import github from './toolkits/github/manifest.js';
|
|
6
|
+
import notion from './toolkits/notion/manifest.js';
|
|
7
|
+
import googleCalendar from './toolkits/google-calendar/manifest.js';
|
|
8
|
+
import googleSheets from './toolkits/google-sheets/manifest.js';
|
|
5
9
|
import type { ToolkitManifest } from './core/types.js';
|
|
6
10
|
export declare const toolkits: ToolkitManifest[];
|
|
7
|
-
export { mathematics, linear, gmail, webSearch };
|
|
11
|
+
export { mathematics, linear, gmail, webSearch, github, notion, googleCalendar, googleSheets, };
|
|
8
12
|
export * from './core/index.js';
|
|
9
|
-
export * from './runtime/index.js';
|
|
10
13
|
export declare function getAllTools(): {
|
|
11
14
|
name: string;
|
|
12
15
|
description: string;
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,22 @@ import mathematics from './toolkits/mathematics/manifest.js';
|
|
|
2
2
|
import linear from './toolkits/linear/manifest.js';
|
|
3
3
|
import gmail from './toolkits/gmail/manifest.js';
|
|
4
4
|
import webSearch from './toolkits/web-search/manifest.js';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import github from './toolkits/github/manifest.js';
|
|
6
|
+
import notion from './toolkits/notion/manifest.js';
|
|
7
|
+
import googleCalendar from './toolkits/google-calendar/manifest.js';
|
|
8
|
+
import googleSheets from './toolkits/google-sheets/manifest.js';
|
|
9
|
+
export const toolkits = [
|
|
10
|
+
mathematics,
|
|
11
|
+
linear,
|
|
12
|
+
gmail,
|
|
13
|
+
webSearch,
|
|
14
|
+
github,
|
|
15
|
+
notion,
|
|
16
|
+
googleCalendar,
|
|
17
|
+
googleSheets,
|
|
18
|
+
];
|
|
19
|
+
export { mathematics, linear, gmail, webSearch, github, notion, googleCalendar, googleSheets, };
|
|
7
20
|
export * from './core/index.js';
|
|
8
|
-
export * from './runtime/index.js';
|
|
9
21
|
export function getAllTools() {
|
|
10
22
|
return toolkits.flatMap((t) => t.tools.map((toolDef) => ({
|
|
11
23
|
name: toolDef.name,
|
|
@@ -199,6 +199,7 @@ export function createMetaTools({ registry, credentials, hooks = {} }) {
|
|
|
199
199
|
const result = await toolInstance.execute(argsWithToken);
|
|
200
200
|
return sanitizeToolPayload({
|
|
201
201
|
toolName,
|
|
202
|
+
toolkitId: toolMetadata.toolkitId,
|
|
202
203
|
success: true,
|
|
203
204
|
result: sanitizeToolResult(result),
|
|
204
205
|
});
|
|
@@ -225,6 +226,7 @@ export function createMetaTools({ registry, credentials, hooks = {} }) {
|
|
|
225
226
|
const result = await toolInstance.execute(argsWithToken);
|
|
226
227
|
return sanitizeToolPayload({
|
|
227
228
|
toolName,
|
|
229
|
+
toolkitId: toolMetadata.toolkitId,
|
|
228
230
|
success: true,
|
|
229
231
|
result: sanitizeToolResult(result),
|
|
230
232
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const SVG = `<svg width="98" height="96" viewBox="0 0 98 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clipPath="url(#clip0_730_27126)">
|
|
3
|
+
<path d="M41.4395 69.3848C28.8066 67.8535 19.9062 58.7617 19.9062 46.9902C19.9062 42.2051 21.6289 37.0371 24.5 33.5918C23.2559 30.4336 23.4473 23.7344 24.8828 20.959C28.7109 20.4805 33.8789 22.4902 36.9414 25.2656C40.5781 24.1172 44.4062 23.543 49.0957 23.543C53.7852 23.543 57.6133 24.1172 61.0586 25.1699C64.0254 22.4902 69.2891 20.4805 73.1172 20.959C74.457 23.543 74.6484 30.2422 73.4043 33.4961C76.4668 37.1328 78.0937 42.0137 78.0937 46.9902C78.0937 58.7617 69.1934 67.6621 56.3691 69.2891C59.623 71.3945 61.8242 75.9883 61.8242 81.252L61.8242 91.2051C61.8242 94.0762 64.2168 95.7031 67.0879 94.5547C84.4102 87.9512 98 70.6289 98 49.1914C98 22.1074 75.9883 6.69539e-07 48.9043 4.309e-07C21.8203 1.92261e-07 -1.9479e-07 22.1074 -4.3343e-07 49.1914C-6.20631e-07 70.4375 13.4941 88.0469 31.6777 94.6504C34.2617 95.6074 36.75 93.8848 36.75 91.3008L36.75 83.6445C35.4102 84.2188 33.6875 84.6016 32.1562 84.6016C25.8398 84.6016 22.1074 81.1563 19.4277 74.7441C18.375 72.1602 17.2266 70.6289 15.0254 70.3418C13.877 70.2461 13.4941 69.7676 13.4941 69.1934C13.4941 68.0449 15.4082 67.1836 17.3223 67.1836C20.0977 67.1836 22.4902 68.9063 24.9785 72.4473C26.8926 75.2227 28.9023 76.4668 31.2949 76.4668C33.6875 76.4668 35.2187 75.6055 37.4199 73.4043C39.0469 71.7773 40.291 70.3418 41.4395 69.3848Z" fill="black"/>
|
|
4
|
+
</g>
|
|
5
|
+
<defs>
|
|
6
|
+
<clipPath id="clip0_730_27126">
|
|
7
|
+
<rect width="98" height="96" fill="white"/>
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
10
|
+
</svg>`;
|
|
11
|
+
export const GITHUB_ICON = {
|
|
12
|
+
kind: 'svg',
|
|
13
|
+
dataUri: `data:image/svg+xml;base64,${Buffer.from(SVG).toString('base64')}`,
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineToolkit, defineTool } from '../../core/define.js';
|
|
2
|
+
import { inferToolScope } from '../../core/scope.js';
|
|
3
|
+
import { GITHUB_ICON } from './icon.js';
|
|
4
|
+
import { githubTools } from './tools/index.js';
|
|
5
|
+
export default defineToolkit({
|
|
6
|
+
id: 'github',
|
|
7
|
+
displayName: 'GitHub',
|
|
8
|
+
shortDescription: 'Repositories, issues, pull requests, actions, and more.',
|
|
9
|
+
category: 'Developer Tools & DevOps',
|
|
10
|
+
icon: GITHUB_ICON,
|
|
11
|
+
auth: {
|
|
12
|
+
type: 'oauth2',
|
|
13
|
+
tokenField: 'githubToken',
|
|
14
|
+
provider: {
|
|
15
|
+
slug: 'github',
|
|
16
|
+
env: { clientId: 'GITHUB_CLIENT_ID', clientSecret: 'GITHUB_CLIENT_SECRET' },
|
|
17
|
+
authorizeUrl: 'https://github.com/login/oauth/authorize',
|
|
18
|
+
tokenUrl: 'https://github.com/login/oauth/access_token',
|
|
19
|
+
scopes: ['repo', 'read:user'],
|
|
20
|
+
exchangeStyle: 'json',
|
|
21
|
+
connectDescription: 'Connect GitHub to access repositories, issues, pull requests, and actions.',
|
|
22
|
+
callbackPath: '/api/auth/github/callback',
|
|
23
|
+
stateCookie: 'github_oauth_state',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
allowedHosts: ['api.github.com'],
|
|
27
|
+
tools: githubTools.map((entry) => defineTool({
|
|
28
|
+
name: entry.name,
|
|
29
|
+
description: entry.description,
|
|
30
|
+
tool: entry.tool,
|
|
31
|
+
requiredAuth: entry.requiredAuth,
|
|
32
|
+
scope: inferToolScope(entry.name),
|
|
33
|
+
})),
|
|
34
|
+
meta: { since: '0.0.2' },
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const deleteArtifact: import("ai").Tool<{
|
|
2
|
+
repo: string;
|
|
3
|
+
owner: string;
|
|
4
|
+
artifact_id: number;
|
|
5
|
+
githubToken?: string | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
error: string;
|
|
8
|
+
message?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
message: string;
|
|
11
|
+
error?: undefined;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=delete-artifact.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { Octokit } from 'octokit';
|
|
5
|
+
export const deleteArtifact = tool({
|
|
6
|
+
description: 'Delete an artifact from a GitHub repository.',
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
githubToken: z.string().optional().describe('Injected by system; do not provide'),
|
|
9
|
+
owner: z.string().describe('Repository owner (username or org)'),
|
|
10
|
+
repo: z.string().describe('Repository name'),
|
|
11
|
+
artifact_id: z.number().describe('The unique identifier of the artifact to delete'),
|
|
12
|
+
}),
|
|
13
|
+
execute: async ({ githubToken, owner, repo, artifact_id }) => {
|
|
14
|
+
if (!githubToken) {
|
|
15
|
+
return { error: 'GitHub token is required. Connect GitHub first.' };
|
|
16
|
+
}
|
|
17
|
+
const octokit = new Octokit({ auth: githubToken });
|
|
18
|
+
try {
|
|
19
|
+
await octokit.rest.actions.deleteArtifact({
|
|
20
|
+
owner,
|
|
21
|
+
repo,
|
|
22
|
+
artifact_id,
|
|
23
|
+
});
|
|
24
|
+
return { message: `Successfully deleted artifact ${artifact_id}` };
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
return { error: `Failed to delete artifact: ${error.message}` };
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=delete-artifact.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const getArtifact: import("ai").Tool<{
|
|
2
|
+
repo: string;
|
|
3
|
+
owner: string;
|
|
4
|
+
artifact_id: number;
|
|
5
|
+
githubToken?: string | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
error: string;
|
|
8
|
+
id?: undefined;
|
|
9
|
+
name?: undefined;
|
|
10
|
+
size_in_bytes?: undefined;
|
|
11
|
+
created_at?: undefined;
|
|
12
|
+
expired?: undefined;
|
|
13
|
+
expires_at?: undefined;
|
|
14
|
+
workflow_run?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
id: number;
|
|
17
|
+
name: string;
|
|
18
|
+
size_in_bytes: number;
|
|
19
|
+
created_at: string | null;
|
|
20
|
+
expired: boolean;
|
|
21
|
+
expires_at: string | null;
|
|
22
|
+
workflow_run: {
|
|
23
|
+
id?: number;
|
|
24
|
+
repository_id?: number;
|
|
25
|
+
head_repository_id?: number;
|
|
26
|
+
head_branch?: string;
|
|
27
|
+
head_sha?: string;
|
|
28
|
+
} | null | undefined;
|
|
29
|
+
error?: undefined;
|
|
30
|
+
}>;
|
|
31
|
+
//# sourceMappingURL=get-artifact.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { Octokit } from 'octokit';
|
|
5
|
+
export const getArtifact = tool({
|
|
6
|
+
description: 'Get a specific artifact from a GitHub repository by its ID.',
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
githubToken: z.string().optional().describe('Injected by system; do not provide'),
|
|
9
|
+
owner: z.string().describe('Repository owner (username or org)'),
|
|
10
|
+
repo: z.string().describe('Repository name'),
|
|
11
|
+
artifact_id: z.number().describe('The unique identifier of the artifact'),
|
|
12
|
+
}),
|
|
13
|
+
execute: async ({ githubToken, owner, repo, artifact_id }) => {
|
|
14
|
+
if (!githubToken) {
|
|
15
|
+
return { error: 'GitHub token is required. Connect GitHub first.' };
|
|
16
|
+
}
|
|
17
|
+
const octokit = new Octokit({ auth: githubToken });
|
|
18
|
+
try {
|
|
19
|
+
const { data } = await octokit.rest.actions.getArtifact({
|
|
20
|
+
owner,
|
|
21
|
+
repo,
|
|
22
|
+
artifact_id,
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
id: data.id,
|
|
26
|
+
name: data.name,
|
|
27
|
+
size_in_bytes: data.size_in_bytes,
|
|
28
|
+
created_at: data.created_at,
|
|
29
|
+
expired: data.expired,
|
|
30
|
+
expires_at: data.expires_at,
|
|
31
|
+
workflow_run: data.workflow_run,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
return { error: `Failed to get artifact: ${error.message}` };
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=get-artifact.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const getWorkflowJob: import("ai").Tool<{
|
|
2
|
+
repo: string;
|
|
3
|
+
owner: string;
|
|
4
|
+
job_id: number;
|
|
5
|
+
githubToken?: string | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
error: string;
|
|
8
|
+
id?: undefined;
|
|
9
|
+
run_id?: undefined;
|
|
10
|
+
name?: undefined;
|
|
11
|
+
status?: undefined;
|
|
12
|
+
conclusion?: undefined;
|
|
13
|
+
started_at?: undefined;
|
|
14
|
+
completed_at?: undefined;
|
|
15
|
+
html_url?: undefined;
|
|
16
|
+
steps?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
id: number;
|
|
19
|
+
run_id: number;
|
|
20
|
+
name: string;
|
|
21
|
+
status: "queued" | "in_progress" | "completed" | "waiting" | "requested" | "pending";
|
|
22
|
+
conclusion: "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required" | null;
|
|
23
|
+
started_at: string;
|
|
24
|
+
completed_at: string | null;
|
|
25
|
+
html_url: string | null;
|
|
26
|
+
steps: {
|
|
27
|
+
name: string;
|
|
28
|
+
status: "queued" | "in_progress" | "completed";
|
|
29
|
+
conclusion: string | null;
|
|
30
|
+
number: number;
|
|
31
|
+
started_at: string | null | undefined;
|
|
32
|
+
completed_at: string | null | undefined;
|
|
33
|
+
}[] | undefined;
|
|
34
|
+
error?: undefined;
|
|
35
|
+
}>;
|
|
36
|
+
//# sourceMappingURL=get-workflow-job.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { Octokit } from 'octokit';
|
|
5
|
+
export const getWorkflowJob = tool({
|
|
6
|
+
description: 'Get a specific job for a workflow run. Returns detailed job information including steps.',
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
githubToken: z.string().optional().describe('Injected by system; do not provide'),
|
|
9
|
+
owner: z.string().describe('Repository owner (username or org)'),
|
|
10
|
+
repo: z.string().describe('Repository name'),
|
|
11
|
+
job_id: z.number().describe('The unique identifier of the job'),
|
|
12
|
+
}),
|
|
13
|
+
execute: async ({ githubToken, owner, repo, job_id }) => {
|
|
14
|
+
if (!githubToken) {
|
|
15
|
+
return { error: 'GitHub token is required. Connect GitHub first.' };
|
|
16
|
+
}
|
|
17
|
+
const octokit = new Octokit({ auth: githubToken });
|
|
18
|
+
try {
|
|
19
|
+
const { data } = await octokit.rest.actions.getJobForWorkflowRun({
|
|
20
|
+
owner,
|
|
21
|
+
repo,
|
|
22
|
+
job_id,
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
id: data.id,
|
|
26
|
+
run_id: data.run_id,
|
|
27
|
+
name: data.name,
|
|
28
|
+
status: data.status,
|
|
29
|
+
conclusion: data.conclusion,
|
|
30
|
+
started_at: data.started_at,
|
|
31
|
+
completed_at: data.completed_at,
|
|
32
|
+
html_url: data.html_url,
|
|
33
|
+
steps: data.steps?.map(step => ({
|
|
34
|
+
name: step.name,
|
|
35
|
+
status: step.status,
|
|
36
|
+
conclusion: step.conclusion,
|
|
37
|
+
number: step.number,
|
|
38
|
+
started_at: step.started_at,
|
|
39
|
+
completed_at: step.completed_at,
|
|
40
|
+
})),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
return { error: `Failed to get workflow job: ${error.message}` };
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=get-workflow-job.js.map
|