@ghx-dev/core 0.1.2 → 0.2.1

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 (216) hide show
  1. package/.claude-plugin/plugin.json +21 -0
  2. package/README.md +49 -45
  3. package/dist/cards/issue.assignees.add.yaml +51 -0
  4. package/dist/cards/issue.assignees.remove.yaml +51 -0
  5. package/dist/cards/issue.assignees.set.yaml +48 -0
  6. package/dist/cards/issue.close.yaml +17 -2
  7. package/dist/cards/issue.comments.create.yaml +17 -2
  8. package/dist/cards/issue.comments.list.yaml +1 -0
  9. package/dist/cards/issue.create.yaml +12 -0
  10. package/dist/cards/issue.delete.yaml +17 -2
  11. package/dist/cards/issue.labels.add.yaml +49 -0
  12. package/dist/cards/issue.labels.remove.yaml +51 -0
  13. package/dist/cards/issue.labels.set.yaml +48 -0
  14. package/dist/cards/issue.list.yaml +1 -0
  15. package/dist/cards/issue.milestone.clear.yaml +41 -0
  16. package/dist/cards/issue.milestone.set.yaml +24 -4
  17. package/dist/{core/registry/cards/issue.blocked_by.add.yaml → cards/issue.relations.blocked_by.add.yaml} +4 -2
  18. package/dist/cards/{issue.blocked_by.remove.yaml → issue.relations.blocked_by.remove.yaml} +2 -1
  19. package/dist/cards/{issue.parent.remove.yaml → issue.relations.parent.remove.yaml} +12 -1
  20. package/dist/{core/registry/cards/issue.parent.set.yaml → cards/issue.relations.parent.set.yaml} +4 -2
  21. package/dist/{core/registry/cards/issue.linked_prs.list.yaml → cards/issue.relations.prs.list.yaml} +2 -1
  22. package/dist/cards/{issue.relations.get.yaml → issue.relations.view.yaml} +2 -1
  23. package/dist/cards/issue.reopen.yaml +17 -2
  24. package/dist/cards/issue.update.yaml +17 -2
  25. package/dist/cards/issue.view.yaml +8 -5
  26. package/dist/cards/pr.assignees.add.yaml +33 -0
  27. package/dist/cards/pr.assignees.remove.yaml +33 -0
  28. package/dist/cards/pr.branch.update.yaml +6 -2
  29. package/dist/{core/registry/cards/pr.status.checks.yaml → cards/pr.checks.list.yaml} +15 -2
  30. package/dist/{core/registry/cards/pr.checks.rerun_all.yaml → cards/pr.checks.rerun.all.yaml} +2 -4
  31. package/dist/{core/registry/cards/pr.checks.rerun_failed.yaml → cards/pr.checks.rerun.failed.yaml} +3 -5
  32. package/dist/cards/pr.create.yaml +34 -0
  33. package/dist/cards/{pr.diff.list_files.yaml → pr.diff.files.yaml} +2 -1
  34. package/dist/cards/{pr.ready_for_review.set.yaml → pr.diff.view.yaml} +6 -8
  35. package/dist/cards/pr.list.yaml +1 -0
  36. package/dist/{core/registry/cards/pr.mergeability.view.yaml → cards/pr.merge.status.yaml} +7 -3
  37. package/dist/{core/registry/cards/pr.merge.execute.yaml → cards/pr.merge.yaml} +10 -4
  38. package/dist/cards/pr.reviews.list.yaml +2 -1
  39. package/dist/cards/{pr.reviewers.request.yaml → pr.reviews.request.yaml} +7 -4
  40. package/dist/cards/pr.reviews.submit.yaml +68 -0
  41. package/dist/cards/{pr.comments.list.yaml → pr.threads.list.yaml} +3 -2
  42. package/dist/cards/{pr.comment.reply.yaml → pr.threads.reply.yaml} +5 -2
  43. package/dist/{core/registry/cards/pr.comment.resolve.yaml → cards/pr.threads.resolve.yaml} +2 -1
  44. package/dist/cards/{pr.comment.unresolve.yaml → pr.threads.unresolve.yaml} +2 -1
  45. package/dist/cards/pr.update.yaml +34 -0
  46. package/dist/cards/pr.view.yaml +8 -5
  47. package/dist/cards/project_v2.fields.list.yaml +18 -2
  48. package/dist/cards/{project_v2.item.field.update.yaml → project_v2.items.field.update.yaml} +9 -6
  49. package/dist/cards/{project_v2.item.add_issue.yaml → project_v2.items.issue.add.yaml} +10 -6
  50. package/dist/cards/project_v2.items.issue.remove.yaml +26 -0
  51. package/dist/cards/project_v2.items.list.yaml +8 -2
  52. package/dist/{core/registry/cards/project_v2.org.get.yaml → cards/project_v2.org.view.yaml} +7 -3
  53. package/dist/cards/{project_v2.user.get.yaml → project_v2.user.view.yaml} +7 -3
  54. package/dist/{core/registry/cards/release.create_draft.yaml → cards/release.create.yaml} +1 -1
  55. package/dist/cards/release.list.yaml +8 -3
  56. package/dist/cards/{release.publish_draft.yaml → release.publish.yaml} +1 -1
  57. package/dist/cards/{release.get.yaml → release.view.yaml} +9 -5
  58. package/dist/cards/repo.issue_types.list.yaml +7 -3
  59. package/dist/cards/repo.labels.list.yaml +7 -2
  60. package/dist/cards/repo.view.yaml +3 -4
  61. package/dist/cards/{workflow_dispatch.run.yaml → workflow.dispatch.yaml} +1 -1
  62. package/dist/cards/{workflow_job.logs.get.yaml → workflow.job.logs.raw.yaml} +2 -2
  63. package/dist/{core/registry/cards/workflow_job.logs.analyze.yaml → cards/workflow.job.logs.view.yaml} +1 -1
  64. package/dist/{core/registry/cards/workflow_run.artifacts.list.yaml → cards/workflow.run.artifacts.list.yaml} +1 -1
  65. package/dist/cards/{workflow_run.cancel.yaml → workflow.run.cancel.yaml} +1 -1
  66. package/dist/cards/{workflow_run.rerun_all.yaml → workflow.run.rerun.all.yaml} +3 -3
  67. package/dist/{core/registry/cards/workflow_run.rerun_failed.yaml → cards/workflow.run.rerun.failed.yaml} +3 -3
  68. package/dist/{core/registry/cards/workflow_run.get.yaml → cards/workflow.run.view.yaml} +19 -4
  69. package/dist/cards/{workflow_runs.list.yaml → workflow.runs.list.yaml} +1 -1
  70. package/dist/cards/{workflow.get.yaml → workflow.view.yaml} +2 -2
  71. package/dist/chunk-3DU2WHXF.js +15 -0
  72. package/dist/chunk-3DU2WHXF.js.map +1 -0
  73. package/dist/chunk-7HUKYNI2.js +536 -0
  74. package/dist/chunk-7HUKYNI2.js.map +1 -0
  75. package/dist/chunk-GQO6BHJV.js +98 -0
  76. package/dist/chunk-GQO6BHJV.js.map +1 -0
  77. package/dist/chunk-H7CLZHRO.js +280 -0
  78. package/dist/chunk-H7CLZHRO.js.map +1 -0
  79. package/dist/chunk-HEHONZTO.js +121 -0
  80. package/dist/chunk-HEHONZTO.js.map +1 -0
  81. package/dist/chunk-M5PJLKL5.js +6132 -0
  82. package/dist/chunk-M5PJLKL5.js.map +1 -0
  83. package/dist/chunk-NQ53ETYV.js +128 -0
  84. package/dist/chunk-NQ53ETYV.js.map +1 -0
  85. package/dist/chunk-OQWLEFAH.js +436 -0
  86. package/dist/chunk-OQWLEFAH.js.map +1 -0
  87. package/dist/chunk-Q2NW7DJE.js +878 -0
  88. package/dist/chunk-Q2NW7DJE.js.map +1 -0
  89. package/dist/chunk-QRHKAMRY.js +211 -0
  90. package/dist/chunk-QRHKAMRY.js.map +1 -0
  91. package/dist/chunk-R3CBGJZX.js +12 -0
  92. package/dist/chunk-R3CBGJZX.js.map +1 -0
  93. package/dist/chunk-TGL33GEA.js +132 -0
  94. package/dist/chunk-TGL33GEA.js.map +1 -0
  95. package/dist/chunk-TPQYVCAS.js +15 -0
  96. package/dist/chunk-TPQYVCAS.js.map +1 -0
  97. package/dist/chunk-ZGBVX2VG.js +32 -0
  98. package/dist/chunk-ZGBVX2VG.js.map +1 -0
  99. package/dist/cli/index.js +268 -22
  100. package/dist/cli/index.js.map +1 -1
  101. package/dist/core/registry/cards/issue.assignees.add.yaml +51 -0
  102. package/dist/core/registry/cards/issue.assignees.remove.yaml +51 -0
  103. package/dist/core/registry/cards/issue.assignees.set.yaml +48 -0
  104. package/dist/core/registry/cards/issue.close.yaml +17 -2
  105. package/dist/core/registry/cards/issue.comments.create.yaml +17 -2
  106. package/dist/core/registry/cards/issue.comments.list.yaml +1 -0
  107. package/dist/core/registry/cards/issue.create.yaml +12 -0
  108. package/dist/core/registry/cards/issue.delete.yaml +17 -2
  109. package/dist/core/registry/cards/issue.labels.add.yaml +49 -0
  110. package/dist/core/registry/cards/issue.labels.remove.yaml +51 -0
  111. package/dist/core/registry/cards/issue.labels.set.yaml +48 -0
  112. package/dist/core/registry/cards/issue.list.yaml +1 -0
  113. package/dist/core/registry/cards/issue.milestone.clear.yaml +41 -0
  114. package/dist/core/registry/cards/issue.milestone.set.yaml +24 -4
  115. package/dist/{cards/issue.blocked_by.add.yaml → core/registry/cards/issue.relations.blocked_by.add.yaml} +4 -2
  116. package/dist/core/registry/cards/{issue.blocked_by.remove.yaml → issue.relations.blocked_by.remove.yaml} +2 -1
  117. package/dist/core/registry/cards/{issue.parent.remove.yaml → issue.relations.parent.remove.yaml} +12 -1
  118. package/dist/{cards/issue.parent.set.yaml → core/registry/cards/issue.relations.parent.set.yaml} +4 -2
  119. package/dist/{cards/issue.linked_prs.list.yaml → core/registry/cards/issue.relations.prs.list.yaml} +2 -1
  120. package/dist/core/registry/cards/{issue.relations.get.yaml → issue.relations.view.yaml} +2 -1
  121. package/dist/core/registry/cards/issue.reopen.yaml +17 -2
  122. package/dist/core/registry/cards/issue.update.yaml +17 -2
  123. package/dist/core/registry/cards/issue.view.yaml +8 -5
  124. package/dist/core/registry/cards/pr.assignees.add.yaml +33 -0
  125. package/dist/core/registry/cards/pr.assignees.remove.yaml +33 -0
  126. package/dist/core/registry/cards/pr.branch.update.yaml +6 -2
  127. package/dist/{cards/pr.status.checks.yaml → core/registry/cards/pr.checks.list.yaml} +15 -2
  128. package/dist/{cards/pr.checks.rerun_all.yaml → core/registry/cards/pr.checks.rerun.all.yaml} +2 -4
  129. package/dist/{cards/pr.checks.rerun_failed.yaml → core/registry/cards/pr.checks.rerun.failed.yaml} +3 -5
  130. package/dist/core/registry/cards/pr.create.yaml +34 -0
  131. package/dist/core/registry/cards/{pr.diff.list_files.yaml → pr.diff.files.yaml} +2 -1
  132. package/dist/core/registry/cards/{pr.ready_for_review.set.yaml → pr.diff.view.yaml} +6 -8
  133. package/dist/core/registry/cards/pr.list.yaml +1 -0
  134. package/dist/{cards/pr.mergeability.view.yaml → core/registry/cards/pr.merge.status.yaml} +7 -3
  135. package/dist/{cards/pr.merge.execute.yaml → core/registry/cards/pr.merge.yaml} +10 -4
  136. package/dist/core/registry/cards/pr.reviews.list.yaml +2 -1
  137. package/dist/core/registry/cards/{pr.reviewers.request.yaml → pr.reviews.request.yaml} +7 -4
  138. package/dist/core/registry/cards/pr.reviews.submit.yaml +68 -0
  139. package/dist/core/registry/cards/{pr.comments.list.yaml → pr.threads.list.yaml} +3 -2
  140. package/dist/core/registry/cards/{pr.comment.reply.yaml → pr.threads.reply.yaml} +5 -2
  141. package/dist/{cards/pr.comment.resolve.yaml → core/registry/cards/pr.threads.resolve.yaml} +2 -1
  142. package/dist/core/registry/cards/{pr.comment.unresolve.yaml → pr.threads.unresolve.yaml} +2 -1
  143. package/dist/core/registry/cards/pr.update.yaml +34 -0
  144. package/dist/core/registry/cards/pr.view.yaml +8 -5
  145. package/dist/core/registry/cards/project_v2.fields.list.yaml +18 -2
  146. package/dist/core/registry/cards/{project_v2.item.field.update.yaml → project_v2.items.field.update.yaml} +9 -6
  147. package/dist/core/registry/cards/{project_v2.item.add_issue.yaml → project_v2.items.issue.add.yaml} +10 -6
  148. package/dist/core/registry/cards/project_v2.items.issue.remove.yaml +26 -0
  149. package/dist/core/registry/cards/project_v2.items.list.yaml +8 -2
  150. package/dist/{cards/project_v2.org.get.yaml → core/registry/cards/project_v2.org.view.yaml} +7 -3
  151. package/dist/core/registry/cards/{project_v2.user.get.yaml → project_v2.user.view.yaml} +7 -3
  152. package/dist/{cards/release.create_draft.yaml → core/registry/cards/release.create.yaml} +1 -1
  153. package/dist/core/registry/cards/release.list.yaml +8 -3
  154. package/dist/core/registry/cards/{release.publish_draft.yaml → release.publish.yaml} +1 -1
  155. package/dist/core/registry/cards/{release.get.yaml → release.view.yaml} +9 -5
  156. package/dist/core/registry/cards/repo.issue_types.list.yaml +7 -3
  157. package/dist/core/registry/cards/repo.labels.list.yaml +7 -2
  158. package/dist/core/registry/cards/repo.view.yaml +3 -4
  159. package/dist/core/registry/cards/{workflow_dispatch.run.yaml → workflow.dispatch.yaml} +1 -1
  160. package/dist/core/registry/cards/{workflow_job.logs.get.yaml → workflow.job.logs.raw.yaml} +2 -2
  161. package/dist/{cards/workflow_job.logs.analyze.yaml → core/registry/cards/workflow.job.logs.view.yaml} +1 -1
  162. package/dist/{cards/workflow_run.artifacts.list.yaml → core/registry/cards/workflow.run.artifacts.list.yaml} +1 -1
  163. package/dist/core/registry/cards/{workflow_run.cancel.yaml → workflow.run.cancel.yaml} +1 -1
  164. package/dist/core/registry/cards/{workflow_run.rerun_all.yaml → workflow.run.rerun.all.yaml} +3 -3
  165. package/dist/{cards/workflow_run.rerun_failed.yaml → core/registry/cards/workflow.run.rerun.failed.yaml} +3 -3
  166. package/dist/{cards/workflow_run.get.yaml → core/registry/cards/workflow.run.view.yaml} +19 -4
  167. package/dist/core/registry/cards/{workflow_runs.list.yaml → workflow.runs.list.yaml} +1 -1
  168. package/dist/core/registry/cards/{workflow.get.yaml → workflow.view.yaml} +2 -2
  169. package/dist/index.d.ts +671 -35
  170. package/dist/index.js +41 -5
  171. package/dist/index.js.map +1 -1
  172. package/dist/issue-mutations-OW464JP3.js +645 -0
  173. package/dist/issue-mutations-OW464JP3.js.map +1 -0
  174. package/dist/issue-queries-ORG3VPK4.js +93 -0
  175. package/dist/issue-queries-ORG3VPK4.js.map +1 -0
  176. package/dist/pr-mutations-WOTG6FAB.js +484 -0
  177. package/dist/pr-mutations-WOTG6FAB.js.map +1 -0
  178. package/dist/pr-queries-6CJJW7BT.js +143 -0
  179. package/dist/pr-queries-6CJJW7BT.js.map +1 -0
  180. package/dist/project-QFSCYDDW.js +429 -0
  181. package/dist/project-QFSCYDDW.js.map +1 -0
  182. package/dist/release-33236BBA.js +57 -0
  183. package/dist/release-33236BBA.js.map +1 -0
  184. package/dist/repo-M6DKCWBG.js +82 -0
  185. package/dist/repo-M6DKCWBG.js.map +1 -0
  186. package/package.json +19 -16
  187. package/skills/using-ghx/SKILL.md +127 -0
  188. package/dist/agent.d.ts +0 -32
  189. package/dist/agent.js +0 -36
  190. package/dist/agent.js.map +0 -1
  191. package/dist/cards/check_run.annotations.list.yaml +0 -35
  192. package/dist/cards/issue.assignees.update.yaml +0 -27
  193. package/dist/cards/issue.labels.update.yaml +0 -27
  194. package/dist/cards/pr.assignees.update.yaml +0 -38
  195. package/dist/cards/pr.checks.get_failed.yaml +0 -42
  196. package/dist/cards/pr.review.submit_approve.yaml +0 -26
  197. package/dist/cards/pr.review.submit_comment.yaml +0 -26
  198. package/dist/cards/pr.review.submit_request_changes.yaml +0 -26
  199. package/dist/cards/workflow_run.jobs.list.yaml +0 -35
  200. package/dist/chunk-2FCPR3XZ.js +0 -54
  201. package/dist/chunk-2FCPR3XZ.js.map +0 -1
  202. package/dist/chunk-RDUPMVHG.js +0 -4139
  203. package/dist/chunk-RDUPMVHG.js.map +0 -1
  204. package/dist/chunk-UN5YHUNK.js +0 -245
  205. package/dist/chunk-UN5YHUNK.js.map +0 -1
  206. package/dist/cli/assets/skills/ghx/SKILL.md +0 -57
  207. package/dist/core/registry/cards/check_run.annotations.list.yaml +0 -35
  208. package/dist/core/registry/cards/issue.assignees.update.yaml +0 -27
  209. package/dist/core/registry/cards/issue.labels.update.yaml +0 -27
  210. package/dist/core/registry/cards/pr.assignees.update.yaml +0 -38
  211. package/dist/core/registry/cards/pr.checks.get_failed.yaml +0 -42
  212. package/dist/core/registry/cards/pr.review.submit_approve.yaml +0 -26
  213. package/dist/core/registry/cards/pr.review.submit_comment.yaml +0 -26
  214. package/dist/core/registry/cards/pr.review.submit_request_changes.yaml +0 -26
  215. package/dist/core/registry/cards/workflow_run.jobs.list.yaml +0 -35
  216. package/dist/envelope-BpF6MNCv.d.ts +0 -55
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "ghx",
3
+ "description": "GitHub execution router for AI agents — 70 capabilities with deterministic routing and normalized output",
4
+ "version": "0.2.1",
5
+ "author": {
6
+ "name": "Arye Kogan"
7
+ },
8
+ "repository": "https://github.com/aryeko/ghx",
9
+ "homepage": "https://github.com/aryeko/ghx",
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "github",
13
+ "github-api",
14
+ "ai-agents",
15
+ "agentic",
16
+ "cli",
17
+ "graphql",
18
+ "automation",
19
+ "typescript"
20
+ ]
21
+ }
package/README.md CHANGED
@@ -14,16 +14,16 @@ Typed GitHub execution router for AI agents. Deterministic routing across CLI an
14
14
 
15
15
  ## Why ghx
16
16
 
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:
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 40 runs on standard PR and issue workflows (MCP mode benchmark coming soon):
18
18
 
19
19
  | Metric | Improvement |
20
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) |
21
+ | Tool calls | **-55%** (PR review), **-47%** (issue triage) |
22
+ | Active tokens | **-88%** (PR review), **-41%** (thread resolution) |
23
+ | Latency | **-57%** (PR review), **-26%** (thread resolution) |
24
+ | Success rate | **100%** both modes |
25
25
 
26
- ghx eliminates the discovery phase: agents call typed capabilities, get validated results back in a stable envelope.
26
+ Full report: [Codex 5.3 Benchmark](https://github.com/aryeko/ghx/blob/main/reports/codex-5.3-benchmark/README.md)
27
27
 
28
28
  ## Installation
29
29
 
@@ -84,6 +84,20 @@ Every capability returns a stable envelope:
84
84
  }
85
85
  ```
86
86
 
87
+ ## Chain: Batch Operations
88
+
89
+ Batch multiple operations into a single tool call:
90
+
91
+ ```bash
92
+ ghx chain --steps - <<'EOF'
93
+ [
94
+ {"task":"issue.labels.remove","input":{"owner":"acme","name":"repo","issueNumber":42,"labels":["triage"]}},
95
+ {"task":"issue.labels.add","input":{"owner":"acme","name":"repo","issueNumber":42,"labels":["enhancement"]}},
96
+ {"task":"issue.comments.create","input":{"owner":"acme","name":"repo","issueNumber":42,"body":"Triaged."}}
97
+ ]
98
+ EOF
99
+ ```
100
+
87
101
  ## Quick Start (Library API)
88
102
 
89
103
  ```ts
@@ -104,39 +118,32 @@ if (result.ok) {
104
118
  }
105
119
  ```
106
120
 
107
- Need a custom GraphQL transport? Use `createGithubClient(transport)` instead -- see the [advanced usage section](#custom-graphql-transport).
121
+ Need a custom GraphQL transport? See [Custom GraphQL Transport](#custom-graphql-transport).
108
122
 
109
123
  ## Agent Onboarding
110
124
 
111
- Install ghx as a project skill for Claude Code:
125
+ <details>
126
+ <summary>Install ghx as a project skill for Claude Code</summary>
112
127
 
113
128
  ```bash
114
129
  npx @ghx-dev/core setup --scope project --yes
115
130
  npx @ghx-dev/core setup --scope project --verify
116
131
  ```
117
132
 
118
- ### Setup Skill Source
119
-
120
- The canonical setup skill content is stored in:
133
+ The canonical setup skill content is stored in `skills/using-ghx/SKILL.md` (package root). During build/publish it is copied to `dist/skills/using-ghx/SKILL.md`. `ghx setup` writes this content to `.agents/skills/ghx/SKILL.md` in user or project scope.
121
134
 
122
- - `src/cli/assets/skills/ghx/SKILL.md`
135
+ </details>
123
136
 
124
- During build/publish it is copied to:
125
-
126
- - `dist/cli/assets/skills/ghx/SKILL.md`
127
-
128
- `ghx setup` writes this content to `.agents/skills/ghx/SKILL.md` in user or project scope.
129
-
130
- ## Agent Tools (`@ghx-dev/core/agent`)
137
+ ## Agent Tools
131
138
 
132
139
  ```ts
133
140
  import {
134
141
  createExecuteTool,
135
- listCapabilities,
142
+ createGithubClientFromToken,
143
+ executeTask,
136
144
  explainCapability,
137
- MAIN_SKILL_TEXT,
138
- } from "@ghx-dev/core/agent"
139
- import { createGithubClientFromToken, executeTask } from "@ghx-dev/core"
145
+ listCapabilities,
146
+ } from "@ghx-dev/core"
140
147
 
141
148
  // Wire the execute tool to the real engine
142
149
  const token = process.env.GITHUB_TOKEN!
@@ -152,27 +159,18 @@ console.log(explainCapability("repo.view"))
152
159
  const result = await tool.execute("repo.view", { owner: "aryeko", name: "ghx" })
153
160
  ```
154
161
 
155
- `MAIN_SKILL_TEXT` provides a ready-to-use system prompt describing all capabilities.
156
-
157
- ## 66 Capabilities
158
-
159
- **Repository** -- `repo.view`, `repo.labels.list`, `repo.issue_types.list`
160
-
161
- **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`
162
-
163
- **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`
164
-
165
- **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`
162
+ ## 70 Capabilities
166
163
 
167
- **CI Diagnostics** -- `check_run.annotations.list`, `workflow_runs.list`, `workflow_run.jobs.list`, `workflow_job.logs.get`, `workflow_job.logs.analyze`
164
+ | Domain | Count | Examples |
165
+ |---|---|---|
166
+ | Repository | 3 | `repo.view`, `repo.labels.list` |
167
+ | Issues | 23 | create/update/close, labels, assignees, milestones, relations |
168
+ | Pull Requests | 21 | diff, threads, reviews, checks, merge, branch update |
169
+ | Workflows and CI | 11 | runs, jobs, logs, dispatch, rerun, cancel, artifacts |
170
+ | Releases | 5 | view, list, create, update, publish |
171
+ | Projects v2 | 7 | items, fields, add/remove issues |
168
172
 
169
- **Releases** -- `release.list`, `release.get`, `release.create_draft`, `release.update`, `release.publish_draft`
170
-
171
- **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`
172
-
173
- **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`
174
-
175
- For exact input/output contracts, see the [operation card registry](https://github.com/aryeko/ghx/tree/main/packages/core/src/core/registry/cards).
173
+ Full list: `ghx capabilities list` or [operation card registry](https://github.com/aryeko/ghx/tree/main/packages/core/src/core/registry/cards).
176
174
 
177
175
  ## Result Envelope
178
176
 
@@ -220,7 +218,8 @@ type ResultEnvelope<TData = unknown> = {
220
218
  - GitHub Cloud and GitHub Enterprise hosts (`GH_HOST` supported)
221
219
  - Route adapters: CLI and GraphQL
222
220
 
223
- ## Public Exports
221
+ <details>
222
+ <summary>Public Exports</summary>
224
223
 
225
224
  Root (`@ghx-dev/core`):
226
225
 
@@ -233,10 +232,13 @@ Root (`@ghx-dev/core`):
233
232
 
234
233
  Subpaths:
235
234
 
236
- - `@ghx-dev/core/agent` -- `createExecuteTool`, `listCapabilities`, `explainCapability`, `MAIN_SKILL_TEXT`
237
235
  - `@ghx-dev/core/cli` -- CLI entrypoint
238
236
 
239
- ## Custom GraphQL Transport
237
+ </details>
238
+
239
+ <details>
240
+ <a id="custom-graphql-transport"></a>
241
+ <summary>Custom GraphQL Transport</summary>
240
242
 
241
243
  For full control over the GraphQL layer, pass your own transport to `createGithubClient`:
242
244
 
@@ -266,6 +268,8 @@ const result = await executeTask(
266
268
  )
267
269
  ```
268
270
 
271
+ </details>
272
+
269
273
  ## Documentation
270
274
 
271
275
  - [Documentation Hub](https://github.com/aryeko/ghx/blob/main/docs/README.md)
@@ -0,0 +1,51 @@
1
+ capability_id: issue.assignees.add
2
+ version: "1.0.0"
3
+ description: Add assignees to an issue without replacing existing ones.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, issueNumber, assignees]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
11
+ assignees:
12
+ type: array
13
+ items: { type: string, minLength: 1 }
14
+ minItems: 1
15
+ additionalProperties: false
16
+ output_schema:
17
+ type: object
18
+ required: [issueNumber, added]
19
+ properties:
20
+ issueNumber: { type: integer, minimum: 1 }
21
+ added:
22
+ type: array
23
+ items: { type: string }
24
+ additionalProperties: false
25
+ routing:
26
+ preferred: graphql
27
+ fallbacks: [cli]
28
+ graphql:
29
+ operationName: IssueAssigneesAdd
30
+ operationType: mutation
31
+ documentPath: src/gql/operations/issue-assignees-add.graphql
32
+ resolution:
33
+ lookup:
34
+ operationName: IssueAssigneesLookupByNumber
35
+ documentPath: src/gql/operations/issue-assignees-lookup-by-number.graphql
36
+ vars:
37
+ owner: owner
38
+ name: name
39
+ issueNumber: issueNumber
40
+ inject:
41
+ - target: assignableId
42
+ source: scalar
43
+ path: repository.issue.id
44
+ - target: assigneeIds
45
+ source: map_array
46
+ from_input: assignees
47
+ nodes_path: repository.assignableUsers.nodes
48
+ match_field: login
49
+ extract_field: id
50
+ cli:
51
+ command: issue edit
@@ -0,0 +1,51 @@
1
+ capability_id: issue.assignees.remove
2
+ version: "1.0.0"
3
+ description: Remove specific assignees from an issue.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, issueNumber, assignees]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
11
+ assignees:
12
+ type: array
13
+ items: { type: string, minLength: 1 }
14
+ minItems: 1
15
+ additionalProperties: false
16
+ output_schema:
17
+ type: object
18
+ required: [issueNumber, removed]
19
+ properties:
20
+ issueNumber: { type: integer, minimum: 1 }
21
+ removed:
22
+ type: array
23
+ items: { type: string, minLength: 1 }
24
+ additionalProperties: false
25
+ routing:
26
+ preferred: graphql
27
+ fallbacks: [cli]
28
+ graphql:
29
+ operationName: IssueAssigneesRemove
30
+ operationType: mutation
31
+ documentPath: src/gql/operations/issue-assignees-remove.graphql
32
+ resolution:
33
+ lookup:
34
+ operationName: IssueAssigneesLookupByNumber
35
+ documentPath: src/gql/operations/issue-assignees-lookup-by-number.graphql
36
+ vars:
37
+ owner: owner
38
+ name: name
39
+ issueNumber: issueNumber
40
+ inject:
41
+ - target: assignableId
42
+ source: scalar
43
+ path: repository.issue.id
44
+ - target: assigneeIds
45
+ source: map_array
46
+ from_input: assignees
47
+ nodes_path: repository.assignableUsers.nodes
48
+ match_field: login
49
+ extract_field: id
50
+ cli:
51
+ command: issue edit
@@ -0,0 +1,48 @@
1
+ capability_id: issue.assignees.set
2
+ version: "1.0.0"
3
+ description: Replace issue assignees.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, issueNumber, assignees]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
11
+ assignees:
12
+ type: array
13
+ items: { type: string, minLength: 1 }
14
+ additionalProperties: false
15
+ output_schema:
16
+ type: object
17
+ required: [id, assignees]
18
+ properties:
19
+ id: { type: string, minLength: 1 }
20
+ assignees:
21
+ type: array
22
+ items: { type: string, minLength: 1 }
23
+ additionalProperties: false
24
+ routing:
25
+ preferred: graphql
26
+ fallbacks: []
27
+ graphql:
28
+ operationName: IssueAssigneesUpdate
29
+ operationType: mutation
30
+ documentPath: src/gql/operations/issue-assignees-update.graphql
31
+ resolution:
32
+ lookup:
33
+ operationName: IssueAssigneesLookupByNumber
34
+ documentPath: src/gql/operations/issue-assignees-lookup-by-number.graphql
35
+ vars:
36
+ owner: owner
37
+ name: name
38
+ issueNumber: issueNumber
39
+ inject:
40
+ - target: assignableId
41
+ source: scalar
42
+ path: repository.issue.id
43
+ - target: assigneeIds
44
+ source: map_array
45
+ from_input: assignees
46
+ nodes_path: repository.assignableUsers.nodes
47
+ match_field: login
48
+ extract_field: id
@@ -3,9 +3,11 @@ version: "1.0.0"
3
3
  description: Close an issue.
4
4
  input_schema:
5
5
  type: object
6
- required: [issueId]
6
+ required: [owner, name, issueNumber]
7
7
  properties:
8
- issueId: { type: string, minLength: 1 }
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
9
11
  additionalProperties: false
10
12
  output_schema:
11
13
  type: object
@@ -21,4 +23,17 @@ routing:
21
23
  fallbacks: []
22
24
  graphql:
23
25
  operationName: IssueClose
26
+ operationType: mutation
24
27
  documentPath: src/gql/operations/issue-close.graphql
28
+ resolution:
29
+ lookup:
30
+ operationName: IssueNodeIdLookup
31
+ documentPath: src/gql/operations/issue-node-id-lookup.graphql
32
+ vars:
33
+ owner: owner
34
+ name: name
35
+ issueNumber: issueNumber
36
+ inject:
37
+ - target: issueId
38
+ source: scalar
39
+ path: repository.issue.id
@@ -3,9 +3,11 @@ version: "1.0.0"
3
3
  description: Create an issue comment.
4
4
  input_schema:
5
5
  type: object
6
- required: [issueId, body]
6
+ required: [owner, name, issueNumber, body]
7
7
  properties:
8
- issueId: { type: string, minLength: 1 }
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
9
11
  body: { type: string, minLength: 1 }
10
12
  additionalProperties: false
11
13
  output_schema:
@@ -21,4 +23,17 @@ routing:
21
23
  fallbacks: []
22
24
  graphql:
23
25
  operationName: IssueCommentCreate
26
+ operationType: mutation
24
27
  documentPath: src/gql/operations/issue-comment-create.graphql
28
+ resolution:
29
+ lookup:
30
+ operationName: IssueNodeIdLookup
31
+ documentPath: src/gql/operations/issue-node-id-lookup.graphql
32
+ vars:
33
+ owner: owner
34
+ name: name
35
+ issueNumber: issueNumber
36
+ inject:
37
+ - target: issueId
38
+ source: scalar
39
+ path: repository.issue.id
@@ -43,6 +43,7 @@ routing:
43
43
  - CLI fallback uses gh api graphql with bounded cursor pagination for comments.
44
44
  graphql:
45
45
  operationName: IssueCommentsList
46
+ operationType: query
46
47
  documentPath: src/gql/operations/issue-comments-list.graphql
47
48
  cli:
48
49
  command: api graphql
@@ -25,4 +25,16 @@ routing:
25
25
  fallbacks: []
26
26
  graphql:
27
27
  operationName: IssueCreate
28
+ operationType: mutation
28
29
  documentPath: src/gql/operations/issue-create.graphql
30
+ resolution:
31
+ lookup:
32
+ operationName: IssueCreateRepositoryId
33
+ documentPath: src/gql/operations/issue-create-repository-id.graphql
34
+ vars:
35
+ owner: owner
36
+ name: name
37
+ inject:
38
+ - target: repositoryId
39
+ source: scalar
40
+ path: repository.id
@@ -3,9 +3,11 @@ version: "1.0.0"
3
3
  description: Delete an issue.
4
4
  input_schema:
5
5
  type: object
6
- required: [issueId]
6
+ required: [owner, name, issueNumber]
7
7
  properties:
8
- issueId: { type: string, minLength: 1 }
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
9
11
  additionalProperties: false
10
12
  output_schema:
11
13
  type: object
@@ -20,4 +22,17 @@ routing:
20
22
  fallbacks: []
21
23
  graphql:
22
24
  operationName: IssueDelete
25
+ operationType: mutation
23
26
  documentPath: src/gql/operations/issue-delete.graphql
27
+ resolution:
28
+ lookup:
29
+ operationName: IssueNodeIdLookup
30
+ documentPath: src/gql/operations/issue-node-id-lookup.graphql
31
+ vars:
32
+ owner: owner
33
+ name: name
34
+ issueNumber: issueNumber
35
+ inject:
36
+ - target: issueId
37
+ source: scalar
38
+ path: repository.issue.id
@@ -0,0 +1,49 @@
1
+ capability_id: issue.labels.add
2
+ version: "1.0.0"
3
+ description: Add labels to an issue without removing existing labels.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, issueNumber, labels]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
11
+ labels:
12
+ type: array
13
+ items: { type: string, minLength: 1 }
14
+ minItems: 1
15
+ additionalProperties: false
16
+ output_schema:
17
+ type: object
18
+ required: [id, labels]
19
+ properties:
20
+ id: { type: string, minLength: 1 }
21
+ labels:
22
+ type: array
23
+ items: { type: string }
24
+ additionalProperties: false
25
+ routing:
26
+ preferred: graphql
27
+ fallbacks: []
28
+ graphql:
29
+ operationName: IssueLabelsAdd
30
+ operationType: mutation
31
+ documentPath: src/gql/operations/issue-labels-add.graphql
32
+ resolution:
33
+ lookup:
34
+ operationName: IssueLabelsLookupByNumber
35
+ documentPath: src/gql/operations/issue-labels-lookup-by-number.graphql
36
+ vars:
37
+ owner: owner
38
+ name: name
39
+ issueNumber: issueNumber
40
+ inject:
41
+ - target: labelableId
42
+ source: scalar
43
+ path: repository.issue.id
44
+ - target: labelIds
45
+ source: map_array
46
+ from_input: labels
47
+ nodes_path: repository.labels.nodes
48
+ match_field: name
49
+ extract_field: id
@@ -0,0 +1,51 @@
1
+ capability_id: issue.labels.remove
2
+ version: "1.0.0"
3
+ description: Remove specific labels from an issue.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, issueNumber, labels]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
11
+ labels:
12
+ type: array
13
+ items: { type: string, minLength: 1 }
14
+ minItems: 1
15
+ additionalProperties: false
16
+ output_schema:
17
+ type: object
18
+ required: [issueNumber, removed]
19
+ properties:
20
+ issueNumber: { type: integer, minimum: 1 }
21
+ removed:
22
+ type: array
23
+ items: { type: string }
24
+ additionalProperties: false
25
+ routing:
26
+ preferred: graphql
27
+ fallbacks: [cli]
28
+ graphql:
29
+ operationName: IssueLabelsRemove
30
+ operationType: mutation
31
+ documentPath: src/gql/operations/issue-labels-remove.graphql
32
+ resolution:
33
+ lookup:
34
+ operationName: IssueLabelsLookupByNumber
35
+ documentPath: src/gql/operations/issue-labels-lookup-by-number.graphql
36
+ vars:
37
+ owner: owner
38
+ name: name
39
+ issueNumber: issueNumber
40
+ inject:
41
+ - target: labelableId
42
+ source: scalar
43
+ path: repository.issue.id
44
+ - target: labelIds
45
+ source: map_array
46
+ from_input: labels
47
+ nodes_path: repository.labels.nodes
48
+ match_field: name
49
+ extract_field: id
50
+ cli:
51
+ command: issue edit
@@ -0,0 +1,48 @@
1
+ capability_id: issue.labels.set
2
+ version: "1.0.0"
3
+ description: Replace issue labels.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, issueNumber, labels]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
11
+ labels:
12
+ type: array
13
+ items: { type: string, minLength: 1 }
14
+ additionalProperties: false
15
+ output_schema:
16
+ type: object
17
+ required: [id, labels]
18
+ properties:
19
+ id: { type: string, minLength: 1 }
20
+ labels:
21
+ type: array
22
+ items: { type: string, minLength: 1 }
23
+ additionalProperties: false
24
+ routing:
25
+ preferred: graphql
26
+ fallbacks: []
27
+ graphql:
28
+ operationName: IssueLabelsUpdate
29
+ operationType: mutation
30
+ documentPath: src/gql/operations/issue-labels-update.graphql
31
+ resolution:
32
+ lookup:
33
+ operationName: IssueLabelsLookupByNumber
34
+ documentPath: src/gql/operations/issue-labels-lookup-by-number.graphql
35
+ vars:
36
+ owner: owner
37
+ name: name
38
+ issueNumber: issueNumber
39
+ inject:
40
+ - target: labelableId
41
+ source: scalar
42
+ path: repository.issue.id
43
+ - target: labelIds
44
+ source: map_array
45
+ from_input: labels
46
+ nodes_path: repository.labels.nodes
47
+ match_field: name
48
+ extract_field: id
@@ -42,6 +42,7 @@ routing:
42
42
  - Prefer CLI for low-latency structured fetches when gh authentication is available.
43
43
  graphql:
44
44
  operationName: IssueList
45
+ operationType: query
45
46
  documentPath: src/gql/operations/issue-list.graphql
46
47
  cli:
47
48
  command: issue list
@@ -0,0 +1,41 @@
1
+ capability_id: issue.milestone.clear
2
+ version: "1.0.0"
3
+ description: Remove the milestone from an issue.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, issueNumber]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ issueNumber: { type: integer, minimum: 1 }
11
+ additionalProperties: false
12
+ output_schema:
13
+ type: object
14
+ required: [issueNumber, cleared]
15
+ properties:
16
+ issueNumber: { type: integer, minimum: 1 }
17
+ cleared: { type: boolean }
18
+ additionalProperties: false
19
+ routing:
20
+ preferred: graphql
21
+ fallbacks: [cli]
22
+ graphql:
23
+ operationName: IssueMilestoneSet
24
+ operationType: mutation
25
+ documentPath: src/gql/operations/issue-milestone-set.graphql
26
+ resolution:
27
+ lookup:
28
+ operationName: IssueNodeIdLookup
29
+ documentPath: src/gql/operations/issue-node-id-lookup.graphql
30
+ vars:
31
+ owner: owner
32
+ name: name
33
+ issueNumber: issueNumber
34
+ inject:
35
+ - target: issueId
36
+ source: scalar
37
+ path: repository.issue.id
38
+ - target: milestoneId
39
+ source: "null_literal"
40
+ cli:
41
+ command: issue edit