@ghx-dev/core 0.1.0-beta.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 (319) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +212 -0
  3. package/dist/agent-interface/prompt/main-skill.d.ts +3 -0
  4. package/dist/agent-interface/prompt/main-skill.js +7 -0
  5. package/dist/agent-interface/prompt/main-skill.js.map +1 -0
  6. package/dist/agent-interface/tools/execute-tool.d.ts +16 -0
  7. package/dist/agent-interface/tools/execute-tool.js +7 -0
  8. package/dist/agent-interface/tools/execute-tool.js.map +1 -0
  9. package/dist/agent-interface/tools/explain-tool.d.ts +11 -0
  10. package/dist/agent-interface/tools/explain-tool.js +9 -0
  11. package/dist/agent-interface/tools/explain-tool.js.map +1 -0
  12. package/dist/agent-interface/tools/list-capabilities-tool.d.ts +7 -0
  13. package/dist/agent-interface/tools/list-capabilities-tool.js +9 -0
  14. package/dist/agent-interface/tools/list-capabilities-tool.js.map +1 -0
  15. package/dist/agent.d.ts +7 -0
  16. package/dist/agent.js +21 -0
  17. package/dist/agent.js.map +1 -0
  18. package/dist/chunk-2W4L5YCC.js +116 -0
  19. package/dist/chunk-2W4L5YCC.js.map +1 -0
  20. package/dist/chunk-3RAT5BCB.js +584 -0
  21. package/dist/chunk-3RAT5BCB.js.map +1 -0
  22. package/dist/chunk-3RJCF42N.js +16 -0
  23. package/dist/chunk-3RJCF42N.js.map +1 -0
  24. package/dist/chunk-573MDG3I.js +18 -0
  25. package/dist/chunk-573MDG3I.js.map +1 -0
  26. package/dist/chunk-5JRLVOF2.js +50 -0
  27. package/dist/chunk-5JRLVOF2.js.map +1 -0
  28. package/dist/chunk-B6RLMKS4.js +41 -0
  29. package/dist/chunk-B6RLMKS4.js.map +1 -0
  30. package/dist/chunk-BJHVAFTN.js +42 -0
  31. package/dist/chunk-BJHVAFTN.js.map +1 -0
  32. package/dist/chunk-D746VR3B.js +38 -0
  33. package/dist/chunk-D746VR3B.js.map +1 -0
  34. package/dist/chunk-DJIEG6K7.js +20 -0
  35. package/dist/chunk-DJIEG6K7.js.map +1 -0
  36. package/dist/chunk-DLKIQBK6.js +106 -0
  37. package/dist/chunk-DLKIQBK6.js.map +1 -0
  38. package/dist/chunk-EBRDO4Y6.js +31 -0
  39. package/dist/chunk-EBRDO4Y6.js.map +1 -0
  40. package/dist/chunk-FXN6IIT5.js +14 -0
  41. package/dist/chunk-FXN6IIT5.js.map +1 -0
  42. package/dist/chunk-GPU4P7UG.js +92 -0
  43. package/dist/chunk-GPU4P7UG.js.map +1 -0
  44. package/dist/chunk-MMG6CIKK.js +44 -0
  45. package/dist/chunk-MMG6CIKK.js.map +1 -0
  46. package/dist/chunk-MT4U5DYD.js +88 -0
  47. package/dist/chunk-MT4U5DYD.js.map +1 -0
  48. package/dist/chunk-NFF5VF4U.js +28 -0
  49. package/dist/chunk-NFF5VF4U.js.map +1 -0
  50. package/dist/chunk-Q4RTT3DV.js +209 -0
  51. package/dist/chunk-Q4RTT3DV.js.map +1 -0
  52. package/dist/chunk-QEAMC4IJ.js +34 -0
  53. package/dist/chunk-QEAMC4IJ.js.map +1 -0
  54. package/dist/chunk-QX34GTH6.js +30 -0
  55. package/dist/chunk-QX34GTH6.js.map +1 -0
  56. package/dist/chunk-QZZC53HF.js +38 -0
  57. package/dist/chunk-QZZC53HF.js.map +1 -0
  58. package/dist/chunk-RUQXGZ35.js +34 -0
  59. package/dist/chunk-RUQXGZ35.js.map +1 -0
  60. package/dist/chunk-TCLMLVUQ.js +38 -0
  61. package/dist/chunk-TCLMLVUQ.js.map +1 -0
  62. package/dist/chunk-TDTKOJKN.js +52 -0
  63. package/dist/chunk-TDTKOJKN.js.map +1 -0
  64. package/dist/chunk-UGWIZ3RI.js +7 -0
  65. package/dist/chunk-UGWIZ3RI.js.map +1 -0
  66. package/dist/chunk-UOJWOHRM.js +16 -0
  67. package/dist/chunk-UOJWOHRM.js.map +1 -0
  68. package/dist/chunk-VD5NXQP7.js +42 -0
  69. package/dist/chunk-VD5NXQP7.js.map +1 -0
  70. package/dist/chunk-W2TKG2UL.js +37 -0
  71. package/dist/chunk-W2TKG2UL.js.map +1 -0
  72. package/dist/chunk-W6ROKCY5.js +28 -0
  73. package/dist/chunk-W6ROKCY5.js.map +1 -0
  74. package/dist/chunk-WYSY75U7.js +156 -0
  75. package/dist/chunk-WYSY75U7.js.map +1 -0
  76. package/dist/chunk-YNNDBMNR.js +113 -0
  77. package/dist/chunk-YNNDBMNR.js.map +1 -0
  78. package/dist/chunk-YNQNHCRS.js +198 -0
  79. package/dist/chunk-YNQNHCRS.js.map +1 -0
  80. package/dist/chunk-YQDQX4BT.js +624 -0
  81. package/dist/chunk-YQDQX4BT.js.map +1 -0
  82. package/dist/cli/commands/capabilities-explain.d.ts +3 -0
  83. package/dist/cli/commands/capabilities-explain.js +10 -0
  84. package/dist/cli/commands/capabilities-explain.js.map +1 -0
  85. package/dist/cli/commands/capabilities-list.d.ts +3 -0
  86. package/dist/cli/commands/capabilities-list.js +10 -0
  87. package/dist/cli/commands/capabilities-list.js.map +1 -0
  88. package/dist/cli/commands/doctor.d.ts +3 -0
  89. package/dist/cli/commands/doctor.js +7 -0
  90. package/dist/cli/commands/doctor.js.map +1 -0
  91. package/dist/cli/commands/routes.d.ts +3 -0
  92. package/dist/cli/commands/routes.js +7 -0
  93. package/dist/cli/commands/routes.js.map +1 -0
  94. package/dist/cli/commands/run.d.ts +3 -0
  95. package/dist/cli/commands/run.js +31 -0
  96. package/dist/cli/commands/run.js.map +1 -0
  97. package/dist/cli/commands/setup.d.ts +3 -0
  98. package/dist/cli/commands/setup.js +7 -0
  99. package/dist/cli/commands/setup.js.map +1 -0
  100. package/dist/cli/formatters/json.d.ts +3 -0
  101. package/dist/cli/formatters/json.js +8 -0
  102. package/dist/cli/formatters/json.js.map +1 -0
  103. package/dist/cli/formatters/table.d.ts +3 -0
  104. package/dist/cli/formatters/table.js +8 -0
  105. package/dist/cli/formatters/table.js.map +1 -0
  106. package/dist/cli/index.d.ts +4 -0
  107. package/dist/cli/index.js +118 -0
  108. package/dist/cli/index.js.map +1 -0
  109. package/dist/core/contracts/envelope.d.ts +43 -0
  110. package/dist/core/contracts/envelope.js +1 -0
  111. package/dist/core/contracts/envelope.js.map +1 -0
  112. package/dist/core/contracts/task.d.ts +7 -0
  113. package/dist/core/contracts/task.js +1 -0
  114. package/dist/core/contracts/task.js.map +1 -0
  115. package/dist/core/contracts/tasks/check_run.annotations.list.d.ts +5 -0
  116. package/dist/core/contracts/tasks/check_run.annotations.list.js +8 -0
  117. package/dist/core/contracts/tasks/check_run.annotations.list.js.map +1 -0
  118. package/dist/core/contracts/tasks/issue.comments.list.d.ts +5 -0
  119. package/dist/core/contracts/tasks/issue.comments.list.js +8 -0
  120. package/dist/core/contracts/tasks/issue.comments.list.js.map +1 -0
  121. package/dist/core/contracts/tasks/issue.list.d.ts +5 -0
  122. package/dist/core/contracts/tasks/issue.list.js +8 -0
  123. package/dist/core/contracts/tasks/issue.list.js.map +1 -0
  124. package/dist/core/contracts/tasks/issue.view.d.ts +5 -0
  125. package/dist/core/contracts/tasks/issue.view.js +8 -0
  126. package/dist/core/contracts/tasks/issue.view.js.map +1 -0
  127. package/dist/core/contracts/tasks/pr.checks.get_failed.d.ts +5 -0
  128. package/dist/core/contracts/tasks/pr.checks.get_failed.js +8 -0
  129. package/dist/core/contracts/tasks/pr.checks.get_failed.js.map +1 -0
  130. package/dist/core/contracts/tasks/pr.comment.reply.d.ts +5 -0
  131. package/dist/core/contracts/tasks/pr.comment.reply.js +8 -0
  132. package/dist/core/contracts/tasks/pr.comment.reply.js.map +1 -0
  133. package/dist/core/contracts/tasks/pr.comment.resolve.d.ts +5 -0
  134. package/dist/core/contracts/tasks/pr.comment.resolve.js +8 -0
  135. package/dist/core/contracts/tasks/pr.comment.resolve.js.map +1 -0
  136. package/dist/core/contracts/tasks/pr.comment.unresolve.d.ts +5 -0
  137. package/dist/core/contracts/tasks/pr.comment.unresolve.js +8 -0
  138. package/dist/core/contracts/tasks/pr.comment.unresolve.js.map +1 -0
  139. package/dist/core/contracts/tasks/pr.comments.list.d.ts +5 -0
  140. package/dist/core/contracts/tasks/pr.comments.list.js +8 -0
  141. package/dist/core/contracts/tasks/pr.comments.list.js.map +1 -0
  142. package/dist/core/contracts/tasks/pr.diff.list_files.d.ts +5 -0
  143. package/dist/core/contracts/tasks/pr.diff.list_files.js +8 -0
  144. package/dist/core/contracts/tasks/pr.diff.list_files.js.map +1 -0
  145. package/dist/core/contracts/tasks/pr.list.d.ts +5 -0
  146. package/dist/core/contracts/tasks/pr.list.js +8 -0
  147. package/dist/core/contracts/tasks/pr.list.js.map +1 -0
  148. package/dist/core/contracts/tasks/pr.mergeability.view.d.ts +5 -0
  149. package/dist/core/contracts/tasks/pr.mergeability.view.js +8 -0
  150. package/dist/core/contracts/tasks/pr.mergeability.view.js.map +1 -0
  151. package/dist/core/contracts/tasks/pr.ready_for_review.set.d.ts +5 -0
  152. package/dist/core/contracts/tasks/pr.ready_for_review.set.js +8 -0
  153. package/dist/core/contracts/tasks/pr.ready_for_review.set.js.map +1 -0
  154. package/dist/core/contracts/tasks/pr.reviews.list.d.ts +5 -0
  155. package/dist/core/contracts/tasks/pr.reviews.list.js +8 -0
  156. package/dist/core/contracts/tasks/pr.reviews.list.js.map +1 -0
  157. package/dist/core/contracts/tasks/pr.status.checks.d.ts +5 -0
  158. package/dist/core/contracts/tasks/pr.status.checks.js +8 -0
  159. package/dist/core/contracts/tasks/pr.status.checks.js.map +1 -0
  160. package/dist/core/contracts/tasks/pr.view.d.ts +5 -0
  161. package/dist/core/contracts/tasks/pr.view.js +8 -0
  162. package/dist/core/contracts/tasks/pr.view.js.map +1 -0
  163. package/dist/core/contracts/tasks/repo.view.d.ts +5 -0
  164. package/dist/core/contracts/tasks/repo.view.js +8 -0
  165. package/dist/core/contracts/tasks/repo.view.js.map +1 -0
  166. package/dist/core/contracts/tasks/workflow_job.logs.analyze.d.ts +5 -0
  167. package/dist/core/contracts/tasks/workflow_job.logs.analyze.js +8 -0
  168. package/dist/core/contracts/tasks/workflow_job.logs.analyze.js.map +1 -0
  169. package/dist/core/contracts/tasks/workflow_job.logs.get.d.ts +5 -0
  170. package/dist/core/contracts/tasks/workflow_job.logs.get.js +8 -0
  171. package/dist/core/contracts/tasks/workflow_job.logs.get.js.map +1 -0
  172. package/dist/core/contracts/tasks/workflow_run.jobs.list.d.ts +5 -0
  173. package/dist/core/contracts/tasks/workflow_run.jobs.list.js +8 -0
  174. package/dist/core/contracts/tasks/workflow_run.jobs.list.js.map +1 -0
  175. package/dist/core/contracts/tasks/workflow_runs.list.d.ts +5 -0
  176. package/dist/core/contracts/tasks/workflow_runs.list.js +8 -0
  177. package/dist/core/contracts/tasks/workflow_runs.list.js.map +1 -0
  178. package/dist/core/errors/codes.d.ts +13 -0
  179. package/dist/core/errors/codes.js +7 -0
  180. package/dist/core/errors/codes.js.map +1 -0
  181. package/dist/core/errors/map-error.d.ts +5 -0
  182. package/dist/core/errors/map-error.js +8 -0
  183. package/dist/core/errors/map-error.js.map +1 -0
  184. package/dist/core/errors/retryability.d.ts +3 -0
  185. package/dist/core/errors/retryability.js +8 -0
  186. package/dist/core/errors/retryability.js.map +1 -0
  187. package/dist/core/execute/execute.d.ts +28 -0
  188. package/dist/core/execute/execute.js +11 -0
  189. package/dist/core/execute/execute.js.map +1 -0
  190. package/dist/core/execution/adapters/cli-adapter.d.ts +22 -0
  191. package/dist/core/execution/adapters/cli-adapter.js +69 -0
  192. package/dist/core/execution/adapters/cli-adapter.js.map +1 -0
  193. package/dist/core/execution/adapters/cli-capability-adapter.d.ts +16 -0
  194. package/dist/core/execution/adapters/cli-capability-adapter.js +11 -0
  195. package/dist/core/execution/adapters/cli-capability-adapter.js.map +1 -0
  196. package/dist/core/execution/adapters/graphql-adapter.d.ts +25 -0
  197. package/dist/core/execution/adapters/graphql-adapter.js +44 -0
  198. package/dist/core/execution/adapters/graphql-adapter.js.map +1 -0
  199. package/dist/core/execution/adapters/graphql-capability-adapter.d.ts +20 -0
  200. package/dist/core/execution/adapters/graphql-capability-adapter.js +11 -0
  201. package/dist/core/execution/adapters/graphql-capability-adapter.js.map +1 -0
  202. package/dist/core/execution/adapters/rest-adapter.d.ts +3 -0
  203. package/dist/core/execution/adapters/rest-adapter.js +8 -0
  204. package/dist/core/execution/adapters/rest-adapter.js.map +1 -0
  205. package/dist/core/execution/cli/safe-runner.d.ts +12 -0
  206. package/dist/core/execution/cli/safe-runner.js +7 -0
  207. package/dist/core/execution/cli/safe-runner.js.map +1 -0
  208. package/dist/core/execution/normalizer.d.ts +13 -0
  209. package/dist/core/execution/normalizer.js +9 -0
  210. package/dist/core/execution/normalizer.js.map +1 -0
  211. package/dist/core/execution/preflight.d.ts +24 -0
  212. package/dist/core/execution/preflight.js +8 -0
  213. package/dist/core/execution/preflight.js.map +1 -0
  214. package/dist/core/registry/cards/check_run.annotations.list.yaml +35 -0
  215. package/dist/core/registry/cards/issue.comments.list.yaml +48 -0
  216. package/dist/core/registry/cards/issue.list.yaml +48 -0
  217. package/dist/core/registry/cards/issue.view.yaml +32 -0
  218. package/dist/core/registry/cards/pr.checks.get_failed.yaml +42 -0
  219. package/dist/core/registry/cards/pr.comment.reply.yaml +23 -0
  220. package/dist/core/registry/cards/pr.comment.resolve.yaml +22 -0
  221. package/dist/core/registry/cards/pr.comment.unresolve.yaml +22 -0
  222. package/dist/core/registry/cards/pr.comments.list.yaml +98 -0
  223. package/dist/core/registry/cards/pr.diff.list_files.yaml +43 -0
  224. package/dist/core/registry/cards/pr.list.yaml +48 -0
  225. package/dist/core/registry/cards/pr.mergeability.view.yaml +27 -0
  226. package/dist/core/registry/cards/pr.ready_for_review.set.yaml +24 -0
  227. package/dist/core/registry/cards/pr.reviews.list.yaml +47 -0
  228. package/dist/core/registry/cards/pr.status.checks.yaml +42 -0
  229. package/dist/core/registry/cards/pr.view.yaml +32 -0
  230. package/dist/core/registry/cards/repo.view.yaml +34 -0
  231. package/dist/core/registry/cards/workflow_job.logs.analyze.yaml +33 -0
  232. package/dist/core/registry/cards/workflow_job.logs.get.yaml +24 -0
  233. package/dist/core/registry/cards/workflow_run.jobs.list.yaml +35 -0
  234. package/dist/core/registry/cards/workflow_runs.list.yaml +45 -0
  235. package/dist/core/registry/index.d.ts +15 -0
  236. package/dist/core/registry/index.js +12 -0
  237. package/dist/core/registry/index.js.map +1 -0
  238. package/dist/core/registry/operation-card-schema.d.ts +167 -0
  239. package/dist/core/registry/operation-card-schema.js +7 -0
  240. package/dist/core/registry/operation-card-schema.js.map +1 -0
  241. package/dist/core/registry/schema-validator.d.ts +16 -0
  242. package/dist/core/registry/schema-validator.js +9 -0
  243. package/dist/core/registry/schema-validator.js.map +1 -0
  244. package/dist/core/registry/types.d.ts +51 -0
  245. package/dist/core/registry/types.js +1 -0
  246. package/dist/core/registry/types.js.map +1 -0
  247. package/dist/core/routing/capability-registry.d.ts +8 -0
  248. package/dist/core/routing/capability-registry.js +15 -0
  249. package/dist/core/routing/capability-registry.js.map +1 -0
  250. package/dist/core/routing/engine.d.ts +32 -0
  251. package/dist/core/routing/engine.js +23 -0
  252. package/dist/core/routing/engine.js.map +1 -0
  253. package/dist/core/routing/policy.d.ts +3 -0
  254. package/dist/core/routing/policy.js +7 -0
  255. package/dist/core/routing/policy.js.map +1 -0
  256. package/dist/core/routing/reason-codes.d.ts +4 -0
  257. package/dist/core/routing/reason-codes.js +15 -0
  258. package/dist/core/routing/reason-codes.js.map +1 -0
  259. package/dist/core/telemetry/logger.d.ts +8 -0
  260. package/dist/core/telemetry/logger.js +9 -0
  261. package/dist/core/telemetry/logger.js.map +1 -0
  262. package/dist/core/telemetry/metrics.d.ts +7 -0
  263. package/dist/core/telemetry/metrics.js +1 -0
  264. package/dist/core/telemetry/metrics.js.map +1 -0
  265. package/dist/gql/client.d.ts +183 -0
  266. package/dist/gql/client.js +17 -0
  267. package/dist/gql/client.js.map +1 -0
  268. package/dist/gql/generated/common-types.d.ts +36 -0
  269. package/dist/gql/generated/common-types.js +1 -0
  270. package/dist/gql/generated/common-types.js.map +1 -0
  271. package/dist/gql/operations/issue-comments-list.generated.d.ts +59 -0
  272. package/dist/gql/operations/issue-comments-list.generated.js +9 -0
  273. package/dist/gql/operations/issue-comments-list.generated.js.map +1 -0
  274. package/dist/gql/operations/issue-list.generated.d.ts +40 -0
  275. package/dist/gql/operations/issue-list.generated.js +9 -0
  276. package/dist/gql/operations/issue-list.generated.js.map +1 -0
  277. package/dist/gql/operations/issue-view.generated.d.ts +31 -0
  278. package/dist/gql/operations/issue-view.generated.js +9 -0
  279. package/dist/gql/operations/issue-view.generated.js.map +1 -0
  280. package/dist/gql/operations/pr-comment-reply.generated.d.ts +26 -0
  281. package/dist/gql/operations/pr-comment-reply.generated.js +25 -0
  282. package/dist/gql/operations/pr-comment-reply.generated.js.map +1 -0
  283. package/dist/gql/operations/pr-comment-resolve.generated.d.ts +26 -0
  284. package/dist/gql/operations/pr-comment-resolve.generated.js +24 -0
  285. package/dist/gql/operations/pr-comment-resolve.generated.js.map +1 -0
  286. package/dist/gql/operations/pr-comment-unresolve.generated.d.ts +26 -0
  287. package/dist/gql/operations/pr-comment-unresolve.generated.js +24 -0
  288. package/dist/gql/operations/pr-comment-unresolve.generated.js.map +1 -0
  289. package/dist/gql/operations/pr-comments-list.generated.d.ts +84 -0
  290. package/dist/gql/operations/pr-comments-list.generated.js +58 -0
  291. package/dist/gql/operations/pr-comments-list.generated.js.map +1 -0
  292. package/dist/gql/operations/pr-diff-list-files.generated.d.ts +42 -0
  293. package/dist/gql/operations/pr-diff-list-files.generated.js +9 -0
  294. package/dist/gql/operations/pr-diff-list-files.generated.js.map +1 -0
  295. package/dist/gql/operations/pr-list.generated.d.ts +40 -0
  296. package/dist/gql/operations/pr-list.generated.js +9 -0
  297. package/dist/gql/operations/pr-list.generated.js.map +1 -0
  298. package/dist/gql/operations/pr-reviews-list.generated.d.ts +64 -0
  299. package/dist/gql/operations/pr-reviews-list.generated.js +9 -0
  300. package/dist/gql/operations/pr-reviews-list.generated.js.map +1 -0
  301. package/dist/gql/operations/pr-view.generated.d.ts +31 -0
  302. package/dist/gql/operations/pr-view.generated.js +9 -0
  303. package/dist/gql/operations/pr-view.generated.js.map +1 -0
  304. package/dist/gql/operations/repo-view.generated.d.ts +33 -0
  305. package/dist/gql/operations/repo-view.generated.js +9 -0
  306. package/dist/gql/operations/repo-view.generated.js.map +1 -0
  307. package/dist/index.d.ts +22 -0
  308. package/dist/index.js +43 -0
  309. package/dist/index.js.map +1 -0
  310. package/dist/shared/constants.d.ts +3 -0
  311. package/dist/shared/constants.js +6 -0
  312. package/dist/shared/constants.js.map +1 -0
  313. package/dist/shared/types.d.ts +3 -0
  314. package/dist/shared/types.js +1 -0
  315. package/dist/shared/types.js.map +1 -0
  316. package/dist/shared/utils.d.ts +3 -0
  317. package/dist/shared/utils.js +8 -0
  318. package/dist/shared/utils.js.map +1 -0
  319. package/package.json +79 -0
@@ -0,0 +1,20 @@
1
+ import { GithubClient } from '../../../gql/client.js';
2
+ import { ResultEnvelope } from '../../contracts/envelope.js';
3
+ import 'graphql';
4
+ import '../../../gql/operations/issue-comments-list.generated.js';
5
+ import '../../../gql/generated/common-types.js';
6
+ import 'graphql-request';
7
+ import '../../../gql/operations/issue-list.generated.js';
8
+ import '../../../gql/operations/issue-view.generated.js';
9
+ import '../../../gql/operations/pr-diff-list-files.generated.js';
10
+ import '../../../gql/operations/pr-reviews-list.generated.js';
11
+ import '../../../gql/operations/pr-list.generated.js';
12
+ import '../../../gql/operations/pr-view.generated.js';
13
+ import '../../../gql/operations/repo-view.generated.js';
14
+ import '../../routing/reason-codes.js';
15
+ import '../../errors/codes.js';
16
+
17
+ type GraphqlCapabilityId = "repo.view" | "issue.view" | "issue.list" | "issue.comments.list" | "pr.view" | "pr.list" | "pr.comments.list" | "pr.reviews.list" | "pr.diff.list_files" | "pr.comment.reply" | "pr.comment.resolve" | "pr.comment.unresolve";
18
+ declare function runGraphqlCapability(client: Pick<GithubClient, "fetchRepoView" | "fetchIssueView" | "fetchIssueList" | "fetchIssueCommentsList" | "fetchPrView" | "fetchPrList" | "fetchPrCommentsList" | "fetchPrReviewsList" | "fetchPrDiffListFiles" | "replyToReviewThread" | "resolveReviewThread" | "unresolveReviewThread">, capabilityId: GraphqlCapabilityId, params: Record<string, unknown>): Promise<ResultEnvelope>;
19
+
20
+ export { type GraphqlCapabilityId, runGraphqlCapability };
@@ -0,0 +1,11 @@
1
+ import {
2
+ runGraphqlCapability
3
+ } from "../../../chunk-YNNDBMNR.js";
4
+ import "../../../chunk-QEAMC4IJ.js";
5
+ import "../../../chunk-B6RLMKS4.js";
6
+ import "../../../chunk-573MDG3I.js";
7
+ import "../../../chunk-UOJWOHRM.js";
8
+ export {
9
+ runGraphqlCapability
10
+ };
11
+ //# sourceMappingURL=graphql-capability-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,3 @@
1
+ declare function runRestAdapter(): Promise<unknown>;
2
+
3
+ export { runRestAdapter };
@@ -0,0 +1,8 @@
1
+ // src/core/execution/adapters/rest-adapter.ts
2
+ async function runRestAdapter() {
3
+ throw new Error("runRestAdapter is not implemented yet");
4
+ }
5
+ export {
6
+ runRestAdapter
7
+ };
8
+ //# sourceMappingURL=rest-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/execution/adapters/rest-adapter.ts"],"sourcesContent":["export async function runRestAdapter(): Promise<unknown> {\n throw new Error(\"runRestAdapter is not implemented yet\")\n}\n"],"mappings":";AAAA,eAAsB,iBAAmC;AACvD,QAAM,IAAI,MAAM,uCAAuC;AACzD;","names":[]}
@@ -0,0 +1,12 @@
1
+ import { CliCommandRunner } from '../adapters/cli-capability-adapter.js';
2
+ import '../../contracts/envelope.js';
3
+ import '../../routing/reason-codes.js';
4
+ import '../../errors/codes.js';
5
+ import '../../registry/types.js';
6
+
7
+ type SafeRunnerOptions = {
8
+ maxOutputBytes?: number;
9
+ };
10
+ declare function createSafeCliCommandRunner(options?: SafeRunnerOptions): CliCommandRunner;
11
+
12
+ export { createSafeCliCommandRunner };
@@ -0,0 +1,7 @@
1
+ import {
2
+ createSafeCliCommandRunner
3
+ } from "../../../chunk-DLKIQBK6.js";
4
+ export {
5
+ createSafeCliCommandRunner
6
+ };
7
+ //# sourceMappingURL=safe-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,13 @@
1
+ import { ResultEnvelope } from '../contracts/envelope.js';
2
+ import { RouteReasonCode } from '../routing/reason-codes.js';
3
+ import '../errors/codes.js';
4
+
5
+ type MetaInput = {
6
+ capabilityId: string;
7
+ reason: RouteReasonCode | undefined;
8
+ pagination?: ResultEnvelope["meta"]["pagination"];
9
+ };
10
+ declare function normalizeResult<TData>(data: TData, route: "cli" | "rest" | "graphql", options: MetaInput): ResultEnvelope<TData>;
11
+ declare function normalizeError<TData = unknown>(error: NonNullable<ResultEnvelope["error"]>, route: "cli" | "rest" | "graphql", options: MetaInput): ResultEnvelope<TData>;
12
+
13
+ export { normalizeError, normalizeResult };
@@ -0,0 +1,9 @@
1
+ import {
2
+ normalizeError,
3
+ normalizeResult
4
+ } from "../../chunk-QEAMC4IJ.js";
5
+ export {
6
+ normalizeError,
7
+ normalizeResult
8
+ };
9
+ //# sourceMappingURL=normalizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,24 @@
1
+ import { RouteSource } from '../contracts/envelope.js';
2
+ import { ErrorCode } from '../errors/codes.js';
3
+ import '../routing/reason-codes.js';
4
+
5
+ type PreflightInput = {
6
+ route: RouteSource;
7
+ githubToken?: string | null;
8
+ ghCliAvailable?: boolean;
9
+ ghAuthenticated?: boolean;
10
+ };
11
+ type PreflightResult = {
12
+ ok: true;
13
+ } | {
14
+ ok: false;
15
+ code: ErrorCode;
16
+ message: string;
17
+ retryable: boolean;
18
+ details: {
19
+ route: RouteSource;
20
+ };
21
+ };
22
+ declare function preflightCheck(input: PreflightInput): PreflightResult;
23
+
24
+ export { type PreflightInput, type PreflightResult, preflightCheck };
@@ -0,0 +1,8 @@
1
+ import {
2
+ preflightCheck
3
+ } from "../../chunk-TDTKOJKN.js";
4
+ import "../../chunk-UOJWOHRM.js";
5
+ export {
6
+ preflightCheck
7
+ };
8
+ //# sourceMappingURL=preflight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -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,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,48 @@
1
+ capability_id: issue.list
2
+ version: "1.0.0"
3
+ description: List repository issues.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ state: { type: string, minLength: 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, number, title, state, url]
23
+ properties:
24
+ id: { type: string, minLength: 1 }
25
+ number: { type: integer, minimum: 1 }
26
+ title: { type: string }
27
+ state: { type: string }
28
+ url: { 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: cli
40
+ fallbacks: [graphql]
41
+ notes:
42
+ - Prefer CLI for low-latency structured fetches when gh authentication is available.
43
+ graphql:
44
+ operationName: IssueList
45
+ documentPath: src/gql/operations/issue-list.graphql
46
+ cli:
47
+ command: issue list
48
+ jsonFields: [id, number, title, state, url]
@@ -0,0 +1,32 @@
1
+ capability_id: issue.view
2
+ version: "1.0.0"
3
+ description: Fetch one issue by number.
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: [id, number, title, state, url]
15
+ properties:
16
+ id: { type: string, minLength: 1 }
17
+ number: { type: integer, minimum: 1 }
18
+ title: { type: string }
19
+ state: { type: string }
20
+ url: { type: string, minLength: 1 }
21
+ additionalProperties: false
22
+ routing:
23
+ preferred: cli
24
+ fallbacks: [graphql]
25
+ notes:
26
+ - Prefer CLI for low-latency structured fetches when gh authentication is available.
27
+ graphql:
28
+ operationName: IssueView
29
+ documentPath: src/gql/operations/issue-view.graphql
30
+ cli:
31
+ command: issue view
32
+ jsonFields: [id, number, title, state, url]
@@ -0,0 +1,42 @@
1
+ capability_id: pr.checks.get_failed
2
+ version: "1.0.0"
3
+ description: List failed pull request checks.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, prNumber]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ prNumber: { type: integer, minimum: 1 }
11
+ additionalProperties: false
12
+ output_schema:
13
+ type: object
14
+ required: [items, summary]
15
+ properties:
16
+ items:
17
+ type: array
18
+ items:
19
+ type: object
20
+ required: [name, state, workflow, link]
21
+ properties:
22
+ name: { type: [string, "null"] }
23
+ state: { type: [string, "null"] }
24
+ workflow: { type: [string, "null"] }
25
+ link: { type: [string, "null"] }
26
+ additionalProperties: false
27
+ summary:
28
+ type: object
29
+ required: [total, failed, pending, passed]
30
+ properties:
31
+ total: { type: integer, minimum: 0 }
32
+ failed: { type: integer, minimum: 0 }
33
+ pending: { type: integer, minimum: 0 }
34
+ passed: { type: integer, minimum: 0 }
35
+ additionalProperties: false
36
+ additionalProperties: false
37
+ routing:
38
+ preferred: cli
39
+ fallbacks: []
40
+ cli:
41
+ command: pr checks
42
+ jsonFields: [name, state, workflow, link]
@@ -0,0 +1,23 @@
1
+ capability_id: pr.comment.reply
2
+ version: "1.0.0"
3
+ description: Reply to a pull request review thread.
4
+ input_schema:
5
+ type: object
6
+ required: [threadId, body]
7
+ properties:
8
+ threadId: { type: string, minLength: 1 }
9
+ body: { type: string, minLength: 1 }
10
+ additionalProperties: false
11
+ output_schema:
12
+ type: object
13
+ required: [id, isResolved]
14
+ properties:
15
+ id: { type: string, minLength: 1 }
16
+ isResolved: { type: boolean }
17
+ additionalProperties: false
18
+ routing:
19
+ preferred: graphql
20
+ fallbacks: []
21
+ graphql:
22
+ operationName: PrCommentReply
23
+ documentPath: src/gql/operations/pr-comment-reply.graphql
@@ -0,0 +1,22 @@
1
+ capability_id: pr.comment.resolve
2
+ version: "1.0.0"
3
+ description: Resolve a pull request review thread.
4
+ input_schema:
5
+ type: object
6
+ required: [threadId]
7
+ properties:
8
+ threadId: { type: string, minLength: 1 }
9
+ additionalProperties: false
10
+ output_schema:
11
+ type: object
12
+ required: [id, isResolved]
13
+ properties:
14
+ id: { type: string, minLength: 1 }
15
+ isResolved: { type: boolean }
16
+ additionalProperties: false
17
+ routing:
18
+ preferred: graphql
19
+ fallbacks: []
20
+ graphql:
21
+ operationName: PrCommentResolve
22
+ documentPath: src/gql/operations/pr-comment-resolve.graphql
@@ -0,0 +1,22 @@
1
+ capability_id: pr.comment.unresolve
2
+ version: "1.0.0"
3
+ description: Unresolve a pull request review thread.
4
+ input_schema:
5
+ type: object
6
+ required: [threadId]
7
+ properties:
8
+ threadId: { type: string, minLength: 1 }
9
+ additionalProperties: false
10
+ output_schema:
11
+ type: object
12
+ required: [id, isResolved]
13
+ properties:
14
+ id: { type: string, minLength: 1 }
15
+ isResolved: { type: boolean }
16
+ additionalProperties: false
17
+ routing:
18
+ preferred: graphql
19
+ fallbacks: []
20
+ graphql:
21
+ operationName: PrCommentUnresolve
22
+ documentPath: src/gql/operations/pr-comment-unresolve.graphql
@@ -0,0 +1,98 @@
1
+ capability_id: pr.comments.list
2
+ version: "1.0.0"
3
+ description: List pull request review threads with unresolved filtering.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, prNumber]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ prNumber: { type: integer, minimum: 1 }
11
+ first: { type: integer, minimum: 1 }
12
+ after: { type: [string, "null"] }
13
+ unresolvedOnly: { type: boolean }
14
+ includeOutdated: { type: boolean }
15
+ additionalProperties: false
16
+ output_schema:
17
+ type: object
18
+ required: [items, pageInfo]
19
+ properties:
20
+ items:
21
+ type: array
22
+ items:
23
+ type: object
24
+ required:
25
+ [
26
+ id,
27
+ path,
28
+ line,
29
+ startLine,
30
+ diffSide,
31
+ subjectType,
32
+ isResolved,
33
+ isOutdated,
34
+ viewerCanReply,
35
+ viewerCanResolve,
36
+ viewerCanUnresolve,
37
+ resolvedByLogin,
38
+ comments
39
+ ]
40
+ properties:
41
+ id: { type: string, minLength: 1 }
42
+ path: { type: [string, "null"] }
43
+ line: { type: [integer, "null"] }
44
+ startLine: { type: [integer, "null"] }
45
+ diffSide: { type: [string, "null"] }
46
+ subjectType: { type: [string, "null"] }
47
+ isResolved: { type: boolean }
48
+ isOutdated: { type: boolean }
49
+ viewerCanReply: { type: boolean }
50
+ viewerCanResolve: { type: boolean }
51
+ viewerCanUnresolve: { type: boolean }
52
+ resolvedByLogin: { type: [string, "null"] }
53
+ comments:
54
+ type: array
55
+ items:
56
+ type: object
57
+ required: [id, authorLogin, body, createdAt, url]
58
+ properties:
59
+ id: { type: string, minLength: 1 }
60
+ authorLogin: { type: [string, "null"] }
61
+ body: { type: string }
62
+ createdAt: { type: string, minLength: 1 }
63
+ url: { type: string, minLength: 1 }
64
+ additionalProperties: false
65
+ additionalProperties: false
66
+ pageInfo:
67
+ type: object
68
+ required: [hasNextPage, endCursor]
69
+ properties:
70
+ hasNextPage: { type: boolean }
71
+ endCursor: { type: [string, "null"] }
72
+ additionalProperties: false
73
+ filterApplied:
74
+ type: object
75
+ required: [unresolvedOnly, includeOutdated]
76
+ properties:
77
+ unresolvedOnly: { type: boolean }
78
+ includeOutdated: { type: boolean }
79
+ additionalProperties: false
80
+ scan:
81
+ type: object
82
+ required: [pagesScanned, sourceItemsScanned, scanTruncated]
83
+ properties:
84
+ pagesScanned: { type: integer, minimum: 0 }
85
+ sourceItemsScanned: { type: integer, minimum: 0 }
86
+ scanTruncated: { type: boolean }
87
+ additionalProperties: false
88
+ additionalProperties: false
89
+ routing:
90
+ preferred: graphql
91
+ fallbacks: []
92
+ notes:
93
+ - Prefer GraphQL for review-thread semantics and unresolved filtering.
94
+ graphql:
95
+ operationName: PrCommentsList
96
+ documentPath: src/gql/operations/pr-comments-list.graphql
97
+ cli:
98
+ command: api graphql
@@ -0,0 +1,43 @@
1
+ capability_id: pr.diff.list_files
2
+ version: "1.0.0"
3
+ description: List changed files in a pull request diff.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, prNumber]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ prNumber: { 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: [path, additions, deletions]
23
+ properties:
24
+ path: { type: string, minLength: 1 }
25
+ additions: { type: integer, minimum: 0 }
26
+ deletions: { type: integer, minimum: 0 }
27
+ additionalProperties: false
28
+ pageInfo:
29
+ type: object
30
+ required: [hasNextPage, endCursor]
31
+ properties:
32
+ hasNextPage: { type: boolean }
33
+ endCursor: { type: [string, "null"] }
34
+ additionalProperties: false
35
+ additionalProperties: false
36
+ routing:
37
+ preferred: graphql
38
+ fallbacks: []
39
+ graphql:
40
+ operationName: PrDiffListFiles
41
+ documentPath: src/gql/operations/pr-diff-list-files.graphql
42
+ cli:
43
+ command: pr view
@@ -0,0 +1,48 @@
1
+ capability_id: pr.list
2
+ version: "1.0.0"
3
+ description: List repository pull requests.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ state: { type: string, minLength: 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, number, title, state, url]
23
+ properties:
24
+ id: { type: string, minLength: 1 }
25
+ number: { type: integer, minimum: 1 }
26
+ title: { type: string }
27
+ state: { type: string }
28
+ url: { 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: cli
40
+ fallbacks: [graphql]
41
+ notes:
42
+ - Prefer CLI for low-latency structured fetches when gh authentication is available.
43
+ graphql:
44
+ operationName: PrList
45
+ documentPath: src/gql/operations/pr-list.graphql
46
+ cli:
47
+ command: pr list
48
+ jsonFields: [id, number, title, state, url]
@@ -0,0 +1,27 @@
1
+ capability_id: pr.mergeability.view
2
+ version: "1.0.0"
3
+ description: View pull request mergeability and readiness signals.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, prNumber]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ prNumber: { type: integer, minimum: 1 }
11
+ additionalProperties: false
12
+ output_schema:
13
+ type: object
14
+ required: [mergeable, mergeStateStatus, reviewDecision, isDraft, state]
15
+ properties:
16
+ mergeable: { type: [string, "null"] }
17
+ mergeStateStatus: { type: [string, "null"] }
18
+ reviewDecision: { type: [string, "null"] }
19
+ isDraft: { type: boolean }
20
+ state: { type: string }
21
+ additionalProperties: false
22
+ routing:
23
+ preferred: cli
24
+ fallbacks: []
25
+ cli:
26
+ command: pr view
27
+ jsonFields: [mergeable, mergeStateStatus, reviewDecision, isDraft, state]
@@ -0,0 +1,24 @@
1
+ capability_id: pr.ready_for_review.set
2
+ version: "1.0.0"
3
+ description: Mark pull request as ready for review or draft.
4
+ input_schema:
5
+ type: object
6
+ required: [owner, name, prNumber, ready]
7
+ properties:
8
+ owner: { type: string, minLength: 1 }
9
+ name: { type: string, minLength: 1 }
10
+ prNumber: { type: integer, minimum: 1 }
11
+ ready: { type: boolean }
12
+ additionalProperties: false
13
+ output_schema:
14
+ type: object
15
+ required: [prNumber, isDraft]
16
+ properties:
17
+ prNumber: { type: integer, minimum: 1 }
18
+ isDraft: { type: boolean }
19
+ additionalProperties: false
20
+ routing:
21
+ preferred: cli
22
+ fallbacks: []
23
+ cli:
24
+ command: pr ready