@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.
Files changed (538) hide show
  1. package/README.md +104 -0
  2. package/dist/core/index.d.ts +2 -0
  3. package/dist/core/index.js +2 -0
  4. package/dist/core/schema-helpers.d.ts +20 -0
  5. package/dist/core/schema-helpers.js +157 -0
  6. package/dist/core/scope.d.ts +4 -0
  7. package/dist/core/scope.js +12 -0
  8. package/dist/index.d.ts +5 -2
  9. package/dist/index.js +15 -3
  10. package/dist/runtime/meta-tools.js +2 -0
  11. package/dist/toolkits/github/icon.d.ts +5 -0
  12. package/dist/toolkits/github/icon.js +15 -0
  13. package/dist/toolkits/github/manifest.d.ts +3 -0
  14. package/dist/toolkits/github/manifest.js +36 -0
  15. package/dist/toolkits/github/tools/Actions/delete-artifact.d.ts +13 -0
  16. package/dist/toolkits/github/tools/Actions/delete-artifact.js +31 -0
  17. package/dist/toolkits/github/tools/Actions/get-artifact.d.ts +31 -0
  18. package/dist/toolkits/github/tools/Actions/get-artifact.js +39 -0
  19. package/dist/toolkits/github/tools/Actions/get-workflow-job.d.ts +36 -0
  20. package/dist/toolkits/github/tools/Actions/get-workflow-job.js +48 -0
  21. package/dist/toolkits/github/tools/Actions/list-artifacts.d.ts +23 -0
  22. package/dist/toolkits/github/tools/Actions/list-artifacts.js +43 -0
  23. package/dist/toolkits/github/tools/Actions/list-workflow-jobs.d.ts +27 -0
  24. package/dist/toolkits/github/tools/Actions/list-workflow-jobs.js +49 -0
  25. package/dist/toolkits/github/tools/Actions/list-workflow-run-artifacts.d.ts +24 -0
  26. package/dist/toolkits/github/tools/Actions/list-workflow-run-artifacts.js +45 -0
  27. package/dist/toolkits/github/tools/Activity/list-notifications.d.ts +24 -0
  28. package/dist/toolkits/github/tools/Activity/list-notifications.js +45 -0
  29. package/dist/toolkits/github/tools/Activity/list-public-events.d.ts +18 -0
  30. package/dist/toolkits/github/tools/Activity/list-public-events.js +37 -0
  31. package/dist/toolkits/github/tools/Activity/list-repo-events.d.ts +19 -0
  32. package/dist/toolkits/github/tools/Activity/list-repo-events.js +40 -0
  33. package/dist/toolkits/github/tools/Activity/list-user-events.d.ts +17 -0
  34. package/dist/toolkits/github/tools/Activity/list-user-events.js +37 -0
  35. package/dist/toolkits/github/tools/Activity/mark-notifications-read.d.ts +11 -0
  36. package/dist/toolkits/github/tools/Activity/mark-notifications-read.js +27 -0
  37. package/dist/toolkits/github/tools/Apps/get-authenticated-app.d.ts +24 -0
  38. package/dist/toolkits/github/tools/Apps/get-authenticated-app.js +36 -0
  39. package/dist/toolkits/github/tools/Apps/get-installation.d.ts +76 -0
  40. package/dist/toolkits/github/tools/Apps/get-installation.js +36 -0
  41. package/dist/toolkits/github/tools/Apps/list-installations.d.ts +19 -0
  42. package/dist/toolkits/github/tools/Apps/list-installations.js +38 -0
  43. package/dist/toolkits/github/tools/Checks/create-check-run.d.ts +24 -0
  44. package/dist/toolkits/github/tools/Checks/create-check-run.js +43 -0
  45. package/dist/toolkits/github/tools/Checks/create-check-suite.d.ts +21 -0
  46. package/dist/toolkits/github/tools/Checks/create-check-suite.js +37 -0
  47. package/dist/toolkits/github/tools/Checks/get-check-run.d.ts +25 -0
  48. package/dist/toolkits/github/tools/Checks/get-check-run.js +39 -0
  49. package/dist/toolkits/github/tools/Checks/get-check-suite.d.ts +25 -0
  50. package/dist/toolkits/github/tools/Checks/get-check-suite.js +39 -0
  51. package/dist/toolkits/github/tools/Checks/list-check-runs.d.ts +27 -0
  52. package/dist/toolkits/github/tools/Checks/list-check-runs.js +50 -0
  53. package/dist/toolkits/github/tools/Checks/update-check-run.d.ts +23 -0
  54. package/dist/toolkits/github/tools/Checks/update-check-run.js +41 -0
  55. package/dist/toolkits/github/tools/CodeScanning/get-alert.d.ts +25 -0
  56. package/dist/toolkits/github/tools/CodeScanning/get-alert.js +41 -0
  57. package/dist/toolkits/github/tools/CodeScanning/list-alerts.d.ts +23 -0
  58. package/dist/toolkits/github/tools/CodeScanning/list-alerts.js +50 -0
  59. package/dist/toolkits/github/tools/CodeScanning/update-alert.d.ts +19 -0
  60. package/dist/toolkits/github/tools/CodeScanning/update-alert.js +39 -0
  61. package/dist/toolkits/github/tools/Collaborators/add-collaborator.d.ts +14 -0
  62. package/dist/toolkits/github/tools/Collaborators/add-collaborator.js +33 -0
  63. package/dist/toolkits/github/tools/Collaborators/check-collaborator.d.ts +13 -0
  64. package/dist/toolkits/github/tools/Collaborators/check-collaborator.js +34 -0
  65. package/dist/toolkits/github/tools/Collaborators/list-collaborators.d.ts +25 -0
  66. package/dist/toolkits/github/tools/Collaborators/list-collaborators.js +41 -0
  67. package/dist/toolkits/github/tools/Collaborators/remove-collaborator.d.ts +13 -0
  68. package/dist/toolkits/github/tools/Collaborators/remove-collaborator.js +31 -0
  69. package/dist/toolkits/github/tools/Commits/compare-commits.d.ts +30 -0
  70. package/dist/toolkits/github/tools/Commits/compare-commits.js +37 -0
  71. package/dist/toolkits/github/tools/Commits/get-commit.d.ts +46 -0
  72. package/dist/toolkits/github/tools/Commits/get-commit.js +35 -0
  73. package/dist/toolkits/github/tools/Commits/list-branches-for-head-commit.d.ts +20 -0
  74. package/dist/toolkits/github/tools/Commits/list-branches-for-head-commit.js +31 -0
  75. package/dist/toolkits/github/tools/Commits/list-commits.d.ts +21 -0
  76. package/dist/toolkits/github/tools/Commits/list-commits.js +43 -0
  77. package/dist/toolkits/github/tools/Commits/list-pull-requests-associated-with-commit.d.ts +81 -0
  78. package/dist/toolkits/github/tools/Commits/list-pull-requests-associated-with-commit.js +35 -0
  79. package/dist/toolkits/github/tools/Dependabot/get-alert.d.ts +53 -0
  80. package/dist/toolkits/github/tools/Dependabot/get-alert.js +37 -0
  81. package/dist/toolkits/github/tools/Dependabot/list-alerts.d.ts +23 -0
  82. package/dist/toolkits/github/tools/Dependabot/list-alerts.js +46 -0
  83. package/dist/toolkits/github/tools/Dependabot/update-alert.d.ts +19 -0
  84. package/dist/toolkits/github/tools/Dependabot/update-alert.js +39 -0
  85. package/dist/toolkits/github/tools/DeployKeys/create-deploy-key.d.ts +23 -0
  86. package/dist/toolkits/github/tools/DeployKeys/create-deploy-key.js +43 -0
  87. package/dist/toolkits/github/tools/DeployKeys/delete-deploy-key.d.ts +13 -0
  88. package/dist/toolkits/github/tools/DeployKeys/delete-deploy-key.js +31 -0
  89. package/dist/toolkits/github/tools/DeployKeys/get-deploy-key.d.ts +21 -0
  90. package/dist/toolkits/github/tools/DeployKeys/get-deploy-key.js +39 -0
  91. package/dist/toolkits/github/tools/DeployKeys/list-deploy-keys.d.ts +21 -0
  92. package/dist/toolkits/github/tools/DeployKeys/list-deploy-keys.js +44 -0
  93. package/dist/toolkits/github/tools/Deployments/create-deployment.d.ts +33 -0
  94. package/dist/toolkits/github/tools/Deployments/create-deployment.js +51 -0
  95. package/dist/toolkits/github/tools/Deployments/delete-deployment.d.ts +13 -0
  96. package/dist/toolkits/github/tools/Deployments/delete-deployment.js +31 -0
  97. package/dist/toolkits/github/tools/Deployments/get-deployment.d.ts +27 -0
  98. package/dist/toolkits/github/tools/Deployments/get-deployment.js +42 -0
  99. package/dist/toolkits/github/tools/Deployments/list-deployments.d.ts +27 -0
  100. package/dist/toolkits/github/tools/Deployments/list-deployments.js +52 -0
  101. package/dist/toolkits/github/tools/Environments/create-or-update-environment.d.ts +32 -0
  102. package/dist/toolkits/github/tools/Environments/create-or-update-environment.js +50 -0
  103. package/dist/toolkits/github/tools/Environments/delete-environment.d.ts +13 -0
  104. package/dist/toolkits/github/tools/Environments/delete-environment.js +31 -0
  105. package/dist/toolkits/github/tools/Environments/get-environment.d.ts +48 -0
  106. package/dist/toolkits/github/tools/Environments/get-environment.js +42 -0
  107. package/dist/toolkits/github/tools/Environments/list-environments.d.ts +23 -0
  108. package/dist/toolkits/github/tools/Environments/list-environments.js +45 -0
  109. package/dist/toolkits/github/tools/Files/create-or-update-file.d.ts +21 -0
  110. package/dist/toolkits/github/tools/Files/create-or-update-file.js +44 -0
  111. package/dist/toolkits/github/tools/Files/delete-file.d.ts +18 -0
  112. package/dist/toolkits/github/tools/Files/delete-file.js +40 -0
  113. package/dist/toolkits/github/tools/Files/get-file-content.d.ts +32 -0
  114. package/dist/toolkits/github/tools/Files/get-file-content.js +51 -0
  115. package/dist/toolkits/github/tools/Gists/create-gist.d.ts +19 -0
  116. package/dist/toolkits/github/tools/Gists/create-gist.js +37 -0
  117. package/dist/toolkits/github/tools/Gists/get-gist.d.ts +23 -0
  118. package/dist/toolkits/github/tools/Gists/get-gist.js +43 -0
  119. package/dist/toolkits/github/tools/Gists/list-gists.d.ts +19 -0
  120. package/dist/toolkits/github/tools/Gists/list-gists.js +38 -0
  121. package/dist/toolkits/github/tools/Git/create-blob.d.ts +16 -0
  122. package/dist/toolkits/github/tools/Git/create-blob.js +38 -0
  123. package/dist/toolkits/github/tools/Git/create-git-commit.d.ts +47 -0
  124. package/dist/toolkits/github/tools/Git/create-git-commit.js +51 -0
  125. package/dist/toolkits/github/tools/Git/create-ref.d.ts +24 -0
  126. package/dist/toolkits/github/tools/Git/create-ref.js +40 -0
  127. package/dist/toolkits/github/tools/Git/create-tree.d.ts +31 -0
  128. package/dist/toolkits/github/tools/Git/create-tree.js +52 -0
  129. package/dist/toolkits/github/tools/Git/delete-ref.d.ts +13 -0
  130. package/dist/toolkits/github/tools/Git/delete-ref.js +31 -0
  131. package/dist/toolkits/github/tools/Git/get-blob.d.ts +21 -0
  132. package/dist/toolkits/github/tools/Git/get-blob.js +39 -0
  133. package/dist/toolkits/github/tools/Git/get-git-commit.d.ts +40 -0
  134. package/dist/toolkits/github/tools/Git/get-git-commit.js +41 -0
  135. package/dist/toolkits/github/tools/Git/get-ref.d.ts +18 -0
  136. package/dist/toolkits/github/tools/Git/get-ref.js +42 -0
  137. package/dist/toolkits/github/tools/Git/get-tree.d.ts +27 -0
  138. package/dist/toolkits/github/tools/Git/get-tree.js +47 -0
  139. package/dist/toolkits/github/tools/Git/update-ref.d.ts +25 -0
  140. package/dist/toolkits/github/tools/Git/update-ref.js +42 -0
  141. package/dist/toolkits/github/tools/Issues/add-issue-assignees.d.ts +14 -0
  142. package/dist/toolkits/github/tools/Issues/add-issue-assignees.js +35 -0
  143. package/dist/toolkits/github/tools/Issues/add-issue-comment.d.ts +20 -0
  144. package/dist/toolkits/github/tools/Issues/add-issue-comment.js +38 -0
  145. package/dist/toolkits/github/tools/Issues/add-issue-labels.d.ts +14 -0
  146. package/dist/toolkits/github/tools/Issues/add-issue-labels.js +35 -0
  147. package/dist/toolkits/github/tools/Issues/create-issue.d.ts +22 -0
  148. package/dist/toolkits/github/tools/Issues/create-issue.js +34 -0
  149. package/dist/toolkits/github/tools/Issues/get-issue.d.ts +29 -0
  150. package/dist/toolkits/github/tools/Issues/get-issue.js +36 -0
  151. package/dist/toolkits/github/tools/Issues/list-authenticated-user-issues.d.ts +21 -0
  152. package/dist/toolkits/github/tools/Issues/list-authenticated-user-issues.js +34 -0
  153. package/dist/toolkits/github/tools/Issues/list-issue-comments.d.ts +19 -0
  154. package/dist/toolkits/github/tools/Issues/list-issue-comments.js +40 -0
  155. package/dist/toolkits/github/tools/Issues/list-org-issues.d.ts +22 -0
  156. package/dist/toolkits/github/tools/Issues/list-org-issues.js +38 -0
  157. package/dist/toolkits/github/tools/Issues/list-repo-issues.d.ts +28 -0
  158. package/dist/toolkits/github/tools/Issues/list-repo-issues.js +42 -0
  159. package/dist/toolkits/github/tools/Issues/list-user-account-issues.d.ts +21 -0
  160. package/dist/toolkits/github/tools/Issues/list-user-account-issues.js +36 -0
  161. package/dist/toolkits/github/tools/Issues/lock-issue.d.ts +15 -0
  162. package/dist/toolkits/github/tools/Issues/lock-issue.js +44 -0
  163. package/dist/toolkits/github/tools/Issues/remove-issue-label.d.ts +14 -0
  164. package/dist/toolkits/github/tools/Issues/remove-issue-label.js +33 -0
  165. package/dist/toolkits/github/tools/Issues/unlock-issue.d.ts +13 -0
  166. package/dist/toolkits/github/tools/Issues/unlock-issue.js +31 -0
  167. package/dist/toolkits/github/tools/Issues/update-issue.d.ts +22 -0
  168. package/dist/toolkits/github/tools/Issues/update-issue.js +42 -0
  169. package/dist/toolkits/github/tools/Licenses/get-license.d.ts +33 -0
  170. package/dist/toolkits/github/tools/Licenses/get-license.js +42 -0
  171. package/dist/toolkits/github/tools/Licenses/get-repo-license.d.ts +47 -0
  172. package/dist/toolkits/github/tools/Licenses/get-repo-license.js +45 -0
  173. package/dist/toolkits/github/tools/Licenses/list-licenses.d.ts +12 -0
  174. package/dist/toolkits/github/tools/Licenses/list-licenses.js +32 -0
  175. package/dist/toolkits/github/tools/Markdown/render-markdown.d.ts +13 -0
  176. package/dist/toolkits/github/tools/Markdown/render-markdown.js +31 -0
  177. package/dist/toolkits/github/tools/Organizations/get-org-membership.d.ts +58 -0
  178. package/dist/toolkits/github/tools/Organizations/get-org-membership.js +38 -0
  179. package/dist/toolkits/github/tools/Organizations/get-organization.d.ts +65 -0
  180. package/dist/toolkits/github/tools/Organizations/get-organization.js +58 -0
  181. package/dist/toolkits/github/tools/Organizations/list-org-members.d.ts +18 -0
  182. package/dist/toolkits/github/tools/Organizations/list-org-members.js +44 -0
  183. package/dist/toolkits/github/tools/Organizations/list-org-repositories.d.ts +50 -0
  184. package/dist/toolkits/github/tools/Organizations/list-org-repositories.js +69 -0
  185. package/dist/toolkits/github/tools/Organizations/list-organizations.d.ts +13 -0
  186. package/dist/toolkits/github/tools/Organizations/list-organizations.js +36 -0
  187. package/dist/toolkits/github/tools/Organizations/list-user-organizations.d.ts +20 -0
  188. package/dist/toolkits/github/tools/Organizations/list-user-organizations.js +43 -0
  189. package/dist/toolkits/github/tools/Organizations/update-organization.d.ts +33 -0
  190. package/dist/toolkits/github/tools/Organizations/update-organization.js +50 -0
  191. package/dist/toolkits/github/tools/PRs/check-pull-request-merged.d.ts +13 -0
  192. package/dist/toolkits/github/tools/PRs/check-pull-request-merged.js +34 -0
  193. package/dist/toolkits/github/tools/PRs/create-pull-request-review.d.ts +19 -0
  194. package/dist/toolkits/github/tools/PRs/create-pull-request-review.js +39 -0
  195. package/dist/toolkits/github/tools/PRs/create-pull-request.d.ts +23 -0
  196. package/dist/toolkits/github/tools/PRs/create-pull-request.js +44 -0
  197. package/dist/toolkits/github/tools/PRs/get-pull-request.d.ts +41 -0
  198. package/dist/toolkits/github/tools/PRs/get-pull-request.js +47 -0
  199. package/dist/toolkits/github/tools/PRs/list-pull-request-commits.d.ts +15 -0
  200. package/dist/toolkits/github/tools/PRs/list-pull-request-commits.js +37 -0
  201. package/dist/toolkits/github/tools/PRs/list-pull-request-files.d.ts +22 -0
  202. package/dist/toolkits/github/tools/PRs/list-pull-request-files.js +42 -0
  203. package/dist/toolkits/github/tools/PRs/list-pull-requests.d.ts +24 -0
  204. package/dist/toolkits/github/tools/PRs/list-pull-requests.js +44 -0
  205. package/dist/toolkits/github/tools/PRs/merge-pull-request.d.ts +20 -0
  206. package/dist/toolkits/github/tools/PRs/merge-pull-request.js +41 -0
  207. package/dist/toolkits/github/tools/PRs/update-pull-request-branch.d.ts +16 -0
  208. package/dist/toolkits/github/tools/PRs/update-pull-request-branch.js +36 -0
  209. package/dist/toolkits/github/tools/PRs/update-pull-request.d.ts +26 -0
  210. package/dist/toolkits/github/tools/PRs/update-pull-request.js +47 -0
  211. package/dist/toolkits/github/tools/Projects/create-org-project.d.ts +27 -0
  212. package/dist/toolkits/github/tools/Projects/create-org-project.js +43 -0
  213. package/dist/toolkits/github/tools/Projects/delete-project.d.ts +11 -0
  214. package/dist/toolkits/github/tools/Projects/delete-project.js +27 -0
  215. package/dist/toolkits/github/tools/Projects/get-project.d.ts +31 -0
  216. package/dist/toolkits/github/tools/Projects/get-project.js +42 -0
  217. package/dist/toolkits/github/tools/Projects/list-org-projects.d.ts +20 -0
  218. package/dist/toolkits/github/tools/Projects/list-org-projects.js +45 -0
  219. package/dist/toolkits/github/tools/Projects/list-project-columns.d.ts +16 -0
  220. package/dist/toolkits/github/tools/Projects/list-project-columns.js +40 -0
  221. package/dist/toolkits/github/tools/Projects/list-repo-projects.d.ts +21 -0
  222. package/dist/toolkits/github/tools/Projects/list-repo-projects.js +47 -0
  223. package/dist/toolkits/github/tools/Projects/update-project.d.ts +22 -0
  224. package/dist/toolkits/github/tools/Projects/update-project.js +41 -0
  225. package/dist/toolkits/github/tools/RateLimit/get-rate-limit.d.ts +19 -0
  226. package/dist/toolkits/github/tools/RateLimit/get-rate-limit.js +26 -0
  227. package/dist/toolkits/github/tools/Reactions/create-commit-comment-reaction.d.ts +20 -0
  228. package/dist/toolkits/github/tools/Reactions/create-commit-comment-reaction.js +40 -0
  229. package/dist/toolkits/github/tools/Reactions/create-issue-reaction.d.ts +20 -0
  230. package/dist/toolkits/github/tools/Reactions/create-issue-reaction.js +40 -0
  231. package/dist/toolkits/github/tools/Reactions/delete-reaction.d.ts +11 -0
  232. package/dist/toolkits/github/tools/Reactions/delete-reaction.js +27 -0
  233. package/dist/toolkits/github/tools/Reactions/list-commit-comment-reactions.d.ts +17 -0
  234. package/dist/toolkits/github/tools/Reactions/list-commit-comment-reactions.js +44 -0
  235. package/dist/toolkits/github/tools/Reactions/list-issue-reactions.d.ts +17 -0
  236. package/dist/toolkits/github/tools/Reactions/list-issue-reactions.js +44 -0
  237. package/dist/toolkits/github/tools/Reactions/list-pr-comment-reactions.d.ts +17 -0
  238. package/dist/toolkits/github/tools/Reactions/list-pr-comment-reactions.js +44 -0
  239. package/dist/toolkits/github/tools/Releases/create-release.d.ts +27 -0
  240. package/dist/toolkits/github/tools/Releases/create-release.js +45 -0
  241. package/dist/toolkits/github/tools/Releases/delete-release.d.ts +13 -0
  242. package/dist/toolkits/github/tools/Releases/delete-release.js +31 -0
  243. package/dist/toolkits/github/tools/Releases/generate-release-notes.d.ts +18 -0
  244. package/dist/toolkits/github/tools/Releases/generate-release-notes.js +39 -0
  245. package/dist/toolkits/github/tools/Releases/get-latest-release.d.ts +22 -0
  246. package/dist/toolkits/github/tools/Releases/get-latest-release.js +38 -0
  247. package/dist/toolkits/github/tools/Releases/get-release.d.ts +37 -0
  248. package/dist/toolkits/github/tools/Releases/get-release.js +50 -0
  249. package/dist/toolkits/github/tools/Releases/list-releases.d.ts +22 -0
  250. package/dist/toolkits/github/tools/Releases/list-releases.js +47 -0
  251. package/dist/toolkits/github/tools/Releases/update-release.d.ts +27 -0
  252. package/dist/toolkits/github/tools/Releases/update-release.js +46 -0
  253. package/dist/toolkits/github/tools/Repos/create-repo.d.ts +32 -0
  254. package/dist/toolkits/github/tools/Repos/create-repo.js +57 -0
  255. package/dist/toolkits/github/tools/Repos/fork-repo.d.ts +17 -0
  256. package/dist/toolkits/github/tools/Repos/fork-repo.js +35 -0
  257. package/dist/toolkits/github/tools/Repos/get-repo-contributors.d.ts +20 -0
  258. package/dist/toolkits/github/tools/Repos/get-repo-contributors.js +39 -0
  259. package/dist/toolkits/github/tools/Repos/get-repo-languages.d.ts +14 -0
  260. package/dist/toolkits/github/tools/Repos/get-repo-languages.js +29 -0
  261. package/dist/toolkits/github/tools/Repos/get-repo.d.ts +36 -0
  262. package/dist/toolkits/github/tools/Repos/get-repo.js +43 -0
  263. package/dist/toolkits/github/tools/Repos/list-branches.d.ts +17 -0
  264. package/dist/toolkits/github/tools/Repos/list-branches.js +37 -0
  265. package/dist/toolkits/github/tools/Repos/list-repos.d.ts +22 -0
  266. package/dist/toolkits/github/tools/Repos/list-repos.js +36 -0
  267. package/dist/toolkits/github/tools/Repos/star-repo.d.ts +13 -0
  268. package/dist/toolkits/github/tools/Repos/star-repo.js +39 -0
  269. package/dist/toolkits/github/tools/Repos/watch-repo.d.ts +18 -0
  270. package/dist/toolkits/github/tools/Repos/watch-repo.js +37 -0
  271. package/dist/toolkits/github/tools/Search/search-code.d.ts +14 -0
  272. package/dist/toolkits/github/tools/Search/search-code.js +33 -0
  273. package/dist/toolkits/github/tools/Search/search-commits.d.ts +14 -0
  274. package/dist/toolkits/github/tools/Search/search-commits.js +33 -0
  275. package/dist/toolkits/github/tools/Search/search-issues.d.ts +23 -0
  276. package/dist/toolkits/github/tools/Search/search-issues.js +43 -0
  277. package/dist/toolkits/github/tools/Search/search-labels.d.ts +15 -0
  278. package/dist/toolkits/github/tools/Search/search-labels.js +35 -0
  279. package/dist/toolkits/github/tools/Search/search-repos.d.ts +22 -0
  280. package/dist/toolkits/github/tools/Search/search-repos.js +47 -0
  281. package/dist/toolkits/github/tools/Search/search-topics.d.ts +12 -0
  282. package/dist/toolkits/github/tools/Search/search-topics.js +29 -0
  283. package/dist/toolkits/github/tools/Search/search-users.d.ts +21 -0
  284. package/dist/toolkits/github/tools/Search/search-users.js +41 -0
  285. package/dist/toolkits/github/tools/SecretScanning/get-alert.d.ts +33 -0
  286. package/dist/toolkits/github/tools/SecretScanning/get-alert.js +45 -0
  287. package/dist/toolkits/github/tools/SecretScanning/list-alerts.d.ts +25 -0
  288. package/dist/toolkits/github/tools/SecretScanning/list-alerts.js +53 -0
  289. package/dist/toolkits/github/tools/SecretScanning/update-alert.d.ts +19 -0
  290. package/dist/toolkits/github/tools/SecretScanning/update-alert.js +41 -0
  291. package/dist/toolkits/github/tools/SecurityAdvisories/create-repository-advisory.d.ts +34 -0
  292. package/dist/toolkits/github/tools/SecurityAdvisories/create-repository-advisory.js +52 -0
  293. package/dist/toolkits/github/tools/SecurityAdvisories/get-repository-advisory.d.ts +27 -0
  294. package/dist/toolkits/github/tools/SecurityAdvisories/get-repository-advisory.js +42 -0
  295. package/dist/toolkits/github/tools/SecurityAdvisories/list-global-advisories.d.ts +14 -0
  296. package/dist/toolkits/github/tools/SecurityAdvisories/list-global-advisories.js +37 -0
  297. package/dist/toolkits/github/tools/SecurityAdvisories/list-repository-advisories.d.ts +22 -0
  298. package/dist/toolkits/github/tools/SecurityAdvisories/list-repository-advisories.js +47 -0
  299. package/dist/toolkits/github/tools/Stars/check-repo-starred.d.ts +12 -0
  300. package/dist/toolkits/github/tools/Stars/check-repo-starred.js +32 -0
  301. package/dist/toolkits/github/tools/Stars/list-stargazers.d.ts +15 -0
  302. package/dist/toolkits/github/tools/Stars/list-stargazers.js +40 -0
  303. package/dist/toolkits/github/tools/Stars/list-starred-repos.d.ts +15 -0
  304. package/dist/toolkits/github/tools/Stars/list-starred-repos.js +38 -0
  305. package/dist/toolkits/github/tools/Stars/star-repo.d.ts +12 -0
  306. package/dist/toolkits/github/tools/Stars/star-repo.js +29 -0
  307. package/dist/toolkits/github/tools/Stars/unstar-repo.d.ts +12 -0
  308. package/dist/toolkits/github/tools/Stars/unstar-repo.js +29 -0
  309. package/dist/toolkits/github/tools/Statuses/create-commit-status.d.ts +25 -0
  310. package/dist/toolkits/github/tools/Statuses/create-commit-status.js +44 -0
  311. package/dist/toolkits/github/tools/Statuses/get-combined-status.d.ts +26 -0
  312. package/dist/toolkits/github/tools/Statuses/get-combined-status.js +44 -0
  313. package/dist/toolkits/github/tools/Statuses/list-commit-statuses.d.ts +18 -0
  314. package/dist/toolkits/github/tools/Statuses/list-commit-statuses.js +44 -0
  315. package/dist/toolkits/github/tools/Teams/add-team-repo.d.ts +15 -0
  316. package/dist/toolkits/github/tools/Teams/add-team-repo.js +35 -0
  317. package/dist/toolkits/github/tools/Teams/create-team.d.ts +32 -0
  318. package/dist/toolkits/github/tools/Teams/create-team.js +46 -0
  319. package/dist/toolkits/github/tools/Teams/delete-team.d.ts +12 -0
  320. package/dist/toolkits/github/tools/Teams/delete-team.js +29 -0
  321. package/dist/toolkits/github/tools/Teams/get-team.d.ts +28 -0
  322. package/dist/toolkits/github/tools/Teams/get-team.js +41 -0
  323. package/dist/toolkits/github/tools/Teams/list-team-members.d.ts +16 -0
  324. package/dist/toolkits/github/tools/Teams/list-team-members.js +42 -0
  325. package/dist/toolkits/github/tools/Teams/list-team-repos.d.ts +22 -0
  326. package/dist/toolkits/github/tools/Teams/list-team-repos.js +41 -0
  327. package/dist/toolkits/github/tools/Teams/list-teams.d.ts +18 -0
  328. package/dist/toolkits/github/tools/Teams/list-teams.js +42 -0
  329. package/dist/toolkits/github/tools/Teams/remove-team-repo.d.ts +14 -0
  330. package/dist/toolkits/github/tools/Teams/remove-team-repo.js +33 -0
  331. package/dist/toolkits/github/tools/Teams/update-team.d.ts +27 -0
  332. package/dist/toolkits/github/tools/Teams/update-team.js +44 -0
  333. package/dist/toolkits/github/tools/Users/follow-user.d.ts +12 -0
  334. package/dist/toolkits/github/tools/Users/follow-user.js +36 -0
  335. package/dist/toolkits/github/tools/Users/get-github-user.d.ts +64 -0
  336. package/dist/toolkits/github/tools/Users/get-github-user.js +48 -0
  337. package/dist/toolkits/github/tools/Users/get-user-by-id.d.ts +53 -0
  338. package/dist/toolkits/github/tools/Users/get-user-by-id.js +27 -0
  339. package/dist/toolkits/github/tools/Users/get-user-context.d.ts +14 -0
  340. package/dist/toolkits/github/tools/Users/get-user-context.js +32 -0
  341. package/dist/toolkits/github/tools/Users/get-user.d.ts +53 -0
  342. package/dist/toolkits/github/tools/Users/get-user.js +27 -0
  343. package/dist/toolkits/github/tools/Users/list-users.d.ts +31 -0
  344. package/dist/toolkits/github/tools/Users/list-users.js +29 -0
  345. package/dist/toolkits/github/tools/Users/update-authenticated-user.d.ts +62 -0
  346. package/dist/toolkits/github/tools/Users/update-authenticated-user.js +39 -0
  347. package/dist/toolkits/github/tools/Webhooks/create-repo-webhook.d.ts +34 -0
  348. package/dist/toolkits/github/tools/Webhooks/create-repo-webhook.js +47 -0
  349. package/dist/toolkits/github/tools/Webhooks/delete-repo-webhook.d.ts +13 -0
  350. package/dist/toolkits/github/tools/Webhooks/delete-repo-webhook.js +31 -0
  351. package/dist/toolkits/github/tools/Webhooks/get-repo-webhook.d.ts +30 -0
  352. package/dist/toolkits/github/tools/Webhooks/get-repo-webhook.js +41 -0
  353. package/dist/toolkits/github/tools/Webhooks/list-repo-webhooks.d.ts +31 -0
  354. package/dist/toolkits/github/tools/Webhooks/list-repo-webhooks.js +47 -0
  355. package/dist/toolkits/github/tools/Webhooks/update-repo-webhook.d.ts +36 -0
  356. package/dist/toolkits/github/tools/Webhooks/update-repo-webhook.js +50 -0
  357. package/dist/toolkits/github/tools/Workflows/get-workflow-run.d.ts +31 -0
  358. package/dist/toolkits/github/tools/Workflows/get-workflow-run.js +42 -0
  359. package/dist/toolkits/github/tools/Workflows/list-workflow-runs.d.ts +25 -0
  360. package/dist/toolkits/github/tools/Workflows/list-workflow-runs.js +59 -0
  361. package/dist/toolkits/github/tools/Workflows/list-workflows.d.ts +21 -0
  362. package/dist/toolkits/github/tools/Workflows/list-workflows.js +40 -0
  363. package/dist/toolkits/github/tools/Workflows/trigger-workflow.d.ts +15 -0
  364. package/dist/toolkits/github/tools/Workflows/trigger-workflow.js +35 -0
  365. package/dist/toolkits/github/tools/index.d.ts +176 -0
  366. package/dist/toolkits/github/tools/index.js +646 -0
  367. package/dist/toolkits/gmail/icon.js +25 -1
  368. package/dist/toolkits/gmail/manifest.js +78 -5
  369. package/dist/toolkits/gmail/tools/create-draft.d.ts +34 -0
  370. package/dist/toolkits/gmail/tools/create-draft.js +60 -0
  371. package/dist/toolkits/gmail/tools/delete-draft.d.ts +23 -0
  372. package/dist/toolkits/gmail/tools/delete-draft.js +34 -0
  373. package/dist/toolkits/gmail/tools/get-draft.d.ts +32 -0
  374. package/dist/toolkits/gmail/tools/get-draft.js +36 -0
  375. package/dist/toolkits/gmail/tools/get-message.d.ts +12 -12
  376. package/dist/toolkits/gmail/tools/get-message.js +3 -24
  377. package/dist/toolkits/gmail/tools/get-thread.d.ts +29 -0
  378. package/dist/toolkits/gmail/tools/get-thread.js +39 -0
  379. package/dist/toolkits/gmail/tools/index.d.ts +17 -0
  380. package/dist/toolkits/gmail/tools/index.js +17 -0
  381. package/dist/toolkits/gmail/tools/list-drafts.d.ts +28 -0
  382. package/dist/toolkits/gmail/tools/list-drafts.js +43 -0
  383. package/dist/toolkits/gmail/tools/list-labels.d.ts +20 -0
  384. package/dist/toolkits/gmail/tools/list-labels.js +46 -0
  385. package/dist/toolkits/gmail/tools/list-threads.d.ts +28 -0
  386. package/dist/toolkits/gmail/tools/list-threads.js +43 -0
  387. package/dist/toolkits/gmail/tools/modify-message-labels.d.ts +31 -0
  388. package/dist/toolkits/gmail/tools/modify-message-labels.js +44 -0
  389. package/dist/toolkits/gmail/tools/reply-to-thread.d.ts +33 -0
  390. package/dist/toolkits/gmail/tools/reply-to-thread.js +58 -0
  391. package/dist/toolkits/gmail/tools/send-draft.d.ts +29 -0
  392. package/dist/toolkits/gmail/tools/send-draft.js +41 -0
  393. package/dist/toolkits/gmail/tools/send-message.d.ts +4 -1
  394. package/dist/toolkits/gmail/tools/send-message.js +18 -16
  395. package/dist/toolkits/gmail/tools/trash-message.d.ts +29 -0
  396. package/dist/toolkits/gmail/tools/trash-message.js +37 -0
  397. package/dist/toolkits/gmail/tools/untrash-message.d.ts +29 -0
  398. package/dist/toolkits/gmail/tools/untrash-message.js +37 -0
  399. package/dist/toolkits/gmail/tools/utils.d.ts +41 -0
  400. package/dist/toolkits/gmail/tools/utils.js +97 -0
  401. package/dist/toolkits/google-calendar/icon.d.ts +5 -0
  402. package/dist/toolkits/google-calendar/icon.js +6 -0
  403. package/dist/toolkits/google-calendar/manifest.d.ts +3 -0
  404. package/dist/toolkits/google-calendar/manifest.js +45 -0
  405. package/dist/toolkits/google-calendar/tools/create-event.d.ts +27 -0
  406. package/dist/toolkits/google-calendar/tools/create-event.js +54 -0
  407. package/dist/toolkits/google-calendar/tools/delete-event.d.ts +27 -0
  408. package/dist/toolkits/google-calendar/tools/delete-event.js +38 -0
  409. package/dist/toolkits/google-calendar/tools/get-event.d.ts +24 -0
  410. package/dist/toolkits/google-calendar/tools/get-event.js +37 -0
  411. package/dist/toolkits/google-calendar/tools/index.d.ts +185 -0
  412. package/dist/toolkits/google-calendar/tools/index.js +47 -0
  413. package/dist/toolkits/google-calendar/tools/list-events.d.ts +24 -0
  414. package/dist/toolkits/google-calendar/tools/list-events.js +46 -0
  415. package/dist/toolkits/google-calendar/tools/search-events.d.ts +27 -0
  416. package/dist/toolkits/google-calendar/tools/search-events.js +49 -0
  417. package/dist/toolkits/google-calendar/tools/update-event.d.ts +29 -0
  418. package/dist/toolkits/google-calendar/tools/update-event.js +56 -0
  419. package/dist/toolkits/google-sheets/icon.d.ts +5 -0
  420. package/dist/toolkits/google-sheets/icon.js +13 -0
  421. package/dist/toolkits/google-sheets/manifest.d.ts +3 -0
  422. package/dist/toolkits/google-sheets/manifest.js +45 -0
  423. package/dist/toolkits/google-sheets/tools/append-values.d.ts +41 -0
  424. package/dist/toolkits/google-sheets/tools/append-values.js +51 -0
  425. package/dist/toolkits/google-sheets/tools/clear-values.d.ts +27 -0
  426. package/dist/toolkits/google-sheets/tools/clear-values.js +41 -0
  427. package/dist/toolkits/google-sheets/tools/create-spreadsheet.d.ts +33 -0
  428. package/dist/toolkits/google-sheets/tools/create-spreadsheet.js +59 -0
  429. package/dist/toolkits/google-sheets/tools/get-spreadsheet.d.ts +5 -0
  430. package/dist/toolkits/google-sheets/tools/get-spreadsheet.js +33 -0
  431. package/dist/toolkits/google-sheets/tools/get-values.d.ts +6 -0
  432. package/dist/toolkits/google-sheets/tools/get-values.js +34 -0
  433. package/dist/toolkits/google-sheets/tools/index.d.ts +209 -0
  434. package/dist/toolkits/google-sheets/tools/index.js +61 -0
  435. package/dist/toolkits/google-sheets/tools/list-spreadsheets.d.ts +21 -0
  436. package/dist/toolkits/google-sheets/tools/list-spreadsheets.js +43 -0
  437. package/dist/toolkits/google-sheets/tools/update-values.d.ts +38 -0
  438. package/dist/toolkits/google-sheets/tools/update-values.js +50 -0
  439. package/dist/toolkits/linear/icon.js +24 -1
  440. package/dist/toolkits/mathematics/icon.js +1 -1
  441. package/dist/toolkits/notion/icon.d.ts +5 -0
  442. package/dist/toolkits/notion/icon.js +10 -0
  443. package/dist/toolkits/notion/manifest.d.ts +3 -0
  444. package/dist/toolkits/notion/manifest.js +37 -0
  445. package/dist/toolkits/notion/tools/append-block-children.d.ts +6 -0
  446. package/dist/toolkits/notion/tools/append-block-children.js +30 -0
  447. package/dist/toolkits/notion/tools/create-page.d.ts +12 -0
  448. package/dist/toolkits/notion/tools/create-page.js +40 -0
  449. package/dist/toolkits/notion/tools/get-database.d.ts +5 -0
  450. package/dist/toolkits/notion/tools/get-database.js +25 -0
  451. package/dist/toolkits/notion/tools/get-page.d.ts +15 -0
  452. package/dist/toolkits/notion/tools/get-page.js +42 -0
  453. package/dist/toolkits/notion/tools/index.d.ts +16 -0
  454. package/dist/toolkits/notion/tools/index.js +61 -0
  455. package/dist/toolkits/notion/tools/list-databases.d.ts +5 -0
  456. package/dist/toolkits/notion/tools/list-databases.js +33 -0
  457. package/dist/toolkits/notion/tools/query-database.d.ts +8 -0
  458. package/dist/toolkits/notion/tools/query-database.js +34 -0
  459. package/dist/toolkits/notion/tools/search.d.ts +14 -0
  460. package/dist/toolkits/notion/tools/search.js +41 -0
  461. package/dist/toolkits/notion/tools/update-page.d.ts +9 -0
  462. package/dist/toolkits/notion/tools/update-page.js +36 -0
  463. package/dist/toolkits/web-search/icon.js +3 -1
  464. package/package.json +5 -6
  465. package/dist/core/categories.d.ts.map +0 -1
  466. package/dist/core/categories.js.map +0 -1
  467. package/dist/core/define.d.ts.map +0 -1
  468. package/dist/core/define.js.map +0 -1
  469. package/dist/core/index.d.ts.map +0 -1
  470. package/dist/core/index.js.map +0 -1
  471. package/dist/core/types.d.ts.map +0 -1
  472. package/dist/core/types.js.map +0 -1
  473. package/dist/core/validate.d.ts.map +0 -1
  474. package/dist/core/validate.js.map +0 -1
  475. package/dist/index.d.ts.map +0 -1
  476. package/dist/index.js.map +0 -1
  477. package/dist/runtime/credentials.d.ts.map +0 -1
  478. package/dist/runtime/credentials.js.map +0 -1
  479. package/dist/runtime/index.d.ts.map +0 -1
  480. package/dist/runtime/index.js.map +0 -1
  481. package/dist/runtime/meta-tools.d.ts.map +0 -1
  482. package/dist/runtime/meta-tools.js.map +0 -1
  483. package/dist/runtime/registry.d.ts.map +0 -1
  484. package/dist/runtime/registry.js.map +0 -1
  485. package/dist/runtime/schema-helpers.d.ts.map +0 -1
  486. package/dist/runtime/schema-helpers.js.map +0 -1
  487. package/dist/toolkits/gmail/icon.d.ts.map +0 -1
  488. package/dist/toolkits/gmail/icon.js.map +0 -1
  489. package/dist/toolkits/gmail/manifest.d.ts.map +0 -1
  490. package/dist/toolkits/gmail/manifest.js.map +0 -1
  491. package/dist/toolkits/gmail/tools/get-message.d.ts.map +0 -1
  492. package/dist/toolkits/gmail/tools/get-message.js.map +0 -1
  493. package/dist/toolkits/gmail/tools/list-messages.d.ts.map +0 -1
  494. package/dist/toolkits/gmail/tools/list-messages.js.map +0 -1
  495. package/dist/toolkits/gmail/tools/send-message.d.ts.map +0 -1
  496. package/dist/toolkits/gmail/tools/send-message.js.map +0 -1
  497. package/dist/toolkits/linear/icon.d.ts.map +0 -1
  498. package/dist/toolkits/linear/icon.js.map +0 -1
  499. package/dist/toolkits/linear/manifest.d.ts.map +0 -1
  500. package/dist/toolkits/linear/manifest.js.map +0 -1
  501. package/dist/toolkits/linear/tools/create-issue.d.ts.map +0 -1
  502. package/dist/toolkits/linear/tools/create-issue.js.map +0 -1
  503. package/dist/toolkits/linear/tools/list-teams.d.ts.map +0 -1
  504. package/dist/toolkits/linear/tools/list-teams.js.map +0 -1
  505. package/dist/toolkits/linear/tools/search-issues.d.ts.map +0 -1
  506. package/dist/toolkits/linear/tools/search-issues.js.map +0 -1
  507. package/dist/toolkits/mathematics/icon.d.ts.map +0 -1
  508. package/dist/toolkits/mathematics/icon.js.map +0 -1
  509. package/dist/toolkits/mathematics/manifest.d.ts.map +0 -1
  510. package/dist/toolkits/mathematics/manifest.js.map +0 -1
  511. package/dist/toolkits/mathematics/tools/calculate-combinatorics.d.ts.map +0 -1
  512. package/dist/toolkits/mathematics/tools/calculate-combinatorics.js.map +0 -1
  513. package/dist/toolkits/mathematics/tools/calculate-matrix-determinant.d.ts.map +0 -1
  514. package/dist/toolkits/mathematics/tools/calculate-matrix-determinant.js.map +0 -1
  515. package/dist/toolkits/mathematics/tools/calculate-percentage.d.ts.map +0 -1
  516. package/dist/toolkits/mathematics/tools/calculate-percentage.js.map +0 -1
  517. package/dist/toolkits/mathematics/tools/calculate-product.d.ts.map +0 -1
  518. package/dist/toolkits/mathematics/tools/calculate-product.js.map +0 -1
  519. package/dist/toolkits/mathematics/tools/calculate-quadratic-roots.d.ts.map +0 -1
  520. package/dist/toolkits/mathematics/tools/calculate-quadratic-roots.js.map +0 -1
  521. package/dist/toolkits/mathematics/tools/calculate-statistics.d.ts.map +0 -1
  522. package/dist/toolkits/mathematics/tools/calculate-statistics.js.map +0 -1
  523. package/dist/toolkits/mathematics/tools/calculate-sum.d.ts.map +0 -1
  524. package/dist/toolkits/mathematics/tools/calculate-sum.js.map +0 -1
  525. package/dist/toolkits/mathematics/tools/get-random-number.d.ts.map +0 -1
  526. package/dist/toolkits/mathematics/tools/get-random-number.js.map +0 -1
  527. package/dist/toolkits/mathematics/tools/solve-linear-equations.d.ts.map +0 -1
  528. package/dist/toolkits/mathematics/tools/solve-linear-equations.js.map +0 -1
  529. package/dist/toolkits/web-search/icon.d.ts.map +0 -1
  530. package/dist/toolkits/web-search/icon.js.map +0 -1
  531. package/dist/toolkits/web-search/manifest.d.ts.map +0 -1
  532. package/dist/toolkits/web-search/manifest.js.map +0 -1
  533. package/dist/toolkits/web-search/tools/firecrawl-client.d.ts.map +0 -1
  534. package/dist/toolkits/web-search/tools/firecrawl-client.js.map +0 -1
  535. package/dist/toolkits/web-search/tools/web-scrape.d.ts.map +0 -1
  536. package/dist/toolkits/web-search/tools/web-scrape.js.map +0 -1
  537. package/dist/toolkits/web-search/tools/web-search.d.ts.map +0 -1
  538. package/dist/toolkits/web-search/tools/web-search.js.map +0 -1
@@ -0,0 +1,97 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * Base64URL encodes a string in accordance with RFC 4648 §5.
4
+ */
5
+ export function encodeBase64Url(str) {
6
+ return Buffer.from(str, 'utf-8')
7
+ .toString('base64')
8
+ .replace(/\+/g, '-')
9
+ .replace(/\//g, '_')
10
+ .replace(/=+$/, '');
11
+ }
12
+ /**
13
+ * Base64URL decodes a string back to UTF-8.
14
+ */
15
+ export function decodeBase64Url(data) {
16
+ const base64 = data.replace(/-/g, '+').replace(/_/g, '/');
17
+ return Buffer.from(base64, 'base64').toString('utf-8');
18
+ }
19
+ /**
20
+ * Encodes an email with standard RFC 2822 headers into Base64URL format.
21
+ */
22
+ export function encodeRFC822Message(params) {
23
+ const headerLines = [
24
+ `To: ${params.to}`,
25
+ params.cc ? `Cc: ${params.cc}` : null,
26
+ params.bcc ? `Bcc: ${params.bcc}` : null,
27
+ `Subject: ${params.subject}`,
28
+ params.inReplyTo ? `In-Reply-To: ${params.inReplyTo}` : null,
29
+ params.references ? `References: ${params.references}` : null,
30
+ 'Content-Type: text/plain; charset="UTF-8"',
31
+ 'MIME-Version: 1.0',
32
+ ].filter(Boolean);
33
+ const raw = `${headerLines.join('\n')}\n\n${params.body}`;
34
+ return encodeBase64Url(raw);
35
+ }
36
+ /**
37
+ * Recursively extracts plain text (or HTML fallback) body from a Gmail message payload.
38
+ */
39
+ export function extractBodyFromPayload(payload) {
40
+ if (!payload)
41
+ return '';
42
+ if (payload.body?.data) {
43
+ return decodeBase64Url(payload.body.data);
44
+ }
45
+ if (payload.parts && Array.isArray(payload.parts)) {
46
+ // Look for text/plain first
47
+ const plainPart = payload.parts.find((p) => p.mimeType === 'text/plain');
48
+ if (plainPart?.body?.data) {
49
+ return decodeBase64Url(plainPart.body.data);
50
+ }
51
+ // Check nested parts (multipart/alternative, multipart/mixed, etc.)
52
+ for (const part of payload.parts) {
53
+ if (part.parts) {
54
+ const nested = extractBodyFromPayload(part);
55
+ if (nested)
56
+ return nested;
57
+ }
58
+ }
59
+ // Fallback to text/html if plain text not available
60
+ const htmlPart = payload.parts.find((p) => p.mimeType === 'text/html');
61
+ if (htmlPart?.body?.data) {
62
+ return decodeBase64Url(htmlPart.body.data);
63
+ }
64
+ }
65
+ return '';
66
+ }
67
+ /**
68
+ * Extracts structured message details and headers from a Gmail message API response.
69
+ */
70
+ export function extractMessageDetails(data, maxBodyLength = 4000) {
71
+ if (!data)
72
+ return null;
73
+ const headers = data.payload?.headers || [];
74
+ const getHeader = (name) => headers.find((h) => h.name.toLowerCase() === name.toLowerCase())?.value;
75
+ const subject = getHeader('subject');
76
+ const from = getHeader('from');
77
+ const to = getHeader('to');
78
+ const cc = getHeader('cc');
79
+ const date = getHeader('date');
80
+ const messageIdHeader = getHeader('message-id');
81
+ const rawBody = extractBodyFromPayload(data.payload);
82
+ const body = rawBody ? rawBody.substring(0, maxBodyLength) : '';
83
+ return {
84
+ id: data.id,
85
+ threadId: data.threadId,
86
+ labelIds: data.labelIds || [],
87
+ snippet: data.snippet,
88
+ subject,
89
+ from,
90
+ to,
91
+ cc,
92
+ date,
93
+ messageIdHeader,
94
+ body,
95
+ };
96
+ }
97
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,5 @@
1
+ export declare const GCAL_ICON: {
2
+ kind: "svg";
3
+ dataUri: string;
4
+ };
5
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1,6 @@
1
+ const SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" fill="none"><path fill="#bbe2ff" d="M32 36.8C32 20.894 44.894 8 60.8 8h70.4C147.106 8 160 20.894 160 36.8v30.4c0 15.906-12.894 28.8-28.8 28.8H60.8C44.894 96 32 83.106 32 67.2z"/><path fill="#3c90ff" d="M19.867 49.392C17.818 33.82 29.94 20 45.645 20h100.71c15.706 0 27.827 13.82 25.778 29.392L166 96l6.133 46.608C174.182 158.18 162.061 172 146.355 172H45.645c-15.706 0-27.827-13.82-25.778-29.392L26 96z"/><mask id="a" width="154" height="152" x="19" y="20" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#3c90ff" d="M19.867 49.392C17.818 33.82 29.94 20 45.645 20h100.71c15.706 0 27.827 13.82 25.778 29.392L166 96l6.133 46.608C174.182 158.18 162.061 172 146.355 172H45.645c-15.706 0-27.827-13.82-25.778-29.392L26 96z"/></mask><g mask="url(#a)"><path fill="url(#b)" d="M0 0h166v76H0z" transform="matrix(1 0 0 -1 13 172)"/></g><mask id="c" width="154" height="152" x="19" y="20" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#3186ff" d="M19.867 49.392C17.818 33.82 29.94 20 45.645 20h100.71c15.706 0 27.827 13.82 25.778 29.392L166 96l6.133 46.608C174.182 158.18 162.061 172 146.355 172H45.645c-15.706 0-27.827-13.82-25.778-29.392L26 96z"/></mask><g mask="url(#c)"><path fill="url(#d)" d="M32 27.2C32 16.596 40.596 8 51.2 8h89.6c10.604 0 19.2 8.596 19.2 19.2V96H32z" filter="url(#e)"/></g><path fill="#fff" d="M75.353 133.336q-6.282 0-10.777-2.043t-7.61-5.465q-3.065-3.474-4.342-6.793T51.603 115a2.07 2.07 0 0 1 1.021-1.124l5.67-2.247q.714-.357 1.43-.102.714.204 1.685 2.349 1.022 2.145 2.86 4.546a14.3 14.3 0 0 0 4.495 3.728q2.606 1.328 6.435 1.328 6.18 0 9.807-3.575 3.677-3.575 3.677-9.091 0-5.976-3.882-9.194-3.881-3.269-10.266-3.269h-5.362a1.9 1.9 0 0 1-1.328-.51q-.51-.562-.511-1.277v-5.465q0-.767.51-1.277a1.82 1.82 0 0 1 1.329-.562h4.647q5.721 0 9.194-3.116t3.473-8.07q0-4.902-3.116-7.916t-8.58-3.014q-3.065 0-5.312 1.022a11.5 11.5 0 0 0-3.882 2.86 22.7 22.7 0 0 0-2.809 3.78q-1.174 1.941-1.89 2.145-.714.153-1.379-.255l-5.363-2.605q-.664-.358-.868-1.124t1.226-3.575q1.481-2.86 4.494-5.823a21 21 0 0 1 7.049-4.597q4.035-1.635 9.398-1.634 9.96 0 15.782 5.26 5.823 5.21 5.823 13.791 0 5.925-2.86 10.266-2.81 4.34-7.968 6.13v.204q6.231 1.838 9.806 6.741 3.627 4.853 3.626 11.594 0 9.654-6.742 15.834-6.74 6.18-17.57 6.18zm51.25-1.175q-.868 0-1.533-.664a2.25 2.25 0 0 1-.612-1.583V73.118l-11.492 8.274q-.614.46-1.431.307a1.96 1.96 0 0 1-1.225-.766l-3.32-4.7a1.98 1.98 0 0 1-.358-1.43q.153-.816.817-1.276l20.379-14.557q.256-.204.562-.306.307-.153.715-.153h4.291q.868 0 1.379.613.562.56.562 1.43v69.36q0 .92-.664 1.583a2 2 0 0 1-1.533.664z"/><defs><linearGradient id="b" x1="83" x2="83" y1="76" gradientUnits="userSpaceOnUse"><stop stop-color="#4fa0ff"/><stop offset="1" stop-color="#3186ff"/></linearGradient><linearGradient id="d" x1="89.06" x2="89.06" y1="21.75" y2="96.39" gradientUnits="userSpaceOnUse"><stop stop-color="#a9a8ff"/><stop offset=".8" stop-color="#3c90ff"/></linearGradient><filter id="e" width="152" height="112" x="20" y="-4" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_37330_7673" stdDeviation="6"/></filter></defs></svg>`;
2
+ export const GCAL_ICON = {
3
+ kind: 'svg',
4
+ dataUri: `data:image/svg+xml;base64,${Buffer.from(SVG).toString('base64')}`,
5
+ };
6
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1,3 @@
1
+ declare const _default: import("../../index.js").ToolkitManifest;
2
+ export default _default;
3
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1,45 @@
1
+ import { defineToolkit, defineTool } from '../../core/define.js';
2
+ import { inferToolScope } from '../../core/scope.js';
3
+ import { GCAL_ICON } from './icon.js';
4
+ import { googleCalendarTools } from './tools/index.js';
5
+ export default defineToolkit({
6
+ id: 'google-calendar',
7
+ displayName: 'Google Calendar',
8
+ shortDescription: 'List, search, create, update, and delete calendar events.',
9
+ category: 'Scheduling & Booking',
10
+ icon: GCAL_ICON,
11
+ auth: {
12
+ type: 'oauth2',
13
+ tokenField: 'googleCalendarToken',
14
+ provider: {
15
+ slug: 'googlecalendar',
16
+ env: {
17
+ clientId: 'GOOGLE_CALENDAR_CLIENT_ID',
18
+ clientSecret: 'GOOGLE_CALENDAR_CLIENT_SECRET',
19
+ clientIdFallback: 'GMAIL_CLIENT_ID',
20
+ clientSecretFallback: 'GMAIL_CLIENT_SECRET',
21
+ },
22
+ authorizeUrl: 'https://accounts.google.com/o/oauth2/v2/auth',
23
+ tokenUrl: 'https://oauth2.googleapis.com/token',
24
+ scopes: [
25
+ 'https://www.googleapis.com/auth/calendar.readonly',
26
+ 'https://www.googleapis.com/auth/calendar.events',
27
+ ],
28
+ exchangeStyle: 'form',
29
+ extraAuthParams: { access_type: 'offline', prompt: 'consent' },
30
+ connectDescription: 'Integrate Google Calendar to view and manage events.',
31
+ callbackPath: '/api/auth/googlecalendar/callback',
32
+ stateCookie: 'google_calendar_oauth_state',
33
+ },
34
+ },
35
+ allowedHosts: ['www.googleapis.com'],
36
+ tools: googleCalendarTools.map((entry) => defineTool({
37
+ name: entry.name,
38
+ description: entry.description,
39
+ tool: entry.tool,
40
+ requiredAuth: entry.requiredAuth,
41
+ scope: inferToolScope(entry.name),
42
+ })),
43
+ meta: { since: '0.0.2' },
44
+ });
45
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1,27 @@
1
+ export declare const createEvent: import("ai").Tool<{
2
+ summary: string;
3
+ googleCalendarToken: string;
4
+ start: string;
5
+ end: string;
6
+ description?: string | undefined;
7
+ location?: string | undefined;
8
+ }, {
9
+ error: string;
10
+ details: any;
11
+ success?: undefined;
12
+ event?: undefined;
13
+ message?: undefined;
14
+ } | {
15
+ success: boolean;
16
+ event: any;
17
+ error?: undefined;
18
+ details?: undefined;
19
+ message?: undefined;
20
+ } | {
21
+ error: string;
22
+ message: string;
23
+ details?: undefined;
24
+ success?: undefined;
25
+ event?: undefined;
26
+ }>;
27
+ //# sourceMappingURL=create-event.d.ts.map
@@ -0,0 +1,54 @@
1
+ // @ts-nocheck
2
+ import { tool } from 'ai';
3
+ import { z } from 'zod';
4
+ export const createEvent = tool({
5
+ description: 'Create a new event in the user\'s primary Google Calendar.',
6
+ inputSchema: z.object({
7
+ googleCalendarToken: z.string().describe('The Google Calendar access token'),
8
+ summary: z.string().describe('Summary/Title of the event'),
9
+ description: z.string().optional().describe('Description of the event'),
10
+ start: z.string().describe('Start time (RFC3339 timestamp, e.g., 2023-01-01T10:00:00Z)'),
11
+ end: z.string().describe('End time (RFC3339 timestamp, e.g., 2023-01-01T11:00:00Z)'),
12
+ location: z.string().optional().describe('Location of the event'),
13
+ }),
14
+ execute: async ({ googleCalendarToken, summary, description, start, end, location }) => {
15
+ try {
16
+ const url = 'https://www.googleapis.com/calendar/v3/calendars/primary/events';
17
+ const event = {
18
+ summary,
19
+ description,
20
+ start: {
21
+ dateTime: start,
22
+ },
23
+ end: {
24
+ dateTime: end,
25
+ },
26
+ location,
27
+ };
28
+ const response = await fetch(url, {
29
+ method: 'POST',
30
+ headers: {
31
+ Authorization: `Bearer ${googleCalendarToken}`,
32
+ 'Content-Type': 'application/json',
33
+ },
34
+ body: JSON.stringify(event),
35
+ });
36
+ if (!response.ok) {
37
+ const error = await response.json();
38
+ return { error: 'Failed to create event', details: error };
39
+ }
40
+ const data = await response.json();
41
+ return {
42
+ success: true,
43
+ event: data,
44
+ };
45
+ }
46
+ catch (error) {
47
+ return {
48
+ error: 'Error creating event',
49
+ message: error instanceof Error ? error.message : 'Unknown error',
50
+ };
51
+ }
52
+ },
53
+ });
54
+ //# sourceMappingURL=create-event.js.map
@@ -0,0 +1,27 @@
1
+ export declare const deleteEvent: import("ai").Tool<{
2
+ googleCalendarToken: string;
3
+ eventId: string;
4
+ calendarId: string;
5
+ }, {
6
+ error: string;
7
+ details: any;
8
+ success?: undefined;
9
+ eventId?: undefined;
10
+ calendarId?: undefined;
11
+ message?: undefined;
12
+ } | {
13
+ success: boolean;
14
+ eventId: string;
15
+ calendarId: string;
16
+ error?: undefined;
17
+ details?: undefined;
18
+ message?: undefined;
19
+ } | {
20
+ error: string;
21
+ message: string;
22
+ details?: undefined;
23
+ success?: undefined;
24
+ eventId?: undefined;
25
+ calendarId?: undefined;
26
+ }>;
27
+ //# sourceMappingURL=delete-event.d.ts.map
@@ -0,0 +1,38 @@
1
+ // @ts-nocheck
2
+ import { tool } from 'ai';
3
+ import { z } from 'zod';
4
+ export const deleteEvent = tool({
5
+ description: 'Delete or cancel an event from Google Calendar by event ID.',
6
+ inputSchema: z.object({
7
+ googleCalendarToken: z.string().describe('The Google Calendar access token'),
8
+ eventId: z.string().describe('The unique ID of the event to delete'),
9
+ calendarId: z.string().optional().default('primary').describe('Calendar identifier. Default is "primary".'),
10
+ }),
11
+ execute: async ({ googleCalendarToken, eventId, calendarId = 'primary' }) => {
12
+ try {
13
+ const url = `https://www.googleapis.com/calendar/v3/calendars/${encodeURIComponent(calendarId)}/events/${encodeURIComponent(eventId)}`;
14
+ const response = await fetch(url, {
15
+ method: 'DELETE',
16
+ headers: {
17
+ Authorization: `Bearer ${googleCalendarToken}`,
18
+ },
19
+ });
20
+ if (!response.ok && response.status !== 204) {
21
+ const error = await response.json().catch(() => ({ status: response.status }));
22
+ return { error: 'Failed to delete event', details: error };
23
+ }
24
+ return {
25
+ success: true,
26
+ eventId,
27
+ calendarId,
28
+ };
29
+ }
30
+ catch (error) {
31
+ return {
32
+ error: 'Error deleting event',
33
+ message: error instanceof Error ? error.message : 'Unknown error',
34
+ };
35
+ }
36
+ },
37
+ });
38
+ //# sourceMappingURL=delete-event.js.map
@@ -0,0 +1,24 @@
1
+ export declare const getEvent: import("ai").Tool<{
2
+ googleCalendarToken: string;
3
+ eventId: string;
4
+ calendarId: string;
5
+ }, {
6
+ error: string;
7
+ details: any;
8
+ success?: undefined;
9
+ event?: undefined;
10
+ message?: undefined;
11
+ } | {
12
+ success: boolean;
13
+ event: any;
14
+ error?: undefined;
15
+ details?: undefined;
16
+ message?: undefined;
17
+ } | {
18
+ error: string;
19
+ message: string;
20
+ details?: undefined;
21
+ success?: undefined;
22
+ event?: undefined;
23
+ }>;
24
+ //# sourceMappingURL=get-event.d.ts.map
@@ -0,0 +1,37 @@
1
+ // @ts-nocheck
2
+ import { tool } from 'ai';
3
+ import { z } from 'zod';
4
+ export const getEvent = tool({
5
+ description: 'Get details of a specific event from Google Calendar by event ID.',
6
+ inputSchema: z.object({
7
+ googleCalendarToken: z.string().describe('The Google Calendar access token'),
8
+ eventId: z.string().describe('The unique ID of the event to retrieve'),
9
+ calendarId: z.string().optional().default('primary').describe('Calendar identifier. Default is "primary".'),
10
+ }),
11
+ execute: async ({ googleCalendarToken, eventId, calendarId = 'primary' }) => {
12
+ try {
13
+ const url = `https://www.googleapis.com/calendar/v3/calendars/${encodeURIComponent(calendarId)}/events/${encodeURIComponent(eventId)}`;
14
+ const response = await fetch(url, {
15
+ headers: {
16
+ Authorization: `Bearer ${googleCalendarToken}`,
17
+ },
18
+ });
19
+ if (!response.ok) {
20
+ const error = await response.json();
21
+ return { error: 'Failed to get event', details: error };
22
+ }
23
+ const data = await response.json();
24
+ return {
25
+ success: true,
26
+ event: data,
27
+ };
28
+ }
29
+ catch (error) {
30
+ return {
31
+ error: 'Error getting event',
32
+ message: error instanceof Error ? error.message : 'Unknown error',
33
+ };
34
+ }
35
+ },
36
+ });
37
+ //# sourceMappingURL=get-event.js.map
@@ -0,0 +1,185 @@
1
+ import { listEvents } from './list-events.js';
2
+ import { createEvent } from './create-event.js';
3
+ import { getEvent } from './get-event.js';
4
+ import { updateEvent } from './update-event.js';
5
+ import { deleteEvent } from './delete-event.js';
6
+ import { searchEvents } from './search-events.js';
7
+ export { listEvents, createEvent, getEvent, updateEvent, deleteEvent, searchEvents };
8
+ export declare const googleCalendarTools: ({
9
+ name: string;
10
+ description: string;
11
+ tool: import("ai").Tool<{
12
+ maxResults: number;
13
+ googleCalendarToken: string;
14
+ timeMin?: string | undefined;
15
+ }, {
16
+ error: string;
17
+ details: any;
18
+ events?: undefined;
19
+ summary?: undefined;
20
+ message?: undefined;
21
+ } | {
22
+ events: any;
23
+ summary: any;
24
+ error?: undefined;
25
+ details?: undefined;
26
+ message?: undefined;
27
+ } | {
28
+ error: string;
29
+ message: string;
30
+ details?: undefined;
31
+ events?: undefined;
32
+ summary?: undefined;
33
+ }>;
34
+ requiredAuth: string;
35
+ } | {
36
+ name: string;
37
+ description: string;
38
+ tool: import("ai").Tool<{
39
+ summary: string;
40
+ googleCalendarToken: string;
41
+ start: string;
42
+ end: string;
43
+ description?: string | undefined;
44
+ location?: string | undefined;
45
+ }, {
46
+ error: string;
47
+ details: any;
48
+ success?: undefined;
49
+ event?: undefined;
50
+ message?: undefined;
51
+ } | {
52
+ success: boolean;
53
+ event: any;
54
+ error?: undefined;
55
+ details?: undefined;
56
+ message?: undefined;
57
+ } | {
58
+ error: string;
59
+ message: string;
60
+ details?: undefined;
61
+ success?: undefined;
62
+ event?: undefined;
63
+ }>;
64
+ requiredAuth: string;
65
+ } | {
66
+ name: string;
67
+ description: string;
68
+ tool: import("ai").Tool<{
69
+ googleCalendarToken: string;
70
+ eventId: string;
71
+ calendarId: string;
72
+ }, {
73
+ error: string;
74
+ details: any;
75
+ success?: undefined;
76
+ event?: undefined;
77
+ message?: undefined;
78
+ } | {
79
+ success: boolean;
80
+ event: any;
81
+ error?: undefined;
82
+ details?: undefined;
83
+ message?: undefined;
84
+ } | {
85
+ error: string;
86
+ message: string;
87
+ details?: undefined;
88
+ success?: undefined;
89
+ event?: undefined;
90
+ }>;
91
+ requiredAuth: string;
92
+ } | {
93
+ name: string;
94
+ description: string;
95
+ tool: import("ai").Tool<{
96
+ googleCalendarToken: string;
97
+ eventId: string;
98
+ calendarId: string;
99
+ description?: string | undefined;
100
+ location?: string | undefined;
101
+ summary?: string | undefined;
102
+ start?: string | undefined;
103
+ end?: string | undefined;
104
+ }, {
105
+ error: string;
106
+ details: any;
107
+ success?: undefined;
108
+ event?: undefined;
109
+ message?: undefined;
110
+ } | {
111
+ success: boolean;
112
+ event: any;
113
+ error?: undefined;
114
+ details?: undefined;
115
+ message?: undefined;
116
+ } | {
117
+ error: string;
118
+ message: string;
119
+ details?: undefined;
120
+ success?: undefined;
121
+ event?: undefined;
122
+ }>;
123
+ requiredAuth: string;
124
+ } | {
125
+ name: string;
126
+ description: string;
127
+ tool: import("ai").Tool<{
128
+ googleCalendarToken: string;
129
+ eventId: string;
130
+ calendarId: string;
131
+ }, {
132
+ error: string;
133
+ details: any;
134
+ success?: undefined;
135
+ eventId?: undefined;
136
+ calendarId?: undefined;
137
+ message?: undefined;
138
+ } | {
139
+ success: boolean;
140
+ eventId: string;
141
+ calendarId: string;
142
+ error?: undefined;
143
+ details?: undefined;
144
+ message?: undefined;
145
+ } | {
146
+ error: string;
147
+ message: string;
148
+ details?: undefined;
149
+ success?: undefined;
150
+ eventId?: undefined;
151
+ calendarId?: undefined;
152
+ }>;
153
+ requiredAuth: string;
154
+ } | {
155
+ name: string;
156
+ description: string;
157
+ tool: import("ai").Tool<{
158
+ maxResults: number;
159
+ googleCalendarToken: string;
160
+ calendarId: string;
161
+ q?: string | undefined;
162
+ timeMin?: string | undefined;
163
+ timeMax?: string | undefined;
164
+ }, {
165
+ error: string;
166
+ details: any;
167
+ events?: undefined;
168
+ summary?: undefined;
169
+ message?: undefined;
170
+ } | {
171
+ events: any;
172
+ summary: any;
173
+ error?: undefined;
174
+ details?: undefined;
175
+ message?: undefined;
176
+ } | {
177
+ error: string;
178
+ message: string;
179
+ details?: undefined;
180
+ events?: undefined;
181
+ summary?: undefined;
182
+ }>;
183
+ requiredAuth: string;
184
+ })[];
185
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,47 @@
1
+ // @ts-nocheck
2
+ import { listEvents } from './list-events.js';
3
+ import { createEvent } from './create-event.js';
4
+ import { getEvent } from './get-event.js';
5
+ import { updateEvent } from './update-event.js';
6
+ import { deleteEvent } from './delete-event.js';
7
+ import { searchEvents } from './search-events.js';
8
+ export { listEvents, createEvent, getEvent, updateEvent, deleteEvent, searchEvents };
9
+ export const googleCalendarTools = [
10
+ {
11
+ name: 'listEvents',
12
+ description: 'List upcoming events from your primary Google Calendar. Returns event summaries, start/end times, and IDs.',
13
+ tool: listEvents,
14
+ requiredAuth: 'googleCalendarToken',
15
+ },
16
+ {
17
+ name: 'createEvent',
18
+ description: 'Create a new event in your primary Google Calendar by providing a summary, start time, and end time. You can also optionaly provide a description and location.',
19
+ tool: createEvent,
20
+ requiredAuth: 'googleCalendarToken',
21
+ },
22
+ {
23
+ name: 'getEvent',
24
+ description: 'Get details of a specific event from Google Calendar by event ID.',
25
+ tool: getEvent,
26
+ requiredAuth: 'googleCalendarToken',
27
+ },
28
+ {
29
+ name: 'updateEvent',
30
+ description: 'Update or reschedule an existing event in Google Calendar (e.g., change summary, start/end time, description, or location).',
31
+ tool: updateEvent,
32
+ requiredAuth: 'googleCalendarToken',
33
+ },
34
+ {
35
+ name: 'deleteEvent',
36
+ description: 'Delete or cancel an event from Google Calendar by event ID.',
37
+ tool: deleteEvent,
38
+ requiredAuth: 'googleCalendarToken',
39
+ },
40
+ {
41
+ name: 'searchEvents',
42
+ description: 'Search for events in Google Calendar matching a free text query and/or date range.',
43
+ tool: searchEvents,
44
+ requiredAuth: 'googleCalendarToken',
45
+ },
46
+ ];
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,24 @@
1
+ export declare const listEvents: import("ai").Tool<{
2
+ maxResults: number;
3
+ googleCalendarToken: string;
4
+ timeMin?: string | undefined;
5
+ }, {
6
+ error: string;
7
+ details: any;
8
+ events?: undefined;
9
+ summary?: undefined;
10
+ message?: undefined;
11
+ } | {
12
+ events: any;
13
+ summary: any;
14
+ error?: undefined;
15
+ details?: undefined;
16
+ message?: undefined;
17
+ } | {
18
+ error: string;
19
+ message: string;
20
+ details?: undefined;
21
+ events?: undefined;
22
+ summary?: undefined;
23
+ }>;
24
+ //# sourceMappingURL=list-events.d.ts.map