@ghx-dev/core 0.1.0-beta.0 → 0.1.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 (412) hide show
  1. package/README.md +181 -114
  2. package/dist/agent.d.ts +32 -7
  3. package/dist/agent.js +29 -12
  4. package/dist/agent.js.map +1 -1
  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-OL4ARD3R.js +242 -0
  72. package/dist/chunk-OL4ARD3R.js.map +1 -0
  73. package/dist/chunk-PJ2JKKQE.js +4148 -0
  74. package/dist/chunk-PJ2JKKQE.js.map +1 -0
  75. package/dist/{chunk-MMG6CIKK.js → chunk-SCIJMW5P.js} +14 -4
  76. package/dist/chunk-SCIJMW5P.js.map +1 -0
  77. package/dist/cli/assets/skills/ghx/SKILL.md +57 -0
  78. package/dist/cli/index.js +373 -41
  79. package/dist/cli/index.js.map +1 -1
  80. package/dist/core/registry/cards/issue.assignees.update.yaml +27 -0
  81. package/dist/core/registry/cards/issue.blocked_by.add.yaml +23 -0
  82. package/dist/core/registry/cards/issue.blocked_by.remove.yaml +24 -0
  83. package/dist/core/registry/cards/issue.close.yaml +24 -0
  84. package/dist/core/registry/cards/issue.comments.create.yaml +24 -0
  85. package/dist/core/registry/cards/issue.create.yaml +28 -0
  86. package/dist/core/registry/cards/issue.delete.yaml +23 -0
  87. package/dist/core/registry/cards/issue.labels.update.yaml +27 -0
  88. package/dist/core/registry/cards/issue.linked_prs.list.yaml +34 -0
  89. package/dist/core/registry/cards/issue.milestone.set.yaml +23 -0
  90. package/dist/core/registry/cards/issue.parent.remove.yaml +22 -0
  91. package/dist/core/registry/cards/issue.parent.set.yaml +23 -0
  92. package/dist/core/registry/cards/issue.relations.get.yaml +54 -0
  93. package/dist/core/registry/cards/issue.reopen.yaml +24 -0
  94. package/dist/core/registry/cards/issue.update.yaml +27 -0
  95. package/dist/core/registry/cards/pr.assignees.update.yaml +38 -0
  96. package/dist/core/registry/cards/pr.branch.update.yaml +23 -0
  97. package/dist/core/registry/cards/pr.checks.rerun_all.yaml +26 -0
  98. package/dist/core/registry/cards/pr.checks.rerun_failed.yaml +26 -0
  99. package/dist/core/registry/cards/pr.merge.execute.yaml +29 -0
  100. package/dist/core/registry/cards/pr.review.submit_approve.yaml +26 -0
  101. package/dist/core/registry/cards/pr.review.submit_comment.yaml +26 -0
  102. package/dist/core/registry/cards/pr.review.submit_request_changes.yaml +26 -0
  103. package/dist/core/registry/cards/pr.reviewers.request.yaml +31 -0
  104. package/dist/core/registry/cards/project_v2.fields.list.yaml +37 -0
  105. package/dist/core/registry/cards/project_v2.item.add_issue.yaml +23 -0
  106. package/dist/core/registry/cards/project_v2.item.field.update.yaml +29 -0
  107. package/dist/core/registry/cards/project_v2.items.list.yaml +39 -0
  108. package/dist/core/registry/cards/project_v2.org.get.yaml +26 -0
  109. package/dist/core/registry/cards/project_v2.user.get.yaml +26 -0
  110. package/dist/core/registry/cards/release.create_draft.yaml +36 -0
  111. package/dist/core/registry/cards/release.get.yaml +30 -0
  112. package/dist/core/registry/cards/release.list.yaml +44 -0
  113. package/dist/core/registry/cards/release.publish_draft.yaml +36 -0
  114. package/dist/core/registry/cards/release.update.yaml +38 -0
  115. package/dist/core/registry/cards/repo.issue_types.list.yaml +40 -0
  116. package/dist/core/registry/cards/repo.labels.list.yaml +41 -0
  117. package/dist/core/registry/cards/workflow.get.yaml +30 -0
  118. package/dist/core/registry/cards/workflow.list.yaml +40 -0
  119. package/dist/core/registry/cards/workflow_dispatch.run.yaml +29 -0
  120. package/dist/core/registry/cards/workflow_run.artifacts.list.yaml +40 -0
  121. package/dist/core/registry/cards/workflow_run.cancel.yaml +23 -0
  122. package/dist/core/registry/cards/workflow_run.get.yaml +33 -0
  123. package/dist/core/registry/cards/workflow_run.rerun_all.yaml +23 -0
  124. package/dist/core/registry/cards/workflow_run.rerun_failed.yaml +23 -0
  125. package/dist/{core/contracts/envelope.d.ts → envelope-BpF6MNCv.d.ts} +15 -3
  126. package/dist/index.d.ts +470 -22
  127. package/dist/index.js +7 -29
  128. package/package.json +49 -20
  129. package/dist/agent-interface/prompt/main-skill.d.ts +0 -3
  130. package/dist/agent-interface/prompt/main-skill.js +0 -7
  131. package/dist/agent-interface/prompt/main-skill.js.map +0 -1
  132. package/dist/agent-interface/tools/execute-tool.d.ts +0 -16
  133. package/dist/agent-interface/tools/execute-tool.js +0 -7
  134. package/dist/agent-interface/tools/execute-tool.js.map +0 -1
  135. package/dist/agent-interface/tools/explain-tool.d.ts +0 -11
  136. package/dist/agent-interface/tools/explain-tool.js +0 -9
  137. package/dist/agent-interface/tools/explain-tool.js.map +0 -1
  138. package/dist/agent-interface/tools/list-capabilities-tool.d.ts +0 -7
  139. package/dist/agent-interface/tools/list-capabilities-tool.js +0 -9
  140. package/dist/agent-interface/tools/list-capabilities-tool.js.map +0 -1
  141. package/dist/chunk-2W4L5YCC.js +0 -116
  142. package/dist/chunk-2W4L5YCC.js.map +0 -1
  143. package/dist/chunk-3RAT5BCB.js +0 -584
  144. package/dist/chunk-3RAT5BCB.js.map +0 -1
  145. package/dist/chunk-3RJCF42N.js +0 -16
  146. package/dist/chunk-3RJCF42N.js.map +0 -1
  147. package/dist/chunk-573MDG3I.js +0 -18
  148. package/dist/chunk-573MDG3I.js.map +0 -1
  149. package/dist/chunk-5JRLVOF2.js +0 -50
  150. package/dist/chunk-5JRLVOF2.js.map +0 -1
  151. package/dist/chunk-B6RLMKS4.js +0 -41
  152. package/dist/chunk-B6RLMKS4.js.map +0 -1
  153. package/dist/chunk-BJHVAFTN.js +0 -42
  154. package/dist/chunk-BJHVAFTN.js.map +0 -1
  155. package/dist/chunk-D746VR3B.js +0 -38
  156. package/dist/chunk-D746VR3B.js.map +0 -1
  157. package/dist/chunk-DJIEG6K7.js +0 -20
  158. package/dist/chunk-DJIEG6K7.js.map +0 -1
  159. package/dist/chunk-DLKIQBK6.js +0 -106
  160. package/dist/chunk-DLKIQBK6.js.map +0 -1
  161. package/dist/chunk-EBRDO4Y6.js +0 -31
  162. package/dist/chunk-EBRDO4Y6.js.map +0 -1
  163. package/dist/chunk-FXN6IIT5.js +0 -14
  164. package/dist/chunk-FXN6IIT5.js.map +0 -1
  165. package/dist/chunk-GPU4P7UG.js +0 -92
  166. package/dist/chunk-GPU4P7UG.js.map +0 -1
  167. package/dist/chunk-MMG6CIKK.js.map +0 -1
  168. package/dist/chunk-MT4U5DYD.js +0 -88
  169. package/dist/chunk-MT4U5DYD.js.map +0 -1
  170. package/dist/chunk-NFF5VF4U.js +0 -28
  171. package/dist/chunk-NFF5VF4U.js.map +0 -1
  172. package/dist/chunk-Q4RTT3DV.js +0 -209
  173. package/dist/chunk-Q4RTT3DV.js.map +0 -1
  174. package/dist/chunk-QEAMC4IJ.js +0 -34
  175. package/dist/chunk-QEAMC4IJ.js.map +0 -1
  176. package/dist/chunk-QX34GTH6.js +0 -30
  177. package/dist/chunk-QX34GTH6.js.map +0 -1
  178. package/dist/chunk-QZZC53HF.js +0 -38
  179. package/dist/chunk-QZZC53HF.js.map +0 -1
  180. package/dist/chunk-RUQXGZ35.js +0 -34
  181. package/dist/chunk-RUQXGZ35.js.map +0 -1
  182. package/dist/chunk-TCLMLVUQ.js +0 -38
  183. package/dist/chunk-TCLMLVUQ.js.map +0 -1
  184. package/dist/chunk-TDTKOJKN.js +0 -52
  185. package/dist/chunk-TDTKOJKN.js.map +0 -1
  186. package/dist/chunk-UGWIZ3RI.js +0 -7
  187. package/dist/chunk-UGWIZ3RI.js.map +0 -1
  188. package/dist/chunk-UOJWOHRM.js +0 -16
  189. package/dist/chunk-UOJWOHRM.js.map +0 -1
  190. package/dist/chunk-VD5NXQP7.js +0 -42
  191. package/dist/chunk-VD5NXQP7.js.map +0 -1
  192. package/dist/chunk-W2TKG2UL.js +0 -37
  193. package/dist/chunk-W2TKG2UL.js.map +0 -1
  194. package/dist/chunk-W6ROKCY5.js +0 -28
  195. package/dist/chunk-W6ROKCY5.js.map +0 -1
  196. package/dist/chunk-WYSY75U7.js +0 -156
  197. package/dist/chunk-WYSY75U7.js.map +0 -1
  198. package/dist/chunk-YNNDBMNR.js +0 -113
  199. package/dist/chunk-YNNDBMNR.js.map +0 -1
  200. package/dist/chunk-YNQNHCRS.js +0 -198
  201. package/dist/chunk-YNQNHCRS.js.map +0 -1
  202. package/dist/chunk-YQDQX4BT.js +0 -624
  203. package/dist/chunk-YQDQX4BT.js.map +0 -1
  204. package/dist/cli/commands/capabilities-explain.d.ts +0 -3
  205. package/dist/cli/commands/capabilities-explain.js +0 -10
  206. package/dist/cli/commands/capabilities-explain.js.map +0 -1
  207. package/dist/cli/commands/capabilities-list.d.ts +0 -3
  208. package/dist/cli/commands/capabilities-list.js +0 -10
  209. package/dist/cli/commands/capabilities-list.js.map +0 -1
  210. package/dist/cli/commands/doctor.d.ts +0 -3
  211. package/dist/cli/commands/doctor.js +0 -7
  212. package/dist/cli/commands/doctor.js.map +0 -1
  213. package/dist/cli/commands/routes.d.ts +0 -3
  214. package/dist/cli/commands/routes.js +0 -7
  215. package/dist/cli/commands/routes.js.map +0 -1
  216. package/dist/cli/commands/run.d.ts +0 -3
  217. package/dist/cli/commands/run.js +0 -31
  218. package/dist/cli/commands/run.js.map +0 -1
  219. package/dist/cli/commands/setup.d.ts +0 -3
  220. package/dist/cli/commands/setup.js +0 -7
  221. package/dist/cli/commands/setup.js.map +0 -1
  222. package/dist/cli/formatters/json.d.ts +0 -3
  223. package/dist/cli/formatters/json.js +0 -8
  224. package/dist/cli/formatters/json.js.map +0 -1
  225. package/dist/cli/formatters/table.d.ts +0 -3
  226. package/dist/cli/formatters/table.js +0 -8
  227. package/dist/cli/formatters/table.js.map +0 -1
  228. package/dist/core/contracts/envelope.js +0 -1
  229. package/dist/core/contracts/envelope.js.map +0 -1
  230. package/dist/core/contracts/task.d.ts +0 -7
  231. package/dist/core/contracts/task.js +0 -1
  232. package/dist/core/contracts/task.js.map +0 -1
  233. package/dist/core/contracts/tasks/check_run.annotations.list.d.ts +0 -5
  234. package/dist/core/contracts/tasks/check_run.annotations.list.js +0 -8
  235. package/dist/core/contracts/tasks/check_run.annotations.list.js.map +0 -1
  236. package/dist/core/contracts/tasks/issue.comments.list.d.ts +0 -5
  237. package/dist/core/contracts/tasks/issue.comments.list.js +0 -8
  238. package/dist/core/contracts/tasks/issue.comments.list.js.map +0 -1
  239. package/dist/core/contracts/tasks/issue.list.d.ts +0 -5
  240. package/dist/core/contracts/tasks/issue.list.js +0 -8
  241. package/dist/core/contracts/tasks/issue.list.js.map +0 -1
  242. package/dist/core/contracts/tasks/issue.view.d.ts +0 -5
  243. package/dist/core/contracts/tasks/issue.view.js +0 -8
  244. package/dist/core/contracts/tasks/issue.view.js.map +0 -1
  245. package/dist/core/contracts/tasks/pr.checks.get_failed.d.ts +0 -5
  246. package/dist/core/contracts/tasks/pr.checks.get_failed.js +0 -8
  247. package/dist/core/contracts/tasks/pr.checks.get_failed.js.map +0 -1
  248. package/dist/core/contracts/tasks/pr.comment.reply.d.ts +0 -5
  249. package/dist/core/contracts/tasks/pr.comment.reply.js +0 -8
  250. package/dist/core/contracts/tasks/pr.comment.reply.js.map +0 -1
  251. package/dist/core/contracts/tasks/pr.comment.resolve.d.ts +0 -5
  252. package/dist/core/contracts/tasks/pr.comment.resolve.js +0 -8
  253. package/dist/core/contracts/tasks/pr.comment.resolve.js.map +0 -1
  254. package/dist/core/contracts/tasks/pr.comment.unresolve.d.ts +0 -5
  255. package/dist/core/contracts/tasks/pr.comment.unresolve.js +0 -8
  256. package/dist/core/contracts/tasks/pr.comment.unresolve.js.map +0 -1
  257. package/dist/core/contracts/tasks/pr.comments.list.d.ts +0 -5
  258. package/dist/core/contracts/tasks/pr.comments.list.js +0 -8
  259. package/dist/core/contracts/tasks/pr.comments.list.js.map +0 -1
  260. package/dist/core/contracts/tasks/pr.diff.list_files.d.ts +0 -5
  261. package/dist/core/contracts/tasks/pr.diff.list_files.js +0 -8
  262. package/dist/core/contracts/tasks/pr.diff.list_files.js.map +0 -1
  263. package/dist/core/contracts/tasks/pr.list.d.ts +0 -5
  264. package/dist/core/contracts/tasks/pr.list.js +0 -8
  265. package/dist/core/contracts/tasks/pr.list.js.map +0 -1
  266. package/dist/core/contracts/tasks/pr.mergeability.view.d.ts +0 -5
  267. package/dist/core/contracts/tasks/pr.mergeability.view.js +0 -8
  268. package/dist/core/contracts/tasks/pr.mergeability.view.js.map +0 -1
  269. package/dist/core/contracts/tasks/pr.ready_for_review.set.d.ts +0 -5
  270. package/dist/core/contracts/tasks/pr.ready_for_review.set.js +0 -8
  271. package/dist/core/contracts/tasks/pr.ready_for_review.set.js.map +0 -1
  272. package/dist/core/contracts/tasks/pr.reviews.list.d.ts +0 -5
  273. package/dist/core/contracts/tasks/pr.reviews.list.js +0 -8
  274. package/dist/core/contracts/tasks/pr.reviews.list.js.map +0 -1
  275. package/dist/core/contracts/tasks/pr.status.checks.d.ts +0 -5
  276. package/dist/core/contracts/tasks/pr.status.checks.js +0 -8
  277. package/dist/core/contracts/tasks/pr.status.checks.js.map +0 -1
  278. package/dist/core/contracts/tasks/pr.view.d.ts +0 -5
  279. package/dist/core/contracts/tasks/pr.view.js +0 -8
  280. package/dist/core/contracts/tasks/pr.view.js.map +0 -1
  281. package/dist/core/contracts/tasks/repo.view.d.ts +0 -5
  282. package/dist/core/contracts/tasks/repo.view.js +0 -8
  283. package/dist/core/contracts/tasks/repo.view.js.map +0 -1
  284. package/dist/core/contracts/tasks/workflow_job.logs.analyze.d.ts +0 -5
  285. package/dist/core/contracts/tasks/workflow_job.logs.analyze.js +0 -8
  286. package/dist/core/contracts/tasks/workflow_job.logs.analyze.js.map +0 -1
  287. package/dist/core/contracts/tasks/workflow_job.logs.get.d.ts +0 -5
  288. package/dist/core/contracts/tasks/workflow_job.logs.get.js +0 -8
  289. package/dist/core/contracts/tasks/workflow_job.logs.get.js.map +0 -1
  290. package/dist/core/contracts/tasks/workflow_run.jobs.list.d.ts +0 -5
  291. package/dist/core/contracts/tasks/workflow_run.jobs.list.js +0 -8
  292. package/dist/core/contracts/tasks/workflow_run.jobs.list.js.map +0 -1
  293. package/dist/core/contracts/tasks/workflow_runs.list.d.ts +0 -5
  294. package/dist/core/contracts/tasks/workflow_runs.list.js +0 -8
  295. package/dist/core/contracts/tasks/workflow_runs.list.js.map +0 -1
  296. package/dist/core/errors/codes.d.ts +0 -13
  297. package/dist/core/errors/codes.js +0 -7
  298. package/dist/core/errors/codes.js.map +0 -1
  299. package/dist/core/errors/map-error.d.ts +0 -5
  300. package/dist/core/errors/map-error.js +0 -8
  301. package/dist/core/errors/map-error.js.map +0 -1
  302. package/dist/core/errors/retryability.d.ts +0 -3
  303. package/dist/core/errors/retryability.js +0 -8
  304. package/dist/core/errors/retryability.js.map +0 -1
  305. package/dist/core/execute/execute.d.ts +0 -28
  306. package/dist/core/execute/execute.js +0 -11
  307. package/dist/core/execute/execute.js.map +0 -1
  308. package/dist/core/execution/adapters/cli-adapter.d.ts +0 -22
  309. package/dist/core/execution/adapters/cli-adapter.js +0 -69
  310. package/dist/core/execution/adapters/cli-adapter.js.map +0 -1
  311. package/dist/core/execution/adapters/cli-capability-adapter.d.ts +0 -16
  312. package/dist/core/execution/adapters/cli-capability-adapter.js +0 -11
  313. package/dist/core/execution/adapters/cli-capability-adapter.js.map +0 -1
  314. package/dist/core/execution/adapters/graphql-adapter.d.ts +0 -25
  315. package/dist/core/execution/adapters/graphql-adapter.js +0 -44
  316. package/dist/core/execution/adapters/graphql-adapter.js.map +0 -1
  317. package/dist/core/execution/adapters/graphql-capability-adapter.d.ts +0 -20
  318. package/dist/core/execution/adapters/graphql-capability-adapter.js +0 -11
  319. package/dist/core/execution/adapters/graphql-capability-adapter.js.map +0 -1
  320. package/dist/core/execution/adapters/rest-adapter.d.ts +0 -3
  321. package/dist/core/execution/adapters/rest-adapter.js +0 -8
  322. package/dist/core/execution/adapters/rest-adapter.js.map +0 -1
  323. package/dist/core/execution/cli/safe-runner.d.ts +0 -12
  324. package/dist/core/execution/cli/safe-runner.js +0 -7
  325. package/dist/core/execution/cli/safe-runner.js.map +0 -1
  326. package/dist/core/execution/normalizer.d.ts +0 -13
  327. package/dist/core/execution/normalizer.js +0 -9
  328. package/dist/core/execution/normalizer.js.map +0 -1
  329. package/dist/core/execution/preflight.d.ts +0 -24
  330. package/dist/core/execution/preflight.js +0 -8
  331. package/dist/core/execution/preflight.js.map +0 -1
  332. package/dist/core/registry/index.d.ts +0 -15
  333. package/dist/core/registry/index.js +0 -12
  334. package/dist/core/registry/index.js.map +0 -1
  335. package/dist/core/registry/operation-card-schema.d.ts +0 -167
  336. package/dist/core/registry/operation-card-schema.js +0 -7
  337. package/dist/core/registry/operation-card-schema.js.map +0 -1
  338. package/dist/core/registry/schema-validator.d.ts +0 -16
  339. package/dist/core/registry/schema-validator.js +0 -9
  340. package/dist/core/registry/schema-validator.js.map +0 -1
  341. package/dist/core/registry/types.d.ts +0 -51
  342. package/dist/core/registry/types.js +0 -1
  343. package/dist/core/registry/types.js.map +0 -1
  344. package/dist/core/routing/capability-registry.d.ts +0 -8
  345. package/dist/core/routing/capability-registry.js +0 -15
  346. package/dist/core/routing/capability-registry.js.map +0 -1
  347. package/dist/core/routing/engine.d.ts +0 -32
  348. package/dist/core/routing/engine.js +0 -23
  349. package/dist/core/routing/engine.js.map +0 -1
  350. package/dist/core/routing/policy.d.ts +0 -3
  351. package/dist/core/routing/policy.js +0 -7
  352. package/dist/core/routing/policy.js.map +0 -1
  353. package/dist/core/routing/reason-codes.d.ts +0 -4
  354. package/dist/core/routing/reason-codes.js +0 -15
  355. package/dist/core/routing/reason-codes.js.map +0 -1
  356. package/dist/core/telemetry/logger.d.ts +0 -8
  357. package/dist/core/telemetry/logger.js +0 -9
  358. package/dist/core/telemetry/logger.js.map +0 -1
  359. package/dist/core/telemetry/metrics.d.ts +0 -7
  360. package/dist/core/telemetry/metrics.js +0 -1
  361. package/dist/core/telemetry/metrics.js.map +0 -1
  362. package/dist/gql/client.d.ts +0 -183
  363. package/dist/gql/client.js +0 -17
  364. package/dist/gql/client.js.map +0 -1
  365. package/dist/gql/generated/common-types.d.ts +0 -36
  366. package/dist/gql/generated/common-types.js +0 -1
  367. package/dist/gql/generated/common-types.js.map +0 -1
  368. package/dist/gql/operations/issue-comments-list.generated.d.ts +0 -59
  369. package/dist/gql/operations/issue-comments-list.generated.js +0 -9
  370. package/dist/gql/operations/issue-comments-list.generated.js.map +0 -1
  371. package/dist/gql/operations/issue-list.generated.d.ts +0 -40
  372. package/dist/gql/operations/issue-list.generated.js +0 -9
  373. package/dist/gql/operations/issue-list.generated.js.map +0 -1
  374. package/dist/gql/operations/issue-view.generated.d.ts +0 -31
  375. package/dist/gql/operations/issue-view.generated.js +0 -9
  376. package/dist/gql/operations/issue-view.generated.js.map +0 -1
  377. package/dist/gql/operations/pr-comment-reply.generated.d.ts +0 -26
  378. package/dist/gql/operations/pr-comment-reply.generated.js +0 -25
  379. package/dist/gql/operations/pr-comment-reply.generated.js.map +0 -1
  380. package/dist/gql/operations/pr-comment-resolve.generated.d.ts +0 -26
  381. package/dist/gql/operations/pr-comment-resolve.generated.js +0 -24
  382. package/dist/gql/operations/pr-comment-resolve.generated.js.map +0 -1
  383. package/dist/gql/operations/pr-comment-unresolve.generated.d.ts +0 -26
  384. package/dist/gql/operations/pr-comment-unresolve.generated.js +0 -24
  385. package/dist/gql/operations/pr-comment-unresolve.generated.js.map +0 -1
  386. package/dist/gql/operations/pr-comments-list.generated.d.ts +0 -84
  387. package/dist/gql/operations/pr-comments-list.generated.js +0 -58
  388. package/dist/gql/operations/pr-comments-list.generated.js.map +0 -1
  389. package/dist/gql/operations/pr-diff-list-files.generated.d.ts +0 -42
  390. package/dist/gql/operations/pr-diff-list-files.generated.js +0 -9
  391. package/dist/gql/operations/pr-diff-list-files.generated.js.map +0 -1
  392. package/dist/gql/operations/pr-list.generated.d.ts +0 -40
  393. package/dist/gql/operations/pr-list.generated.js +0 -9
  394. package/dist/gql/operations/pr-list.generated.js.map +0 -1
  395. package/dist/gql/operations/pr-reviews-list.generated.d.ts +0 -64
  396. package/dist/gql/operations/pr-reviews-list.generated.js +0 -9
  397. package/dist/gql/operations/pr-reviews-list.generated.js.map +0 -1
  398. package/dist/gql/operations/pr-view.generated.d.ts +0 -31
  399. package/dist/gql/operations/pr-view.generated.js +0 -9
  400. package/dist/gql/operations/pr-view.generated.js.map +0 -1
  401. package/dist/gql/operations/repo-view.generated.d.ts +0 -33
  402. package/dist/gql/operations/repo-view.generated.js +0 -9
  403. package/dist/gql/operations/repo-view.generated.js.map +0 -1
  404. package/dist/shared/constants.d.ts +0 -3
  405. package/dist/shared/constants.js +0 -6
  406. package/dist/shared/constants.js.map +0 -1
  407. package/dist/shared/types.d.ts +0 -3
  408. package/dist/shared/types.js +0 -1
  409. package/dist/shared/types.js.map +0 -1
  410. package/dist/shared/utils.d.ts +0 -3
  411. package/dist/shared/utils.js +0 -8
  412. package/dist/shared/utils.js.map +0 -1
@@ -1,5 +1,17 @@
1
- import { RouteReasonCode } from '../routing/reason-codes.js';
2
- import { ErrorCode } from '../errors/codes.js';
1
+ declare const errorCodes: {
2
+ readonly Auth: "AUTH";
3
+ readonly NotFound: "NOT_FOUND";
4
+ readonly Validation: "VALIDATION";
5
+ readonly RateLimit: "RATE_LIMIT";
6
+ readonly Network: "NETWORK";
7
+ readonly Server: "SERVER";
8
+ readonly AdapterUnsupported: "ADAPTER_UNSUPPORTED";
9
+ readonly Unknown: "UNKNOWN";
10
+ };
11
+ type ErrorCode = (typeof errorCodes)[keyof typeof errorCodes];
12
+
13
+ declare const routeReasonCodes: readonly ["INPUT_VALIDATION", "OUTPUT_VALIDATION", "CARD_PREFERRED", "CARD_FALLBACK", "PREFLIGHT_FAILED", "ENV_CONSTRAINT", "CAPABILITY_LIMIT", "DEFAULT_POLICY"];
14
+ type RouteReasonCode = (typeof routeReasonCodes)[number];
3
15
 
4
16
  type RouteSource = "cli" | "rest" | "graphql";
5
17
  interface ResultError {
@@ -40,4 +52,4 @@ interface ResultEnvelope<TData = unknown> {
40
52
  meta: ResultMeta;
41
53
  }
42
54
 
43
- export type { AttemptMeta, ResultEnvelope, ResultError, ResultMeta, RouteSource };
55
+ export type { AttemptMeta as A, ResultEnvelope as R, RouteSource as a, RouteReasonCode as b, ResultError as c, ResultMeta as d };
package/dist/index.d.ts CHANGED
@@ -1,22 +1,470 @@
1
- export { executeTask } from './core/routing/engine.js';
2
- export { TaskRequest } from './core/contracts/task.js';
3
- export { AttemptMeta, ResultEnvelope, ResultError, ResultMeta, RouteSource } from './core/contracts/envelope.js';
4
- export { RouteReasonCode } from './core/routing/reason-codes.js';
5
- export { GithubClient, GraphqlClient, GraphqlTransport, createGithubClient, createGraphqlClient } from './gql/client.js';
6
- export { getOperationCard, listOperationCards } from './core/registry/index.js';
7
- export { createSafeCliCommandRunner } from './core/execution/cli/safe-runner.js';
8
- export { CliCommandRunner } from './core/execution/adapters/cli-capability-adapter.js';
9
- import './core/routing/policy.js';
10
- import './core/errors/codes.js';
11
- import 'graphql';
12
- import './gql/operations/issue-comments-list.generated.js';
13
- import './gql/generated/common-types.js';
14
- import 'graphql-request';
15
- import './gql/operations/issue-list.generated.js';
16
- import './gql/operations/issue-view.generated.js';
17
- import './gql/operations/pr-diff-list-files.generated.js';
18
- import './gql/operations/pr-reviews-list.generated.js';
19
- import './gql/operations/pr-list.generated.js';
20
- import './gql/operations/pr-view.generated.js';
21
- import './gql/operations/repo-view.generated.js';
22
- import './core/registry/types.js';
1
+ import { a as RouteSource, b as RouteReasonCode, R as ResultEnvelope } from './envelope-BpF6MNCv.js';
2
+ export { A as AttemptMeta, c as ResultError, d as ResultMeta } from './envelope-BpF6MNCv.js';
3
+ import { DocumentNode } from 'graphql';
4
+
5
+ type TaskId = string;
6
+ interface TaskRequest<TInput = Record<string, unknown>> {
7
+ task: TaskId;
8
+ input: TInput;
9
+ }
10
+
11
+ type JsonSchema = Record<string, unknown>;
12
+ interface SuitabilityRule {
13
+ when: "always" | "env" | "params";
14
+ predicate: string;
15
+ reason: string;
16
+ }
17
+ interface OperationCard<Input = Record<string, unknown>> {
18
+ capability_id: string;
19
+ version: string;
20
+ description: string;
21
+ input_schema: JsonSchema;
22
+ output_schema: JsonSchema;
23
+ routing: {
24
+ preferred: RouteSource;
25
+ fallbacks: RouteSource[];
26
+ suitability?: SuitabilityRule[];
27
+ notes?: string[];
28
+ };
29
+ graphql?: {
30
+ operationName: string;
31
+ documentPath: string;
32
+ variables?: Record<string, string>;
33
+ limits?: {
34
+ maxPageSize?: number;
35
+ };
36
+ };
37
+ cli?: {
38
+ command: string;
39
+ jsonFields?: string[];
40
+ jq?: string;
41
+ limits?: {
42
+ maxItemsPerCall?: number;
43
+ };
44
+ };
45
+ rest?: {
46
+ endpoints: Array<{
47
+ method: string;
48
+ path: string;
49
+ }>;
50
+ };
51
+ examples?: Array<{
52
+ title: string;
53
+ input: Input;
54
+ }>;
55
+ }
56
+
57
+ type CliCommandRunner = {
58
+ run(command: string, args: string[], timeoutMs: number): Promise<{
59
+ stdout: string;
60
+ stderr: string;
61
+ exitCode: number;
62
+ }>;
63
+ };
64
+
65
+ type SafeRunnerOptions = {
66
+ maxOutputBytes?: number;
67
+ };
68
+ declare function createSafeCliCommandRunner(options?: SafeRunnerOptions): CliCommandRunner;
69
+
70
+ declare function listOperationCards(): OperationCard[];
71
+ declare function getOperationCard(capabilityId: string): OperationCard | undefined;
72
+
73
+ type Maybe<T> = T | null;
74
+ type InputMaybe<T> = Maybe<T>;
75
+ type Exact<T extends {
76
+ [key: string]: unknown;
77
+ }> = {
78
+ [K in keyof T]: T[K];
79
+ };
80
+ type Scalars = {
81
+ String: {
82
+ input: string;
83
+ output: string;
84
+ };
85
+ Int: {
86
+ input: number;
87
+ output: number;
88
+ };
89
+ Boolean: {
90
+ input: boolean;
91
+ output: boolean;
92
+ };
93
+ ID: {
94
+ input: string;
95
+ output: string;
96
+ };
97
+ URI: {
98
+ input: unknown;
99
+ output: unknown;
100
+ };
101
+ };
102
+
103
+ type IssueCommentsListQueryVariables = Exact<{
104
+ owner: Scalars["String"]["input"];
105
+ name: Scalars["String"]["input"];
106
+ issueNumber: Scalars["Int"]["input"];
107
+ first: Scalars["Int"]["input"];
108
+ after?: InputMaybe<Scalars["String"]["input"]>;
109
+ }>;
110
+
111
+ type IssueListQueryVariables = Exact<{
112
+ owner: Scalars["String"]["input"];
113
+ name: Scalars["String"]["input"];
114
+ first: Scalars["Int"]["input"];
115
+ after?: InputMaybe<Scalars["String"]["input"]>;
116
+ }>;
117
+
118
+ type IssueViewQueryVariables = Exact<{
119
+ owner: Scalars["String"]["input"];
120
+ name: Scalars["String"]["input"];
121
+ issueNumber: Scalars["Int"]["input"];
122
+ }>;
123
+
124
+ type PrDiffListFilesQueryVariables = Exact<{
125
+ owner: Scalars["String"]["input"];
126
+ name: Scalars["String"]["input"];
127
+ prNumber: Scalars["Int"]["input"];
128
+ first: Scalars["Int"]["input"];
129
+ after?: InputMaybe<Scalars["String"]["input"]>;
130
+ }>;
131
+
132
+ type PrListQueryVariables = Exact<{
133
+ owner: Scalars["String"]["input"];
134
+ name: Scalars["String"]["input"];
135
+ first: Scalars["Int"]["input"];
136
+ after?: InputMaybe<Scalars["String"]["input"]>;
137
+ }>;
138
+
139
+ type PrReviewsListQueryVariables = Exact<{
140
+ owner: Scalars["String"]["input"];
141
+ name: Scalars["String"]["input"];
142
+ prNumber: Scalars["Int"]["input"];
143
+ first: Scalars["Int"]["input"];
144
+ after?: InputMaybe<Scalars["String"]["input"]>;
145
+ }>;
146
+
147
+ type PrViewQueryVariables = Exact<{
148
+ owner: Scalars["String"]["input"];
149
+ name: Scalars["String"]["input"];
150
+ prNumber: Scalars["Int"]["input"];
151
+ }>;
152
+
153
+ type RepoViewQueryVariables = Exact<{
154
+ owner: Scalars["String"]["input"];
155
+ name: Scalars["String"]["input"];
156
+ }>;
157
+
158
+ type GraphqlVariables = Record<string, unknown>;
159
+ type GraphqlDocument = string | DocumentNode;
160
+ interface GraphqlTransport {
161
+ execute<TData>(query: string, variables?: GraphqlVariables): Promise<TData>;
162
+ }
163
+ interface GraphqlClient {
164
+ query<TData, TVariables extends GraphqlVariables = GraphqlVariables>(query: GraphqlDocument, variables?: TVariables): Promise<TData>;
165
+ }
166
+ type RepoViewInput = RepoViewQueryVariables;
167
+ type IssueCommentsListInput = IssueCommentsListQueryVariables;
168
+ type IssueListInput = IssueListQueryVariables;
169
+ type IssueViewInput = IssueViewQueryVariables;
170
+ type PrListInput = PrListQueryVariables;
171
+ type PrViewInput = PrViewQueryVariables;
172
+ type PrReviewsListInput = PrReviewsListQueryVariables;
173
+ type PrDiffListFilesInput = PrDiffListFilesQueryVariables;
174
+ type PrCommentsListInput = {
175
+ owner: string;
176
+ name: string;
177
+ prNumber: number;
178
+ first: number;
179
+ after?: string | null;
180
+ unresolvedOnly?: boolean;
181
+ includeOutdated?: boolean;
182
+ };
183
+ type IssueCreateInput = {
184
+ owner: string;
185
+ name: string;
186
+ title: string;
187
+ body?: string;
188
+ };
189
+ type IssueUpdateInput = {
190
+ issueId: string;
191
+ title?: string;
192
+ body?: string;
193
+ };
194
+ type IssueMutationInput = {
195
+ issueId: string;
196
+ };
197
+ type IssueLabelsUpdateInput = {
198
+ issueId: string;
199
+ labels: string[];
200
+ };
201
+ type IssueAssigneesUpdateInput = {
202
+ issueId: string;
203
+ assignees: string[];
204
+ };
205
+ type IssueMilestoneSetInput = {
206
+ issueId: string;
207
+ milestoneNumber: number | null;
208
+ };
209
+ type IssueCommentCreateInput = {
210
+ issueId: string;
211
+ body: string;
212
+ };
213
+ type IssueLinkedPrsListInput = {
214
+ owner: string;
215
+ name: string;
216
+ issueNumber: number;
217
+ };
218
+ type IssueRelationsGetInput = IssueLinkedPrsListInput;
219
+ type IssueParentSetInput = {
220
+ issueId: string;
221
+ parentIssueId: string;
222
+ };
223
+ type IssueParentRemoveInput = {
224
+ issueId: string;
225
+ };
226
+ type IssueBlockedByInput = {
227
+ issueId: string;
228
+ blockedByIssueId: string;
229
+ };
230
+ type RepoViewData = {
231
+ id: string;
232
+ name: string;
233
+ nameWithOwner: string;
234
+ isPrivate: boolean;
235
+ stargazerCount: number;
236
+ forkCount: number;
237
+ url: string;
238
+ defaultBranch: string | null;
239
+ };
240
+ type IssueViewData = {
241
+ id: string;
242
+ number: number;
243
+ title: string;
244
+ state: string;
245
+ url: string;
246
+ };
247
+ type IssueListData = {
248
+ items: Array<IssueViewData>;
249
+ pageInfo: {
250
+ endCursor: string | null;
251
+ hasNextPage: boolean;
252
+ };
253
+ };
254
+ type IssueCommentData = {
255
+ id: string;
256
+ body: string;
257
+ authorLogin: string | null;
258
+ createdAt: string;
259
+ url: string;
260
+ };
261
+ type IssueCommentsListData = {
262
+ items: Array<IssueCommentData>;
263
+ pageInfo: {
264
+ endCursor: string | null;
265
+ hasNextPage: boolean;
266
+ };
267
+ };
268
+ type IssueMutationData = {
269
+ id: string;
270
+ number: number;
271
+ title?: string;
272
+ state?: string;
273
+ url?: string;
274
+ closed?: boolean;
275
+ reopened?: boolean;
276
+ deleted?: boolean;
277
+ };
278
+ type IssueLabelsUpdateData = {
279
+ id: string;
280
+ labels: string[];
281
+ };
282
+ type IssueAssigneesUpdateData = {
283
+ id: string;
284
+ assignees: string[];
285
+ };
286
+ type IssueMilestoneSetData = {
287
+ id: string;
288
+ milestoneNumber: number | null;
289
+ };
290
+ type IssueCommentCreateData = {
291
+ id: string;
292
+ body: string;
293
+ url: string;
294
+ };
295
+ type IssueLinkedPrData = {
296
+ id: string;
297
+ number: number;
298
+ title: string;
299
+ state: string;
300
+ url: string;
301
+ };
302
+ type IssueLinkedPrsListData = {
303
+ items: Array<IssueLinkedPrData>;
304
+ };
305
+ type IssueRelationNodeData = {
306
+ id: string;
307
+ number: number;
308
+ };
309
+ type IssueRelationsGetData = {
310
+ issue: IssueRelationNodeData;
311
+ parent: IssueRelationNodeData | null;
312
+ children: Array<IssueRelationNodeData>;
313
+ blockedBy: Array<IssueRelationNodeData>;
314
+ };
315
+ type IssueParentSetData = {
316
+ issueId: string;
317
+ parentIssueId: string;
318
+ };
319
+ type IssueParentRemoveData = {
320
+ issueId: string;
321
+ parentRemoved: boolean;
322
+ };
323
+ type IssueBlockedByData = {
324
+ issueId: string;
325
+ blockedByIssueId: string;
326
+ removed?: boolean;
327
+ };
328
+ type PrViewData = {
329
+ id: string;
330
+ number: number;
331
+ title: string;
332
+ state: string;
333
+ url: string;
334
+ };
335
+ type PrListData = {
336
+ items: Array<PrViewData>;
337
+ pageInfo: {
338
+ endCursor: string | null;
339
+ hasNextPage: boolean;
340
+ };
341
+ };
342
+ type PrReviewThreadCommentData = {
343
+ id: string;
344
+ authorLogin: string | null;
345
+ body: string;
346
+ createdAt: string;
347
+ url: string;
348
+ };
349
+ type PrReviewThreadData = {
350
+ id: string;
351
+ path: string | null;
352
+ line: number | null;
353
+ startLine: number | null;
354
+ diffSide: string | null;
355
+ subjectType: string | null;
356
+ isResolved: boolean;
357
+ isOutdated: boolean;
358
+ viewerCanReply: boolean;
359
+ viewerCanResolve: boolean;
360
+ viewerCanUnresolve: boolean;
361
+ resolvedByLogin: string | null;
362
+ comments: Array<PrReviewThreadCommentData>;
363
+ };
364
+ type PrCommentsListData = {
365
+ items: Array<PrReviewThreadData>;
366
+ pageInfo: {
367
+ endCursor: string | null;
368
+ hasNextPage: boolean;
369
+ };
370
+ filterApplied: {
371
+ unresolvedOnly: boolean;
372
+ includeOutdated: boolean;
373
+ };
374
+ scan: {
375
+ pagesScanned: number;
376
+ sourceItemsScanned: number;
377
+ scanTruncated: boolean;
378
+ };
379
+ };
380
+ type PrReviewData = {
381
+ id: string;
382
+ authorLogin: string | null;
383
+ body: string;
384
+ state: string;
385
+ submittedAt: string | null;
386
+ url: string;
387
+ commitOid: string | null;
388
+ };
389
+ type PrReviewsListData = {
390
+ items: Array<PrReviewData>;
391
+ pageInfo: {
392
+ endCursor: string | null;
393
+ hasNextPage: boolean;
394
+ };
395
+ };
396
+ type PrDiffFileData = {
397
+ path: string;
398
+ additions: number;
399
+ deletions: number;
400
+ };
401
+ type PrDiffListFilesData = {
402
+ items: Array<PrDiffFileData>;
403
+ pageInfo: {
404
+ endCursor: string | null;
405
+ hasNextPage: boolean;
406
+ };
407
+ };
408
+ type ReviewThreadMutationInput = {
409
+ threadId: string;
410
+ };
411
+ type ReplyToReviewThreadInput = ReviewThreadMutationInput & {
412
+ body: string;
413
+ };
414
+ type ReviewThreadMutationData = {
415
+ id: string;
416
+ isResolved: boolean;
417
+ };
418
+ interface GithubClient extends GraphqlClient {
419
+ fetchRepoView(input: RepoViewInput): Promise<RepoViewData>;
420
+ fetchIssueCommentsList(input: IssueCommentsListInput): Promise<IssueCommentsListData>;
421
+ createIssue(input: IssueCreateInput): Promise<IssueMutationData>;
422
+ updateIssue(input: IssueUpdateInput): Promise<IssueMutationData>;
423
+ closeIssue(input: IssueMutationInput): Promise<IssueMutationData>;
424
+ reopenIssue(input: IssueMutationInput): Promise<IssueMutationData>;
425
+ deleteIssue(input: IssueMutationInput): Promise<IssueMutationData>;
426
+ updateIssueLabels(input: IssueLabelsUpdateInput): Promise<IssueLabelsUpdateData>;
427
+ updateIssueAssignees(input: IssueAssigneesUpdateInput): Promise<IssueAssigneesUpdateData>;
428
+ setIssueMilestone(input: IssueMilestoneSetInput): Promise<IssueMilestoneSetData>;
429
+ createIssueComment(input: IssueCommentCreateInput): Promise<IssueCommentCreateData>;
430
+ fetchIssueLinkedPrs(input: IssueLinkedPrsListInput): Promise<IssueLinkedPrsListData>;
431
+ fetchIssueRelations(input: IssueRelationsGetInput): Promise<IssueRelationsGetData>;
432
+ setIssueParent(input: IssueParentSetInput): Promise<IssueParentSetData>;
433
+ removeIssueParent(input: IssueParentRemoveInput): Promise<IssueParentRemoveData>;
434
+ addIssueBlockedBy(input: IssueBlockedByInput): Promise<IssueBlockedByData>;
435
+ removeIssueBlockedBy(input: IssueBlockedByInput): Promise<IssueBlockedByData>;
436
+ fetchIssueList(input: IssueListInput): Promise<IssueListData>;
437
+ fetchIssueView(input: IssueViewInput): Promise<IssueViewData>;
438
+ fetchPrList(input: PrListInput): Promise<PrListData>;
439
+ fetchPrView(input: PrViewInput): Promise<PrViewData>;
440
+ fetchPrCommentsList(input: PrCommentsListInput): Promise<PrCommentsListData>;
441
+ fetchPrReviewsList(input: PrReviewsListInput): Promise<PrReviewsListData>;
442
+ fetchPrDiffListFiles(input: PrDiffListFilesInput): Promise<PrDiffListFilesData>;
443
+ replyToReviewThread(input: ReplyToReviewThreadInput): Promise<ReviewThreadMutationData>;
444
+ resolveReviewThread(input: ReviewThreadMutationInput): Promise<ReviewThreadMutationData>;
445
+ unresolveReviewThread(input: ReviewThreadMutationInput): Promise<ReviewThreadMutationData>;
446
+ }
447
+ declare function createGraphqlClient(transport: GraphqlTransport): GraphqlClient;
448
+ type TokenClientOptions = {
449
+ token: string;
450
+ graphqlUrl?: string;
451
+ };
452
+ /**
453
+ * Create a GithubClient from a token string or options object.
454
+ * Reads GITHUB_GRAPHQL_URL and GH_HOST from env for enterprise support.
455
+ */
456
+ declare function createGithubClientFromToken(tokenOrOptions: string | TokenClientOptions): GithubClient;
457
+ declare function createGithubClient(transport: GraphqlTransport): GithubClient;
458
+
459
+ type ExecutionDeps = {
460
+ githubClient: Pick<GithubClient, "fetchRepoView" | "fetchIssueCommentsList" | "fetchIssueList" | "fetchIssueView" | "fetchPrList" | "fetchPrView" | "fetchPrCommentsList" | "fetchPrReviewsList" | "fetchPrDiffListFiles" | "replyToReviewThread" | "resolveReviewThread" | "unresolveReviewThread">;
461
+ githubToken?: string | null;
462
+ cliRunner?: CliCommandRunner;
463
+ ghCliAvailable?: boolean;
464
+ ghAuthenticated?: boolean;
465
+ skipGhPreflight?: boolean;
466
+ reason?: RouteReasonCode;
467
+ };
468
+ declare function executeTask(request: TaskRequest, deps: ExecutionDeps): Promise<ResultEnvelope>;
469
+
470
+ export { type CliCommandRunner, type GithubClient, type GraphqlClient, type GraphqlTransport, ResultEnvelope, RouteReasonCode, RouteSource, type TaskRequest, type TokenClientOptions, createGithubClient, createGithubClientFromToken, createGraphqlClient, createSafeCliCommandRunner, executeTask, getOperationCard, listOperationCards };
package/dist/index.js CHANGED
@@ -1,39 +1,17 @@
1
1
  import {
2
+ createGithubClient,
3
+ createGithubClientFromToken,
4
+ createGraphqlClient,
5
+ createSafeCliCommandRunner,
2
6
  executeTask
3
- } from "./chunk-WYSY75U7.js";
4
- import {
5
- createSafeCliCommandRunner
6
- } from "./chunk-DLKIQBK6.js";
7
- import "./chunk-3RAT5BCB.js";
8
- import "./chunk-YNNDBMNR.js";
9
- import "./chunk-UGWIZ3RI.js";
10
- import "./chunk-TDTKOJKN.js";
11
- import "./chunk-Q4RTT3DV.js";
12
- import "./chunk-W2TKG2UL.js";
13
- import "./chunk-QEAMC4IJ.js";
14
- import "./chunk-5JRLVOF2.js";
15
- import "./chunk-B6RLMKS4.js";
16
- import "./chunk-573MDG3I.js";
17
- import "./chunk-UOJWOHRM.js";
7
+ } from "./chunk-PJ2JKKQE.js";
18
8
  import {
19
9
  getOperationCard,
20
10
  listOperationCards
21
- } from "./chunk-MT4U5DYD.js";
22
- import "./chunk-2W4L5YCC.js";
23
- import {
24
- createGithubClient,
25
- createGraphqlClient
26
- } from "./chunk-YQDQX4BT.js";
27
- import "./chunk-NFF5VF4U.js";
28
- import "./chunk-EBRDO4Y6.js";
29
- import "./chunk-W6ROKCY5.js";
30
- import "./chunk-RUQXGZ35.js";
31
- import "./chunk-TCLMLVUQ.js";
32
- import "./chunk-VD5NXQP7.js";
33
- import "./chunk-QZZC53HF.js";
34
- import "./chunk-D746VR3B.js";
11
+ } from "./chunk-OL4ARD3R.js";
35
12
  export {
36
13
  createGithubClient,
14
+ createGithubClientFromToken,
37
15
  createGraphqlClient,
38
16
  createSafeCliCommandRunner,
39
17
  executeTask,
package/package.json CHANGED
@@ -1,8 +1,31 @@
1
1
  {
2
2
  "name": "@ghx-dev/core",
3
- "version": "0.1.0-beta.0",
3
+ "version": "0.1.1",
4
+ "description": "GitHub execution router for AI agents with deterministic routing and normalized output.",
4
5
  "author": "Arye Kogan",
5
6
  "license": "MIT",
7
+ "keywords": [
8
+ "github",
9
+ "github-api",
10
+ "ai-agents",
11
+ "agentic",
12
+ "cli",
13
+ "graphql",
14
+ "automation",
15
+ "typescript"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/aryeko/ghx.git",
20
+ "directory": "packages/core"
21
+ },
22
+ "bugs": {
23
+ "url": "https://github.com/aryeko/ghx/issues"
24
+ },
25
+ "homepage": "https://github.com/aryeko/ghx/tree/main/packages/core#readme",
26
+ "engines": {
27
+ "node": ">=22"
28
+ },
6
29
  "type": "module",
7
30
  "main": "./dist/index.js",
8
31
  "types": "./dist/index.d.ts",
@@ -31,49 +54,55 @@
31
54
  "access": "public",
32
55
  "provenance": true
33
56
  },
34
- "scripts": {
35
- "build": "tsup \"src/**/*.ts\" --format esm --out-dir dist --clean --dts --sourcemap && node scripts/copy-registry-cards.mjs",
36
- "prepack": "pnpm run build",
37
- "lint": "eslint . --max-warnings=0",
38
- "test": "vitest run",
39
- "test:coverage": "vitest run --coverage --coverage.reporter=text --coverage.reporter=text-summary --coverage.reporter=lcov",
40
- "typecheck": "tsc --noEmit",
41
- "gql:codegen": "tsx scripts/run-gql-codegen.ts",
42
- "gql:codegen:watch": "graphql-codegen --config codegen.ts --watch",
43
- "gql:check": "pnpm run gql:codegen && git diff --exit-code -- src/gql/generated src/gql/operations/*.generated.ts"
44
- },
45
57
  "nx": {
46
58
  "targets": {
47
59
  "ci": {
48
60
  "dependsOn": [
49
61
  "lint",
50
62
  "typecheck",
51
- "test",
63
+ "test:coverage",
52
64
  "build",
53
65
  "gql:check"
54
66
  ]
55
- }
67
+ },
68
+ "test:e2e": {}
56
69
  }
57
70
  },
58
71
  "dependencies": {
59
- "ajv": "^8.17.1",
72
+ "ajv": "^8.18.0",
60
73
  "graphql": "^16.11.0",
61
74
  "graphql-tag": "^2.12.6",
62
75
  "graphql-request": "^7.3.1",
63
76
  "js-yaml": "^4.1.0"
64
77
  },
65
78
  "devDependencies": {
79
+ "@opencode-ai/sdk": "^1.2.6",
66
80
  "@vitest/coverage-v8": "^2.1.8",
67
- "@graphql-codegen/cli": "^5.0.7",
68
- "@graphql-codegen/near-operation-file-preset": "^3.1.0",
69
- "@graphql-codegen/typescript": "^4.1.6",
81
+ "@graphql-codegen/cli": "^6.1.1",
82
+ "@graphql-codegen/near-operation-file-preset": "^4.0.0",
83
+ "@graphql-codegen/typescript": "^5.0.7",
70
84
  "@graphql-codegen/typescript-graphql-request": "^6.3.0",
71
- "@graphql-codegen/typescript-operations": "^4.6.1",
85
+ "@graphql-codegen/typescript-operations": "^5.0.7",
72
86
  "@types/js-yaml": "^4.0.9",
73
87
  "@types/node": "^25.2.3",
74
88
  "tsup": "^8.5.0",
75
89
  "tsx": "^4.21.0",
76
90
  "typescript": "^5.9.3",
77
91
  "vitest": "^2.1.8"
92
+ },
93
+ "scripts": {
94
+ "build": "tsup && node scripts/copy-registry-cards.mjs",
95
+ "format": "biome check --write .",
96
+ "format:check": "biome check .",
97
+ "lint": "eslint . --max-warnings=0",
98
+ "typecheck": "tsc --noEmit",
99
+ "test": "vitest run --project unit",
100
+ "test:watch": "vitest watch --project unit",
101
+ "test:coverage": "vitest run --project unit --coverage",
102
+ "test:e2e:local": "vitest run --project e2e:local",
103
+ "test:e2e:sdk": "if [ -n \"$OPENAI_API_KEY\" ]; then vitest run --project e2e:sdk; else echo 'Skipping core SDK E2E: OPENAI_API_KEY not set'; fi",
104
+ "gql:codegen": "tsx scripts/run-gql-codegen.ts",
105
+ "gql:codegen:watch": "graphql-codegen --config codegen.ts --watch",
106
+ "gql:check": "pnpm run gql:codegen && biome check --write --no-errors-on-unmatched src/gql/generated src/gql/operations && git diff --exit-code -- src/gql/generated src/gql/operations/*.generated.ts"
78
107
  }
79
- }
108
+ }
@@ -1,3 +0,0 @@
1
- declare const MAIN_SKILL_TEXT: string;
2
-
3
- export { MAIN_SKILL_TEXT };
@@ -1,7 +0,0 @@
1
- import {
2
- MAIN_SKILL_TEXT
3
- } from "../../chunk-FXN6IIT5.js";
4
- export {
5
- MAIN_SKILL_TEXT
6
- };
7
- //# sourceMappingURL=main-skill.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}