@ghx-dev/core 0.1.0-beta.0 → 0.1.0

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 (348) hide show
  1. package/README.md +169 -114
  2. package/dist/agent-interface/tools/explain-tool.js +2 -2
  3. package/dist/agent-interface/tools/list-capabilities-tool.js +2 -2
  4. package/dist/agent.js +3 -3
  5. package/dist/cards/check_run.annotations.list.yaml +35 -0
  6. package/dist/cards/issue.assignees.update.yaml +27 -0
  7. package/dist/cards/issue.blocked_by.add.yaml +23 -0
  8. package/dist/cards/issue.blocked_by.remove.yaml +24 -0
  9. package/dist/cards/issue.close.yaml +24 -0
  10. package/dist/cards/issue.comments.create.yaml +24 -0
  11. package/dist/cards/issue.comments.list.yaml +48 -0
  12. package/dist/cards/issue.create.yaml +28 -0
  13. package/dist/cards/issue.delete.yaml +23 -0
  14. package/dist/cards/issue.labels.update.yaml +27 -0
  15. package/dist/cards/issue.linked_prs.list.yaml +34 -0
  16. package/dist/cards/issue.list.yaml +48 -0
  17. package/dist/cards/issue.milestone.set.yaml +23 -0
  18. package/dist/cards/issue.parent.remove.yaml +22 -0
  19. package/dist/cards/issue.parent.set.yaml +23 -0
  20. package/dist/cards/issue.relations.get.yaml +54 -0
  21. package/dist/cards/issue.reopen.yaml +24 -0
  22. package/dist/cards/issue.update.yaml +27 -0
  23. package/dist/cards/issue.view.yaml +32 -0
  24. package/dist/cards/pr.assignees.update.yaml +38 -0
  25. package/dist/cards/pr.branch.update.yaml +23 -0
  26. package/dist/cards/pr.checks.get_failed.yaml +42 -0
  27. package/dist/cards/pr.checks.rerun_all.yaml +26 -0
  28. package/dist/cards/pr.checks.rerun_failed.yaml +26 -0
  29. package/dist/cards/pr.comment.reply.yaml +23 -0
  30. package/dist/cards/pr.comment.resolve.yaml +22 -0
  31. package/dist/cards/pr.comment.unresolve.yaml +22 -0
  32. package/dist/cards/pr.comments.list.yaml +98 -0
  33. package/dist/cards/pr.diff.list_files.yaml +43 -0
  34. package/dist/cards/pr.list.yaml +48 -0
  35. package/dist/cards/pr.merge.execute.yaml +29 -0
  36. package/dist/cards/pr.mergeability.view.yaml +27 -0
  37. package/dist/cards/pr.ready_for_review.set.yaml +24 -0
  38. package/dist/cards/pr.review.submit_approve.yaml +26 -0
  39. package/dist/cards/pr.review.submit_comment.yaml +26 -0
  40. package/dist/cards/pr.review.submit_request_changes.yaml +26 -0
  41. package/dist/cards/pr.reviewers.request.yaml +31 -0
  42. package/dist/cards/pr.reviews.list.yaml +47 -0
  43. package/dist/cards/pr.status.checks.yaml +42 -0
  44. package/dist/cards/pr.view.yaml +32 -0
  45. package/dist/cards/project_v2.fields.list.yaml +37 -0
  46. package/dist/cards/project_v2.item.add_issue.yaml +23 -0
  47. package/dist/cards/project_v2.item.field.update.yaml +29 -0
  48. package/dist/cards/project_v2.items.list.yaml +39 -0
  49. package/dist/cards/project_v2.org.get.yaml +26 -0
  50. package/dist/cards/project_v2.user.get.yaml +26 -0
  51. package/dist/cards/release.create_draft.yaml +36 -0
  52. package/dist/cards/release.get.yaml +30 -0
  53. package/dist/cards/release.list.yaml +44 -0
  54. package/dist/cards/release.publish_draft.yaml +36 -0
  55. package/dist/cards/release.update.yaml +38 -0
  56. package/dist/cards/repo.issue_types.list.yaml +40 -0
  57. package/dist/cards/repo.labels.list.yaml +41 -0
  58. package/dist/cards/repo.view.yaml +34 -0
  59. package/dist/cards/workflow.get.yaml +30 -0
  60. package/dist/cards/workflow.list.yaml +40 -0
  61. package/dist/cards/workflow_dispatch.run.yaml +29 -0
  62. package/dist/cards/workflow_job.logs.analyze.yaml +33 -0
  63. package/dist/cards/workflow_job.logs.get.yaml +24 -0
  64. package/dist/cards/workflow_run.artifacts.list.yaml +40 -0
  65. package/dist/cards/workflow_run.cancel.yaml +23 -0
  66. package/dist/cards/workflow_run.get.yaml +33 -0
  67. package/dist/cards/workflow_run.jobs.list.yaml +35 -0
  68. package/dist/cards/workflow_run.rerun_all.yaml +23 -0
  69. package/dist/cards/workflow_run.rerun_failed.yaml +23 -0
  70. package/dist/cards/workflow_runs.list.yaml +45 -0
  71. package/dist/{chunk-GPU4P7UG.js → chunk-22WWCK6A.js} +3 -3
  72. package/dist/{chunk-Q4RTT3DV.js → chunk-3MRJX72M.js} +5 -5
  73. package/dist/{chunk-MMG6CIKK.js → chunk-4PLVKNCF.js} +2 -2
  74. package/dist/{chunk-3RJCF42N.js → chunk-GMTG7X2L.js} +2 -2
  75. package/dist/{chunk-BJHVAFTN.js → chunk-HQ2VRCH7.js} +2 -2
  76. package/dist/{chunk-MT4U5DYD.js → chunk-JH6GM6XU.js} +47 -2
  77. package/dist/chunk-JH6GM6XU.js.map +1 -0
  78. package/dist/chunk-JLDU462R.js +1352 -0
  79. package/dist/chunk-JLDU462R.js.map +1 -0
  80. package/dist/{chunk-YNQNHCRS.js → chunk-MGNGSGMF.js} +8 -3
  81. package/dist/chunk-MGNGSGMF.js.map +1 -0
  82. package/dist/chunk-SA2D4A5U.js +1496 -0
  83. package/dist/chunk-SA2D4A5U.js.map +1 -0
  84. package/dist/{chunk-WYSY75U7.js → chunk-SD7U4BNA.js} +32 -14
  85. package/dist/chunk-SD7U4BNA.js.map +1 -0
  86. package/dist/{chunk-QX34GTH6.js → chunk-SJR2SACI.js} +2 -2
  87. package/dist/chunk-XNMM64WU.js +221 -0
  88. package/dist/chunk-XNMM64WU.js.map +1 -0
  89. package/dist/cli/commands/capabilities-explain.js +3 -3
  90. package/dist/cli/commands/capabilities-list.js +3 -3
  91. package/dist/cli/commands/run.js +14 -14
  92. package/dist/cli/commands/setup.js +1 -1
  93. package/dist/cli/index.js +21 -21
  94. package/dist/core/contracts/tasks/issue.assignees.update.d.ts +5 -0
  95. package/dist/core/contracts/tasks/issue.assignees.update.js +8 -0
  96. package/dist/core/contracts/tasks/issue.assignees.update.js.map +1 -0
  97. package/dist/core/contracts/tasks/issue.blocked_by.add.d.ts +5 -0
  98. package/dist/core/contracts/tasks/issue.blocked_by.add.js +8 -0
  99. package/dist/core/contracts/tasks/issue.blocked_by.add.js.map +1 -0
  100. package/dist/core/contracts/tasks/issue.blocked_by.remove.d.ts +5 -0
  101. package/dist/core/contracts/tasks/issue.blocked_by.remove.js +8 -0
  102. package/dist/core/contracts/tasks/issue.blocked_by.remove.js.map +1 -0
  103. package/dist/core/contracts/tasks/issue.close.d.ts +5 -0
  104. package/dist/core/contracts/tasks/issue.close.js +8 -0
  105. package/dist/core/contracts/tasks/issue.close.js.map +1 -0
  106. package/dist/core/contracts/tasks/issue.comments.create.d.ts +5 -0
  107. package/dist/core/contracts/tasks/issue.comments.create.js +8 -0
  108. package/dist/core/contracts/tasks/issue.comments.create.js.map +1 -0
  109. package/dist/core/contracts/tasks/issue.create.d.ts +5 -0
  110. package/dist/core/contracts/tasks/issue.create.js +8 -0
  111. package/dist/core/contracts/tasks/issue.create.js.map +1 -0
  112. package/dist/core/contracts/tasks/issue.delete.d.ts +5 -0
  113. package/dist/core/contracts/tasks/issue.delete.js +8 -0
  114. package/dist/core/contracts/tasks/issue.delete.js.map +1 -0
  115. package/dist/core/contracts/tasks/issue.labels.update.d.ts +5 -0
  116. package/dist/core/contracts/tasks/issue.labels.update.js +8 -0
  117. package/dist/core/contracts/tasks/issue.labels.update.js.map +1 -0
  118. package/dist/core/contracts/tasks/issue.linked_prs.list.d.ts +5 -0
  119. package/dist/core/contracts/tasks/issue.linked_prs.list.js +8 -0
  120. package/dist/core/contracts/tasks/issue.linked_prs.list.js.map +1 -0
  121. package/dist/core/contracts/tasks/issue.milestone.set.d.ts +5 -0
  122. package/dist/core/contracts/tasks/issue.milestone.set.js +8 -0
  123. package/dist/core/contracts/tasks/issue.milestone.set.js.map +1 -0
  124. package/dist/core/contracts/tasks/issue.parent.remove.d.ts +5 -0
  125. package/dist/core/contracts/tasks/issue.parent.remove.js +8 -0
  126. package/dist/core/contracts/tasks/issue.parent.remove.js.map +1 -0
  127. package/dist/core/contracts/tasks/issue.parent.set.d.ts +5 -0
  128. package/dist/core/contracts/tasks/issue.parent.set.js +8 -0
  129. package/dist/core/contracts/tasks/issue.parent.set.js.map +1 -0
  130. package/dist/core/contracts/tasks/issue.relations.get.d.ts +5 -0
  131. package/dist/core/contracts/tasks/issue.relations.get.js +8 -0
  132. package/dist/core/contracts/tasks/issue.relations.get.js.map +1 -0
  133. package/dist/core/contracts/tasks/issue.reopen.d.ts +5 -0
  134. package/dist/core/contracts/tasks/issue.reopen.js +8 -0
  135. package/dist/core/contracts/tasks/issue.reopen.js.map +1 -0
  136. package/dist/core/contracts/tasks/issue.update.d.ts +5 -0
  137. package/dist/core/contracts/tasks/issue.update.js +8 -0
  138. package/dist/core/contracts/tasks/issue.update.js.map +1 -0
  139. package/dist/core/contracts/tasks/pr.assignees.update.d.ts +5 -0
  140. package/dist/core/contracts/tasks/pr.assignees.update.js +8 -0
  141. package/dist/core/contracts/tasks/pr.assignees.update.js.map +1 -0
  142. package/dist/core/contracts/tasks/pr.branch.update.d.ts +5 -0
  143. package/dist/core/contracts/tasks/pr.branch.update.js +8 -0
  144. package/dist/core/contracts/tasks/pr.branch.update.js.map +1 -0
  145. package/dist/core/contracts/tasks/pr.checks.rerun_all.d.ts +5 -0
  146. package/dist/core/contracts/tasks/pr.checks.rerun_all.js +8 -0
  147. package/dist/core/contracts/tasks/pr.checks.rerun_all.js.map +1 -0
  148. package/dist/core/contracts/tasks/pr.checks.rerun_failed.d.ts +5 -0
  149. package/dist/core/contracts/tasks/pr.checks.rerun_failed.js +8 -0
  150. package/dist/core/contracts/tasks/pr.checks.rerun_failed.js.map +1 -0
  151. package/dist/core/contracts/tasks/pr.merge.execute.d.ts +5 -0
  152. package/dist/core/contracts/tasks/pr.merge.execute.js +8 -0
  153. package/dist/core/contracts/tasks/pr.merge.execute.js.map +1 -0
  154. package/dist/core/contracts/tasks/pr.review.submit_approve.d.ts +5 -0
  155. package/dist/core/contracts/tasks/pr.review.submit_approve.js +8 -0
  156. package/dist/core/contracts/tasks/pr.review.submit_approve.js.map +1 -0
  157. package/dist/core/contracts/tasks/pr.review.submit_comment.d.ts +5 -0
  158. package/dist/core/contracts/tasks/pr.review.submit_comment.js +8 -0
  159. package/dist/core/contracts/tasks/pr.review.submit_comment.js.map +1 -0
  160. package/dist/core/contracts/tasks/pr.review.submit_request_changes.d.ts +5 -0
  161. package/dist/core/contracts/tasks/pr.review.submit_request_changes.js +8 -0
  162. package/dist/core/contracts/tasks/pr.review.submit_request_changes.js.map +1 -0
  163. package/dist/core/contracts/tasks/pr.reviewers.request.d.ts +5 -0
  164. package/dist/core/contracts/tasks/pr.reviewers.request.js +8 -0
  165. package/dist/core/contracts/tasks/pr.reviewers.request.js.map +1 -0
  166. package/dist/core/contracts/tasks/project_v2.fields.list.d.ts +5 -0
  167. package/dist/core/contracts/tasks/project_v2.fields.list.js +8 -0
  168. package/dist/core/contracts/tasks/project_v2.fields.list.js.map +1 -0
  169. package/dist/core/contracts/tasks/project_v2.item.add_issue.d.ts +5 -0
  170. package/dist/core/contracts/tasks/project_v2.item.add_issue.js +8 -0
  171. package/dist/core/contracts/tasks/project_v2.item.add_issue.js.map +1 -0
  172. package/dist/core/contracts/tasks/project_v2.item.field.update.d.ts +5 -0
  173. package/dist/core/contracts/tasks/project_v2.item.field.update.js +8 -0
  174. package/dist/core/contracts/tasks/project_v2.item.field.update.js.map +1 -0
  175. package/dist/core/contracts/tasks/project_v2.items.list.d.ts +5 -0
  176. package/dist/core/contracts/tasks/project_v2.items.list.js +8 -0
  177. package/dist/core/contracts/tasks/project_v2.items.list.js.map +1 -0
  178. package/dist/core/contracts/tasks/project_v2.org.get.d.ts +5 -0
  179. package/dist/core/contracts/tasks/project_v2.org.get.js +8 -0
  180. package/dist/core/contracts/tasks/project_v2.org.get.js.map +1 -0
  181. package/dist/core/contracts/tasks/project_v2.user.get.d.ts +5 -0
  182. package/dist/core/contracts/tasks/project_v2.user.get.js +8 -0
  183. package/dist/core/contracts/tasks/project_v2.user.get.js.map +1 -0
  184. package/dist/core/contracts/tasks/release.create_draft.d.ts +5 -0
  185. package/dist/core/contracts/tasks/release.create_draft.js +8 -0
  186. package/dist/core/contracts/tasks/release.create_draft.js.map +1 -0
  187. package/dist/core/contracts/tasks/release.get.d.ts +5 -0
  188. package/dist/core/contracts/tasks/release.get.js +8 -0
  189. package/dist/core/contracts/tasks/release.get.js.map +1 -0
  190. package/dist/core/contracts/tasks/release.list.d.ts +5 -0
  191. package/dist/core/contracts/tasks/release.list.js +8 -0
  192. package/dist/core/contracts/tasks/release.list.js.map +1 -0
  193. package/dist/core/contracts/tasks/release.publish_draft.d.ts +5 -0
  194. package/dist/core/contracts/tasks/release.publish_draft.js +8 -0
  195. package/dist/core/contracts/tasks/release.publish_draft.js.map +1 -0
  196. package/dist/core/contracts/tasks/release.update.d.ts +5 -0
  197. package/dist/core/contracts/tasks/release.update.js +8 -0
  198. package/dist/core/contracts/tasks/release.update.js.map +1 -0
  199. package/dist/core/contracts/tasks/repo.issue_types.list.d.ts +5 -0
  200. package/dist/core/contracts/tasks/repo.issue_types.list.js +8 -0
  201. package/dist/core/contracts/tasks/repo.issue_types.list.js.map +1 -0
  202. package/dist/core/contracts/tasks/repo.labels.list.d.ts +5 -0
  203. package/dist/core/contracts/tasks/repo.labels.list.js +8 -0
  204. package/dist/core/contracts/tasks/repo.labels.list.js.map +1 -0
  205. package/dist/core/contracts/tasks/workflow.get.d.ts +5 -0
  206. package/dist/core/contracts/tasks/workflow.get.js +8 -0
  207. package/dist/core/contracts/tasks/workflow.get.js.map +1 -0
  208. package/dist/core/contracts/tasks/workflow.list.d.ts +5 -0
  209. package/dist/core/contracts/tasks/workflow.list.js +8 -0
  210. package/dist/core/contracts/tasks/workflow.list.js.map +1 -0
  211. package/dist/core/contracts/tasks/workflow_dispatch.run.d.ts +5 -0
  212. package/dist/core/contracts/tasks/workflow_dispatch.run.js +8 -0
  213. package/dist/core/contracts/tasks/workflow_dispatch.run.js.map +1 -0
  214. package/dist/core/contracts/tasks/workflow_run.artifacts.list.d.ts +5 -0
  215. package/dist/core/contracts/tasks/workflow_run.artifacts.list.js +8 -0
  216. package/dist/core/contracts/tasks/workflow_run.artifacts.list.js.map +1 -0
  217. package/dist/core/contracts/tasks/workflow_run.cancel.d.ts +5 -0
  218. package/dist/core/contracts/tasks/workflow_run.cancel.js +8 -0
  219. package/dist/core/contracts/tasks/workflow_run.cancel.js.map +1 -0
  220. package/dist/core/contracts/tasks/workflow_run.get.d.ts +5 -0
  221. package/dist/core/contracts/tasks/workflow_run.get.js +8 -0
  222. package/dist/core/contracts/tasks/workflow_run.get.js.map +1 -0
  223. package/dist/core/contracts/tasks/workflow_run.rerun_all.d.ts +5 -0
  224. package/dist/core/contracts/tasks/workflow_run.rerun_all.js +8 -0
  225. package/dist/core/contracts/tasks/workflow_run.rerun_all.js.map +1 -0
  226. package/dist/core/contracts/tasks/workflow_run.rerun_failed.d.ts +5 -0
  227. package/dist/core/contracts/tasks/workflow_run.rerun_failed.js +8 -0
  228. package/dist/core/contracts/tasks/workflow_run.rerun_failed.js.map +1 -0
  229. package/dist/core/execute/execute.js +2 -2
  230. package/dist/core/execution/adapters/cli-adapter.js +4 -4
  231. package/dist/core/execution/adapters/cli-capability-adapter.d.ts +1 -1
  232. package/dist/core/execution/adapters/cli-capability-adapter.js +2 -2
  233. package/dist/core/execution/adapters/graphql-adapter.js +4 -4
  234. package/dist/core/execution/adapters/graphql-capability-adapter.d.ts +2 -2
  235. package/dist/core/execution/adapters/graphql-capability-adapter.js +2 -2
  236. package/dist/core/registry/cards/issue.assignees.update.yaml +27 -0
  237. package/dist/core/registry/cards/issue.blocked_by.add.yaml +23 -0
  238. package/dist/core/registry/cards/issue.blocked_by.remove.yaml +24 -0
  239. package/dist/core/registry/cards/issue.close.yaml +24 -0
  240. package/dist/core/registry/cards/issue.comments.create.yaml +24 -0
  241. package/dist/core/registry/cards/issue.create.yaml +28 -0
  242. package/dist/core/registry/cards/issue.delete.yaml +23 -0
  243. package/dist/core/registry/cards/issue.labels.update.yaml +27 -0
  244. package/dist/core/registry/cards/issue.linked_prs.list.yaml +34 -0
  245. package/dist/core/registry/cards/issue.milestone.set.yaml +23 -0
  246. package/dist/core/registry/cards/issue.parent.remove.yaml +22 -0
  247. package/dist/core/registry/cards/issue.parent.set.yaml +23 -0
  248. package/dist/core/registry/cards/issue.relations.get.yaml +54 -0
  249. package/dist/core/registry/cards/issue.reopen.yaml +24 -0
  250. package/dist/core/registry/cards/issue.update.yaml +27 -0
  251. package/dist/core/registry/cards/pr.assignees.update.yaml +38 -0
  252. package/dist/core/registry/cards/pr.branch.update.yaml +23 -0
  253. package/dist/core/registry/cards/pr.checks.rerun_all.yaml +26 -0
  254. package/dist/core/registry/cards/pr.checks.rerun_failed.yaml +26 -0
  255. package/dist/core/registry/cards/pr.merge.execute.yaml +29 -0
  256. package/dist/core/registry/cards/pr.review.submit_approve.yaml +26 -0
  257. package/dist/core/registry/cards/pr.review.submit_comment.yaml +26 -0
  258. package/dist/core/registry/cards/pr.review.submit_request_changes.yaml +26 -0
  259. package/dist/core/registry/cards/pr.reviewers.request.yaml +31 -0
  260. package/dist/core/registry/cards/project_v2.fields.list.yaml +37 -0
  261. package/dist/core/registry/cards/project_v2.item.add_issue.yaml +23 -0
  262. package/dist/core/registry/cards/project_v2.item.field.update.yaml +29 -0
  263. package/dist/core/registry/cards/project_v2.items.list.yaml +39 -0
  264. package/dist/core/registry/cards/project_v2.org.get.yaml +26 -0
  265. package/dist/core/registry/cards/project_v2.user.get.yaml +26 -0
  266. package/dist/core/registry/cards/release.create_draft.yaml +36 -0
  267. package/dist/core/registry/cards/release.get.yaml +30 -0
  268. package/dist/core/registry/cards/release.list.yaml +44 -0
  269. package/dist/core/registry/cards/release.publish_draft.yaml +36 -0
  270. package/dist/core/registry/cards/release.update.yaml +38 -0
  271. package/dist/core/registry/cards/repo.issue_types.list.yaml +40 -0
  272. package/dist/core/registry/cards/repo.labels.list.yaml +41 -0
  273. package/dist/core/registry/cards/workflow.get.yaml +30 -0
  274. package/dist/core/registry/cards/workflow.list.yaml +40 -0
  275. package/dist/core/registry/cards/workflow_dispatch.run.yaml +29 -0
  276. package/dist/core/registry/cards/workflow_run.artifacts.list.yaml +40 -0
  277. package/dist/core/registry/cards/workflow_run.cancel.yaml +23 -0
  278. package/dist/core/registry/cards/workflow_run.get.yaml +33 -0
  279. package/dist/core/registry/cards/workflow_run.rerun_all.yaml +23 -0
  280. package/dist/core/registry/cards/workflow_run.rerun_failed.yaml +23 -0
  281. package/dist/core/registry/index.js +1 -1
  282. package/dist/core/routing/capability-registry.js +1 -1
  283. package/dist/core/routing/engine.js +9 -9
  284. package/dist/gql/client.d.ts +132 -1
  285. package/dist/gql/client.js +6 -4
  286. package/dist/gql/operations/issue-assignees-update.generated.d.ts +33 -0
  287. package/dist/gql/operations/issue-assignees-update.generated.js +28 -0
  288. package/dist/gql/operations/issue-assignees-update.generated.js.map +1 -0
  289. package/dist/gql/operations/issue-blocked-by-add.generated.d.ts +30 -0
  290. package/dist/gql/operations/issue-blocked-by-add.generated.js +26 -0
  291. package/dist/gql/operations/issue-blocked-by-add.generated.js.map +1 -0
  292. package/dist/gql/operations/issue-blocked-by-remove.generated.d.ts +30 -0
  293. package/dist/gql/operations/issue-blocked-by-remove.generated.js +26 -0
  294. package/dist/gql/operations/issue-blocked-by-remove.generated.js.map +1 -0
  295. package/dist/gql/operations/issue-close.generated.d.ts +27 -0
  296. package/dist/gql/operations/issue-close.generated.js +25 -0
  297. package/dist/gql/operations/issue-close.generated.js.map +1 -0
  298. package/dist/gql/operations/issue-comment-create.generated.d.ts +31 -0
  299. package/dist/gql/operations/issue-comment-create.generated.js +27 -0
  300. package/dist/gql/operations/issue-comment-create.generated.js.map +1 -0
  301. package/dist/gql/operations/issue-create.generated.d.ts +31 -0
  302. package/dist/gql/operations/issue-create.generated.js +27 -0
  303. package/dist/gql/operations/issue-create.generated.js.map +1 -0
  304. package/dist/gql/operations/issue-delete.generated.d.ts +22 -0
  305. package/dist/gql/operations/issue-delete.generated.js +21 -0
  306. package/dist/gql/operations/issue-delete.generated.js.map +1 -0
  307. package/dist/gql/operations/issue-labels-update.generated.d.ts +33 -0
  308. package/dist/gql/operations/issue-labels-update.generated.js +28 -0
  309. package/dist/gql/operations/issue-labels-update.generated.js.map +1 -0
  310. package/dist/gql/operations/issue-linked-prs-list.generated.d.ts +132 -0
  311. package/dist/gql/operations/issue-linked-prs-list.generated.js +39 -0
  312. package/dist/gql/operations/issue-linked-prs-list.generated.js.map +1 -0
  313. package/dist/gql/operations/issue-milestone-set.generated.d.ts +30 -0
  314. package/dist/gql/operations/issue-milestone-set.generated.js +26 -0
  315. package/dist/gql/operations/issue-milestone-set.generated.js.map +1 -0
  316. package/dist/gql/operations/issue-parent-remove.generated.d.ts +30 -0
  317. package/dist/gql/operations/issue-parent-remove.generated.js +26 -0
  318. package/dist/gql/operations/issue-parent-remove.generated.js.map +1 -0
  319. package/dist/gql/operations/issue-parent-set.generated.d.ts +30 -0
  320. package/dist/gql/operations/issue-parent-set.generated.js +26 -0
  321. package/dist/gql/operations/issue-parent-set.generated.js.map +1 -0
  322. package/dist/gql/operations/issue-relations-get.generated.d.ts +49 -0
  323. package/dist/gql/operations/issue-relations-get.generated.js +40 -0
  324. package/dist/gql/operations/issue-relations-get.generated.js.map +1 -0
  325. package/dist/gql/operations/issue-reopen.generated.d.ts +27 -0
  326. package/dist/gql/operations/issue-reopen.generated.js +25 -0
  327. package/dist/gql/operations/issue-reopen.generated.js.map +1 -0
  328. package/dist/gql/operations/issue-update.generated.d.ts +31 -0
  329. package/dist/gql/operations/issue-update.generated.js +27 -0
  330. package/dist/gql/operations/issue-update.generated.js.map +1 -0
  331. package/dist/index.d.ts +1 -1
  332. package/dist/index.js +15 -13
  333. package/package.json +42 -15
  334. package/dist/chunk-3RAT5BCB.js +0 -584
  335. package/dist/chunk-3RAT5BCB.js.map +0 -1
  336. package/dist/chunk-MT4U5DYD.js.map +0 -1
  337. package/dist/chunk-WYSY75U7.js.map +0 -1
  338. package/dist/chunk-YNNDBMNR.js +0 -113
  339. package/dist/chunk-YNNDBMNR.js.map +0 -1
  340. package/dist/chunk-YNQNHCRS.js.map +0 -1
  341. package/dist/chunk-YQDQX4BT.js +0 -624
  342. package/dist/chunk-YQDQX4BT.js.map +0 -1
  343. /package/dist/{chunk-GPU4P7UG.js.map → chunk-22WWCK6A.js.map} +0 -0
  344. /package/dist/{chunk-Q4RTT3DV.js.map → chunk-3MRJX72M.js.map} +0 -0
  345. /package/dist/{chunk-MMG6CIKK.js.map → chunk-4PLVKNCF.js.map} +0 -0
  346. /package/dist/{chunk-3RJCF42N.js.map → chunk-GMTG7X2L.js.map} +0 -0
  347. /package/dist/{chunk-BJHVAFTN.js.map → chunk-HQ2VRCH7.js.map} +0 -0
  348. /package/dist/{chunk-QX34GTH6.js.map → chunk-SJR2SACI.js.map} +0 -0
package/README.md CHANGED
@@ -1,98 +1,118 @@
1
1
  # @ghx-dev/core
2
2
 
3
+ <p align="center">
4
+ <img src="https://raw.githubusercontent.com/aryeko/ghx/main/assets/branding/social/ghx-social-dark-1280x640.png" alt="ghx social preview" width="480">
5
+ </p>
6
+
3
7
  [![npm version](https://img.shields.io/npm/v/%40ghx-dev%2Fcore)](https://www.npmjs.com/package/@ghx-dev/core)
4
8
  [![npm downloads](https://img.shields.io/npm/dm/%40ghx-dev%2Fcore)](https://www.npmjs.com/package/@ghx-dev/core)
9
+ [![CI (main)](https://github.com/aryeko/ghx/actions/workflows/ci-main.yml/badge.svg)](https://github.com/aryeko/ghx/actions/workflows/ci-main.yml)
10
+ [![codecov](https://codecov.io/gh/aryeko/ghx/graph/badge.svg?token=KBIGR138V7)](https://codecov.io/gh/aryeko/ghx)
5
11
  [![License](https://img.shields.io/npm/l/%40ghx-dev%2Fcore)](https://github.com/aryeko/ghx/blob/main/LICENSE)
6
12
 
7
- CLI-first GitHub execution router for agents.
13
+ Typed GitHub execution router for AI agents. Deterministic routing across CLI and GraphQL, runtime schema validation, and a stable result envelope -- so agents stop wasting tokens re-discovering GitHub API surfaces.
14
+
15
+ ## Why ghx
8
16
 
9
- `@ghx-dev/core` exposes a typed execution engine that routes GitHub tasks across CLI and GraphQL, validates inputs/outputs against operation-card schemas, and returns a stable result envelope for deterministic agent workflows.
17
+ Agents instructed to "use `gh` CLI" for common PR and issue operations waste significant tokens on research, trial-and-error, and output parsing. Benchmarked across 27 runs on standard PR workflows:
10
18
 
11
- ## Why @ghx-dev/core
19
+ | Metric | Improvement |
20
+ |---|---|
21
+ | Active tokens | **-37%** fewer tokens consumed |
22
+ | Latency | **-32%** faster end-to-end |
23
+ | Tool calls | **-33%** fewer tool invocations |
24
+ | Success rate | **100%** (zero regressions) |
12
25
 
13
- - **Stable contract**: every task returns `{ ok, data, error, meta }`
14
- - **Route-aware execution**: preferred route + fallback routes per capability
15
- - **Schema validation**: runtime validation for task input/output
16
- - **Typed clients**: typed GraphQL/GitHub client helpers
17
- - **Agent-ready tools**: subpath exports for capability listing/explanation/execution wrappers
26
+ ghx eliminates the discovery phase: agents call typed capabilities, get validated results back in a stable envelope.
18
27
 
19
28
  ## Installation
20
29
 
30
+ Requirements: Node.js `22+`, `gh` CLI authenticated (`gh auth status`).
31
+
21
32
  ```bash
22
- pnpm add @ghx-dev/core
33
+ npm install @ghx-dev/core
23
34
  ```
24
35
 
25
36
  Alternative package managers:
26
37
 
27
38
  ```bash
28
- npm i @ghx-dev/core
39
+ pnpm add @ghx-dev/core
29
40
  # or
30
41
  yarn add @ghx-dev/core
31
42
  ```
32
43
 
33
- ## Quick Start (Library API)
44
+ Or run directly without installing:
34
45
 
35
- ```ts
36
- import { createGithubClient, executeTask } from "@ghx-dev/core"
46
+ ```bash
47
+ npx @ghx-dev/core capabilities list
48
+ ```
37
49
 
38
- const githubToken = process.env.GITHUB_TOKEN
50
+ Global CLI install:
39
51
 
40
- if (!githubToken) {
41
- throw new Error("Missing GITHUB_TOKEN")
42
- }
52
+ ```bash
53
+ npm i -g @ghx-dev/core
54
+ ```
43
55
 
44
- const githubClient = createGithubClient({
45
- async execute<TData>(query: string, variables?: Record<string, unknown>): Promise<TData> {
46
- const response = await fetch("https://api.github.com/graphql", {
47
- method: "POST",
48
- headers: {
49
- "content-type": "application/json",
50
- authorization: `Bearer ${githubToken}`,
51
- },
52
- body: JSON.stringify({ query, variables: variables ?? {} }),
53
- })
56
+ ## Quick Start (CLI)
54
57
 
55
- const payload = (await response.json()) as {
56
- data?: TData
57
- errors?: Array<{ message?: string }>
58
- message?: string
59
- }
58
+ Set `GITHUB_TOKEN` or `GH_TOKEN` in your environment, then:
60
59
 
61
- if (!response.ok) {
62
- throw new Error(payload.message ?? `GraphQL request failed (${response.status})`)
63
- }
60
+ ```bash
61
+ npx @ghx-dev/core capabilities list
62
+ npx @ghx-dev/core capabilities explain repo.view
63
+ npx @ghx-dev/core run repo.view --input '{"owner":"aryeko","name":"ghx"}'
64
+ ```
64
65
 
65
- if (payload.errors?.length) {
66
- throw new Error(payload.errors[0]?.message ?? "GraphQL returned errors")
67
- }
66
+ If installed globally, replace `npx @ghx-dev/core` with `ghx`.
68
67
 
69
- if (payload.data === undefined) {
70
- throw new Error("GraphQL response missing data")
71
- }
68
+ Every capability returns a stable envelope:
72
69
 
73
- return payload.data
70
+ ```json
71
+ {
72
+ "ok": true,
73
+ "data": {
74
+ "id": "R_kgDOOx...",
75
+ "name": "ghx",
76
+ "nameWithOwner": "aryeko/ghx"
74
77
  },
75
- })
78
+ "error": null,
79
+ "meta": {
80
+ "capability_id": "repo.view",
81
+ "route_used": "cli",
82
+ "reason": "CARD_PREFERRED"
83
+ }
84
+ }
85
+ ```
86
+
87
+ ## Quick Start (Library API)
88
+
89
+ ```ts
90
+ import { createGithubClientFromToken, executeTask } from "@ghx-dev/core"
91
+
92
+ const token = process.env.GITHUB_TOKEN!
93
+ const githubClient = createGithubClientFromToken(token)
76
94
 
77
95
  const result = await executeTask(
78
- {
79
- task: "repo.view",
80
- input: {
81
- owner: "aryeko",
82
- name: "ghx",
83
- },
84
- },
85
- {
86
- githubClient,
87
- githubToken,
88
- },
96
+ { task: "repo.view", input: { owner: "aryeko", name: "ghx" } },
97
+ { githubClient, githubToken: token },
89
98
  )
90
99
 
91
- if (!result.ok) {
92
- throw new Error(`${result.error?.code}: ${result.error?.message}`)
100
+ if (result.ok) {
101
+ console.log(result.data)
102
+ } else {
103
+ console.error(result.error?.code, result.error?.message)
93
104
  }
105
+ ```
106
+
107
+ Need a custom GraphQL transport? Use `createGithubClient(transport)` instead -- see the [advanced usage section](#custom-graphql-transport).
108
+
109
+ ## Agent Onboarding
110
+
111
+ Install ghx as a project skill for Claude Code:
94
112
 
95
- console.log(result.data)
113
+ ```bash
114
+ npx @ghx-dev/core setup --platform claude-code --scope project --yes
115
+ npx @ghx-dev/core setup --platform claude-code --scope project --verify
96
116
  ```
97
117
 
98
118
  ## Agent Tools (`@ghx-dev/core/agent`)
@@ -100,76 +120,47 @@ console.log(result.data)
100
120
  ```ts
101
121
  import {
102
122
  createExecuteTool,
103
- explainCapability,
104
123
  listCapabilities,
124
+ explainCapability,
105
125
  MAIN_SKILL_TEXT,
106
126
  } from "@ghx-dev/core/agent"
127
+ import { createGithubClientFromToken, executeTask } from "@ghx-dev/core"
107
128
 
108
- const executeTool = createExecuteTool({
109
- executeTask: async (request) => {
110
- // delegate to your runtime integration
111
- return { ok: true, data: request, meta: { capability_id: request.task } }
112
- },
129
+ // Wire the execute tool to the real engine
130
+ const token = process.env.GITHUB_TOKEN!
131
+ const githubClient = createGithubClientFromToken(token)
132
+
133
+ const tool = createExecuteTool({
134
+ executeTask: (request) => executeTask(request, { githubClient, githubToken: token }),
113
135
  })
114
136
 
115
- console.log(MAIN_SKILL_TEXT)
137
+ // Discover and execute capabilities
116
138
  console.log(listCapabilities())
117
139
  console.log(explainCapability("repo.view"))
118
- await executeTool.execute("repo.view", { owner: "aryeko", name: "ghx" })
140
+ const result = await tool.execute("repo.view", { owner: "aryeko", name: "ghx" })
119
141
  ```
120
142
 
121
- ## CLI
143
+ `MAIN_SKILL_TEXT` provides a ready-to-use system prompt describing all capabilities.
122
144
 
123
- When installed globally (or executed via package manager), use:
145
+ ## 66 Capabilities
124
146
 
125
- ```bash
126
- ghx run repo.view --input '{"owner":"aryeko","name":"ghx"}'
127
- ```
147
+ **Repository** -- `repo.view`, `repo.labels.list`, `repo.issue_types.list`
128
148
 
129
- Environment variables used by the CLI path:
149
+ **Issues** -- `issue.view`, `issue.list`, `issue.comments.list`, `issue.create`, `issue.update`, `issue.close`, `issue.reopen`, `issue.delete`, `issue.labels.update`, `issue.assignees.update`, `issue.milestone.set`, `issue.comments.create`, `issue.linked_prs.list`, `issue.relations.get`, `issue.parent.set`, `issue.parent.remove`, `issue.blocked_by.add`, `issue.blocked_by.remove`
130
150
 
131
- - `GITHUB_TOKEN` or `GH_TOKEN` (required)
132
- - `GITHUB_GRAPHQL_URL` (optional override)
133
- - `GH_HOST` (optional; used to derive enterprise GraphQL endpoint)
134
-
135
- ## Built-in Capabilities
136
-
137
- - `repo.view` - fetch repository metadata
138
- - `issue.view` - fetch a single issue
139
- - `issue.list` - list repository issues
140
- - `issue.comments.list` - list issue comments with pagination
141
- - `pr.view` - fetch a single pull request
142
- - `pr.list` - list pull requests
143
- - `pr.comments.list` - list pull request review threads/comments
144
- - `pr.reviews.list` - list pull request reviews
145
- - `pr.diff.list_files` - list changed files in a pull request
146
- - `pr.status.checks` - list pull request checks and summary counts
147
- - `pr.checks.get_failed` - list failed pull request checks
148
- - `pr.mergeability.view` - fetch mergeability and review decision signals
149
- - `pr.comment.reply` - reply to a pull request review thread
150
- - `pr.comment.resolve` - resolve a pull request review thread
151
- - `pr.comment.unresolve` - unresolve a pull request review thread
152
- - `pr.ready_for_review.set` - mark draft/ready-for-review state
153
- - `check_run.annotations.list` - list check run annotations
154
- - `workflow_runs.list` - list workflow runs for a repository
155
- - `workflow_run.jobs.list` - list jobs for a workflow run
156
- - `workflow_job.logs.get` - fetch workflow job logs
157
- - `workflow_job.logs.analyze` - analyze workflow job logs for error/warning summaries
151
+ **Pull Requests (read)** -- `pr.view`, `pr.list`, `pr.comments.list`, `pr.reviews.list`, `pr.diff.list_files`, `pr.status.checks`, `pr.checks.get_failed`, `pr.mergeability.view`
158
152
 
159
- ## Public Exports
153
+ **Pull Requests (execute)** -- `pr.comment.reply`, `pr.comment.resolve`, `pr.comment.unresolve`, `pr.ready_for_review.set`, `pr.review.submit_approve`, `pr.review.submit_request_changes`, `pr.review.submit_comment`, `pr.merge.execute`, `pr.checks.rerun_failed`, `pr.checks.rerun_all`, `pr.reviewers.request`, `pr.assignees.update`, `pr.branch.update`
160
154
 
161
- Root (`@ghx-dev/core`):
155
+ **CI Diagnostics** -- `check_run.annotations.list`, `workflow_runs.list`, `workflow_run.jobs.list`, `workflow_job.logs.get`, `workflow_job.logs.analyze`
162
156
 
163
- - `executeTask`
164
- - `createGithubClient`, `createGraphqlClient`
165
- - `listOperationCards`, `getOperationCard`
166
- - `createSafeCliCommandRunner`
167
- - core result/task types (`TaskRequest`, `ResultEnvelope`, `ResultError`, `ResultMeta`, `AttemptMeta`, `RouteSource`, `RouteReasonCode`)
157
+ **Releases** -- `release.list`, `release.get`, `release.create_draft`, `release.update`, `release.publish_draft`
168
158
 
169
- Subpaths:
159
+ **Workflow Controls** -- `workflow.list`, `workflow.get`, `workflow_dispatch.run`, `workflow_run.get`, `workflow_run.rerun_failed`, `workflow_run.rerun_all`, `workflow_run.cancel`, `workflow_run.artifacts.list`
170
160
 
171
- - `@ghx-dev/core/agent` - agent tooling exports
172
- - `@ghx-dev/core/cli` - CLI entrypoint
161
+ **Projects v2** -- `project_v2.org.get`, `project_v2.user.get`, `project_v2.fields.list`, `project_v2.items.list`, `project_v2.item.add_issue`, `project_v2.item.field.update`
162
+
163
+ For exact input/output contracts, see the [operation card registry](https://github.com/aryeko/ghx/tree/main/packages/core/src/core/registry/cards).
173
164
 
174
165
  ## Result Envelope
175
166
 
@@ -180,7 +171,7 @@ type ResultEnvelope<TData = unknown> = {
180
171
  ok: boolean
181
172
  data?: TData
182
173
  error?: {
183
- code: string
174
+ code: string // AUTH, NOT_FOUND, RATE_LIMIT, VALIDATION, ...
184
175
  message: string
185
176
  retryable: boolean
186
177
  details?: Record<string, unknown>
@@ -199,13 +190,77 @@ type ResultEnvelope<TData = unknown> = {
199
190
  }
200
191
  ```
201
192
 
193
+ ## Environment Variables
194
+
195
+ - `GITHUB_TOKEN` or `GH_TOKEN` (required)
196
+ - `GITHUB_GRAPHQL_URL` (optional; override GraphQL endpoint)
197
+ - `GH_HOST` (optional; derives enterprise GraphQL endpoint)
198
+
199
+ ## Security and Permissions
200
+
201
+ - Start with least privilege and grant only what your capability set needs.
202
+ - For quick local testing, a classic PAT with `repo` scope is the simplest route.
203
+ - For production agents, prefer fine-grained tokens with read permissions first (`Metadata`, `Contents`, `Pull requests`, `Issues`, `Actions`, `Projects`) and add writes only where needed.
204
+
205
+ ## Compatibility
206
+
207
+ - Node.js `22+`
208
+ - GitHub Cloud and GitHub Enterprise hosts (`GH_HOST` supported)
209
+ - Route adapters: CLI and GraphQL
210
+
211
+ ## Public Exports
212
+
213
+ Root (`@ghx-dev/core`):
214
+
215
+ - `executeTask` -- run a capability
216
+ - `createGithubClientFromToken` -- create a client from a token string
217
+ - `createGithubClient`, `createGraphqlClient` -- create clients from a custom transport
218
+ - `listOperationCards`, `getOperationCard` -- inspect capability registry
219
+ - `createSafeCliCommandRunner` -- custom CLI execution
220
+ - Types: `TaskRequest`, `ResultEnvelope`, `ResultError`, `ResultMeta`, `AttemptMeta`, `RouteSource`, `RouteReasonCode`, `TokenClientOptions`
221
+
222
+ Subpaths:
223
+
224
+ - `@ghx-dev/core/agent` -- `createExecuteTool`, `listCapabilities`, `explainCapability`, `MAIN_SKILL_TEXT`
225
+ - `@ghx-dev/core/cli` -- CLI entrypoint
226
+
227
+ ## Custom GraphQL Transport
228
+
229
+ For full control over the GraphQL layer, pass your own transport to `createGithubClient`:
230
+
231
+ ```ts
232
+ import { createGithubClient, executeTask } from "@ghx-dev/core"
233
+
234
+ const githubClient = createGithubClient({
235
+ async execute<TData>(query: string, variables?: Record<string, unknown>): Promise<TData> {
236
+ const response = await fetch("https://api.github.com/graphql", {
237
+ method: "POST",
238
+ headers: {
239
+ "content-type": "application/json",
240
+ authorization: `Bearer ${process.env.GITHUB_TOKEN}`,
241
+ },
242
+ body: JSON.stringify({ query, variables: variables ?? {} }),
243
+ })
244
+ const payload = (await response.json()) as { data?: TData; errors?: Array<{ message?: string }> }
245
+ if (payload.errors?.length) throw new Error(payload.errors[0]?.message ?? "GraphQL error")
246
+ if (payload.data === undefined) throw new Error("GraphQL response missing data")
247
+ return payload.data
248
+ },
249
+ })
250
+
251
+ const result = await executeTask(
252
+ { task: "repo.view", input: { owner: "aryeko", name: "ghx" } },
253
+ { githubClient, githubToken: process.env.GITHUB_TOKEN },
254
+ )
255
+ ```
256
+
202
257
  ## Documentation
203
258
 
204
- - Architecture overview: https://github.com/aryeko/ghx/blob/main/docs/CODEMAPS/ARCHITECTURE.md
205
- - Module map: https://github.com/aryeko/ghx/blob/main/docs/CODEMAPS/MODULES.md
206
- - File map: https://github.com/aryeko/ghx/blob/main/docs/CODEMAPS/FILES.md
207
- - Adding capabilities: https://github.com/aryeko/ghx/blob/main/docs/guides/adding-a-capability.md
208
- - Publishing guide: https://github.com/aryeko/ghx/blob/main/docs/guides/publishing.md
259
+ - [Architecture overview](https://github.com/aryeko/ghx/blob/main/docs/CODEMAPS/ARCHITECTURE.md)
260
+ - [Module map](https://github.com/aryeko/ghx/blob/main/docs/CODEMAPS/MODULES.md)
261
+ - [File map](https://github.com/aryeko/ghx/blob/main/docs/CODEMAPS/FILES.md)
262
+ - [Operation card registry](https://github.com/aryeko/ghx/blob/main/docs/architecture/operation-card-registry.md)
263
+ - [Publishing guide](https://github.com/aryeko/ghx/blob/main/docs/guides/publishing.md)
209
264
 
210
265
  ## License
211
266
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  explainCapability
3
- } from "../../chunk-MMG6CIKK.js";
4
- import "../../chunk-MT4U5DYD.js";
3
+ } from "../../chunk-4PLVKNCF.js";
4
+ import "../../chunk-JH6GM6XU.js";
5
5
  import "../../chunk-2W4L5YCC.js";
6
6
  export {
7
7
  explainCapability
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  listCapabilities
3
- } from "../../chunk-3RJCF42N.js";
4
- import "../../chunk-MT4U5DYD.js";
3
+ } from "../../chunk-GMTG7X2L.js";
4
+ import "../../chunk-JH6GM6XU.js";
5
5
  import "../../chunk-2W4L5YCC.js";
6
6
  export {
7
7
  listCapabilities
package/dist/agent.js CHANGED
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-DJIEG6K7.js";
4
4
  import {
5
5
  explainCapability
6
- } from "./chunk-MMG6CIKK.js";
6
+ } from "./chunk-4PLVKNCF.js";
7
7
  import {
8
8
  listCapabilities
9
- } from "./chunk-3RJCF42N.js";
10
- import "./chunk-MT4U5DYD.js";
9
+ } from "./chunk-GMTG7X2L.js";
10
+ import "./chunk-JH6GM6XU.js";
11
11
  import "./chunk-2W4L5YCC.js";
12
12
  import {
13
13
  MAIN_SKILL_TEXT
@@ -0,0 +1,35 @@
1
+ capability_id: check_run.annotations.list
2
+ version: "1.0.0"
3
+ description: List annotations for one check run.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, checkRunId]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ checkRunId: { type: integer, minimum: 1 }
11
+ additionalProperties: false
12
+ output_schema:
13
+ type: object
14
+ required: [items]
15
+ properties:
16
+ items:
17
+ type: array
18
+ items:
19
+ type: object
20
+ required: [path, startLine, endLine, level, message, title, details]
21
+ properties:
22
+ path: { type: [string, "null"] }
23
+ startLine: { type: [integer, "null"] }
24
+ endLine: { type: [integer, "null"] }
25
+ level: { type: [string, "null"] }
26
+ message: { type: [string, "null"] }
27
+ title: { type: [string, "null"] }
28
+ details: { type: [string, "null"] }
29
+ additionalProperties: false
30
+ additionalProperties: false
31
+ routing:
32
+ preferred: cli
33
+ fallbacks: []
34
+ cli:
35
+ command: api
@@ -0,0 +1,27 @@
1
+ capability_id: issue.assignees.update
2
+ version: "1.0.0"
3
+ description: Replace issue assignees.
4
+ input_schema:
5
+ type: object
6
+ required: [issueId, assignees]
7
+ properties:
8
+ issueId: { type: string, minLength: 1 }
9
+ assignees:
10
+ type: array
11
+ items: { type: string, minLength: 1 }
12
+ additionalProperties: false
13
+ output_schema:
14
+ type: object
15
+ required: [id, assignees]
16
+ properties:
17
+ id: { type: string, minLength: 1 }
18
+ assignees:
19
+ type: array
20
+ items: { type: string, minLength: 1 }
21
+ additionalProperties: false
22
+ routing:
23
+ preferred: graphql
24
+ fallbacks: []
25
+ graphql:
26
+ operationName: IssueAssigneesUpdate
27
+ documentPath: src/gql/operations/issue-assignees-update.graphql
@@ -0,0 +1,23 @@
1
+ capability_id: issue.blocked_by.add
2
+ version: "1.0.0"
3
+ description: Add a blocked-by relation for an issue.
4
+ input_schema:
5
+ type: object
6
+ required: [issueId, blockedByIssueId]
7
+ properties:
8
+ issueId: { type: string, minLength: 1 }
9
+ blockedByIssueId: { type: string, minLength: 1 }
10
+ additionalProperties: false
11
+ output_schema:
12
+ type: object
13
+ required: [issueId, blockedByIssueId]
14
+ properties:
15
+ issueId: { type: string, minLength: 1 }
16
+ blockedByIssueId: { type: string, minLength: 1 }
17
+ additionalProperties: false
18
+ routing:
19
+ preferred: graphql
20
+ fallbacks: []
21
+ graphql:
22
+ operationName: IssueBlockedByAdd
23
+ documentPath: src/gql/operations/issue-blocked-by-add.graphql
@@ -0,0 +1,24 @@
1
+ capability_id: issue.blocked_by.remove
2
+ version: "1.0.0"
3
+ description: Remove a blocked-by relation for an issue.
4
+ input_schema:
5
+ type: object
6
+ required: [issueId, blockedByIssueId]
7
+ properties:
8
+ issueId: { type: string, minLength: 1 }
9
+ blockedByIssueId: { type: string, minLength: 1 }
10
+ additionalProperties: false
11
+ output_schema:
12
+ type: object
13
+ required: [issueId, blockedByIssueId, removed]
14
+ properties:
15
+ issueId: { type: string, minLength: 1 }
16
+ blockedByIssueId: { type: string, minLength: 1 }
17
+ removed: { type: boolean }
18
+ additionalProperties: false
19
+ routing:
20
+ preferred: graphql
21
+ fallbacks: []
22
+ graphql:
23
+ operationName: IssueBlockedByRemove
24
+ documentPath: src/gql/operations/issue-blocked-by-remove.graphql
@@ -0,0 +1,24 @@
1
+ capability_id: issue.close
2
+ version: "1.0.0"
3
+ description: Close an issue.
4
+ input_schema:
5
+ type: object
6
+ required: [issueId]
7
+ properties:
8
+ issueId: { type: string, minLength: 1 }
9
+ additionalProperties: false
10
+ output_schema:
11
+ type: object
12
+ required: [id, number, state, closed]
13
+ properties:
14
+ id: { type: string, minLength: 1 }
15
+ number: { type: integer, minimum: 1 }
16
+ state: { type: string }
17
+ closed: { type: boolean }
18
+ additionalProperties: false
19
+ routing:
20
+ preferred: graphql
21
+ fallbacks: []
22
+ graphql:
23
+ operationName: IssueClose
24
+ documentPath: src/gql/operations/issue-close.graphql
@@ -0,0 +1,24 @@
1
+ capability_id: issue.comments.create
2
+ version: "1.0.0"
3
+ description: Create an issue comment.
4
+ input_schema:
5
+ type: object
6
+ required: [issueId, body]
7
+ properties:
8
+ issueId: { type: string, minLength: 1 }
9
+ body: { type: string, minLength: 1 }
10
+ additionalProperties: false
11
+ output_schema:
12
+ type: object
13
+ required: [id, body, url]
14
+ properties:
15
+ id: { type: string, minLength: 1 }
16
+ body: { type: string }
17
+ url: { type: string }
18
+ additionalProperties: false
19
+ routing:
20
+ preferred: graphql
21
+ fallbacks: []
22
+ graphql:
23
+ operationName: IssueCommentCreate
24
+ documentPath: src/gql/operations/issue-comment-create.graphql
@@ -0,0 +1,48 @@
1
+ capability_id: issue.comments.list
2
+ version: "1.0.0"
3
+ description: List comments for one issue.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, issueNumber, first]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
11
+ first: { type: integer, minimum: 1 }
12
+ after: { type: [string, "null"] }
13
+ additionalProperties: false
14
+ output_schema:
15
+ type: object
16
+ required: [items, pageInfo]
17
+ properties:
18
+ items:
19
+ type: array
20
+ items:
21
+ type: object
22
+ required: [id, body, authorLogin, url, createdAt]
23
+ properties:
24
+ id: { type: string, minLength: 1 }
25
+ body: { type: string }
26
+ authorLogin: { type: [string, "null"] }
27
+ url: { type: string, minLength: 1 }
28
+ createdAt: { type: string, minLength: 1 }
29
+ additionalProperties: false
30
+ pageInfo:
31
+ type: object
32
+ required: [hasNextPage, endCursor]
33
+ properties:
34
+ hasNextPage: { type: boolean }
35
+ endCursor: { type: [string, "null"] }
36
+ additionalProperties: false
37
+ additionalProperties: false
38
+ routing:
39
+ preferred: graphql
40
+ fallbacks: [cli]
41
+ notes:
42
+ - Prefer GraphQL for typed issue-comment pagination and stable cursor handling.
43
+ - CLI fallback uses gh api graphql with bounded cursor pagination for comments.
44
+ graphql:
45
+ operationName: IssueCommentsList
46
+ documentPath: src/gql/operations/issue-comments-list.graphql
47
+ cli:
48
+ command: api graphql
@@ -0,0 +1,28 @@
1
+ capability_id: issue.create
2
+ version: "1.0.0"
3
+ description: Create a new issue.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, title]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ title: { type: string, minLength: 1 }
11
+ body: { type: string }
12
+ additionalProperties: false
13
+ output_schema:
14
+ type: object
15
+ required: [id, number]
16
+ properties:
17
+ id: { type: string, minLength: 1 }
18
+ number: { type: integer, minimum: 1 }
19
+ title: { type: string }
20
+ state: { type: string }
21
+ url: { type: string, minLength: 1 }
22
+ additionalProperties: false
23
+ routing:
24
+ preferred: graphql
25
+ fallbacks: []
26
+ graphql:
27
+ operationName: IssueCreate
28
+ documentPath: src/gql/operations/issue-create.graphql
@@ -0,0 +1,23 @@
1
+ capability_id: issue.delete
2
+ version: "1.0.0"
3
+ description: Delete an issue.
4
+ input_schema:
5
+ type: object
6
+ required: [issueId]
7
+ properties:
8
+ issueId: { type: string, minLength: 1 }
9
+ additionalProperties: false
10
+ output_schema:
11
+ type: object
12
+ required: [id, number, deleted]
13
+ properties:
14
+ id: { type: string, minLength: 1 }
15
+ number: { type: integer, minimum: 0 }
16
+ deleted: { type: boolean }
17
+ additionalProperties: false
18
+ routing:
19
+ preferred: graphql
20
+ fallbacks: []
21
+ graphql:
22
+ operationName: IssueDelete
23
+ documentPath: src/gql/operations/issue-delete.graphql