@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
package/dist/index.d.ts CHANGED
@@ -1,19 +1,188 @@
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
1
  import { DocumentNode } from 'graphql';
4
2
 
3
+ declare const errorCodes: {
4
+ readonly Auth: "AUTH";
5
+ readonly NotFound: "NOT_FOUND";
6
+ readonly Validation: "VALIDATION";
7
+ readonly RateLimit: "RATE_LIMIT";
8
+ readonly Network: "NETWORK";
9
+ readonly Server: "SERVER";
10
+ readonly AdapterUnsupported: "ADAPTER_UNSUPPORTED";
11
+ readonly Unknown: "UNKNOWN";
12
+ };
13
+ type ErrorCode = (typeof errorCodes)[keyof typeof errorCodes];
14
+
15
+ declare const routeReasonCodes: readonly ["INPUT_VALIDATION", "OUTPUT_VALIDATION", "CARD_PREFERRED", "CARD_FALLBACK", "PREFLIGHT_FAILED", "ENV_CONSTRAINT", "CAPABILITY_LIMIT", "DEFAULT_POLICY"];
16
+ type RouteReasonCode = (typeof routeReasonCodes)[number];
17
+
18
+ type RouteSource = "cli" | "rest" | "graphql";
19
+ interface ResultError {
20
+ code: ErrorCode;
21
+ message: string;
22
+ retryable: boolean;
23
+ details?: Record<string, unknown>;
24
+ }
25
+ interface AttemptMeta {
26
+ route: RouteSource;
27
+ status: "success" | "error" | "skipped";
28
+ error_code?: ErrorCode;
29
+ duration_ms?: number;
30
+ }
31
+ interface ResultMeta {
32
+ capability_id: string;
33
+ route_used?: RouteSource;
34
+ reason?: RouteReasonCode;
35
+ attempts?: AttemptMeta[];
36
+ pagination?: {
37
+ has_next_page?: boolean;
38
+ end_cursor?: string;
39
+ next?: unknown;
40
+ };
41
+ timings?: {
42
+ total_ms?: number;
43
+ adapter_ms?: number;
44
+ };
45
+ cost?: {
46
+ tokens_in?: number;
47
+ tokens_out?: number;
48
+ };
49
+ }
50
+ interface ResultEnvelope<TData = unknown> {
51
+ ok: boolean;
52
+ data?: TData;
53
+ error?: ResultError;
54
+ meta: ResultMeta;
55
+ }
56
+ type ChainStatus = "success" | "partial" | "failed";
57
+ interface ChainStepResult {
58
+ task: string;
59
+ ok: boolean;
60
+ data?: unknown;
61
+ error?: ResultError;
62
+ }
63
+ interface ChainResultEnvelope {
64
+ status: ChainStatus;
65
+ results: ChainStepResult[];
66
+ meta: {
67
+ route_used: RouteSource;
68
+ total: number;
69
+ succeeded: number;
70
+ failed: number;
71
+ };
72
+ }
73
+
5
74
  type TaskId = string;
6
75
  interface TaskRequest<TInput = Record<string, unknown>> {
7
76
  task: TaskId;
8
77
  input: TInput;
9
78
  }
10
79
 
80
+ type ExecuteTaskFn = (request: {
81
+ task: string;
82
+ input: Record<string, unknown>;
83
+ options?: Record<string, unknown>;
84
+ }) => Promise<ResultEnvelope>;
85
+ declare function createExecuteTool(deps: {
86
+ executeTask: ExecuteTaskFn;
87
+ }): {
88
+ execute(capabilityId: string, params: Record<string, unknown>, options?: Record<string, unknown>): Promise<ResultEnvelope>;
89
+ };
90
+
11
91
  type JsonSchema = Record<string, unknown>;
12
92
  interface SuitabilityRule {
13
93
  when: "always" | "env" | "params";
14
94
  predicate: string;
15
95
  reason: string;
16
96
  }
97
+ /**
98
+ * Extracts a single value from a Phase 1 lookup result using a dot-notation path.
99
+ *
100
+ * Use when the mutation needs one node ID that can be resolved via a lookup query.
101
+ *
102
+ * @example
103
+ * ```yaml
104
+ * inject:
105
+ * - target: pullRequestId
106
+ * source: scalar
107
+ * path: repository.pullRequest.id
108
+ * ```
109
+ */
110
+ interface ScalarInject {
111
+ target: string;
112
+ source: "scalar";
113
+ path: string;
114
+ }
115
+ /**
116
+ * Resolves a list of human-readable names to node IDs using a Phase 1 lookup result.
117
+ *
118
+ * Matching is case-insensitive. Use when the mutation needs an array of IDs
119
+ * (e.g. label IDs, assignee IDs) that must be looked up by name.
120
+ *
121
+ * @example
122
+ * ```yaml
123
+ * inject:
124
+ * - target: labelIds
125
+ * source: map_array
126
+ * from_input: labels # input field containing list of names
127
+ * nodes_path: repository.labels.nodes
128
+ * match_field: name # field on each node to match against input names
129
+ * extract_field: id # field on each node to extract as the resolved value
130
+ * ```
131
+ */
132
+ interface MapArrayInject {
133
+ target: string;
134
+ source: "map_array";
135
+ from_input: string;
136
+ nodes_path: string;
137
+ match_field: string;
138
+ extract_field: string;
139
+ }
140
+ /**
141
+ * Passes a value directly from the step's `input` into a mutation variable.
142
+ *
143
+ * No Phase 1 lookup is required. Use when the caller already has the required node ID
144
+ * (e.g. the agent passes `issueId` directly), avoiding an unnecessary resolution round-trip.
145
+ *
146
+ * @example
147
+ * ```yaml
148
+ * inject:
149
+ * - target: labelableId
150
+ * source: input
151
+ * from_input: issueId # the input field whose value is passed through
152
+ * ```
153
+ */
154
+ interface InputPassthroughInject {
155
+ target: string;
156
+ source: "input";
157
+ from_input: string;
158
+ }
159
+ /**
160
+ * Injects an explicit `null` value into a mutation variable.
161
+ *
162
+ * Use when a mutation variable must be explicitly set to `null` to clear a field
163
+ * (e.g. clearing a milestone from an issue by passing `milestoneId: null`).
164
+ *
165
+ * @example
166
+ * ```yaml
167
+ * inject:
168
+ * - target: milestoneId
169
+ * source: "null_literal"
170
+ * ```
171
+ */
172
+ interface NullLiteralInject {
173
+ target: string;
174
+ source: "null_literal";
175
+ }
176
+ type InjectSpec = ScalarInject | MapArrayInject | InputPassthroughInject | NullLiteralInject;
177
+ interface LookupSpec {
178
+ operationName: string;
179
+ documentPath: string;
180
+ vars: Record<string, string>;
181
+ }
182
+ interface ResolutionConfig {
183
+ lookup: LookupSpec;
184
+ inject: InjectSpec[];
185
+ }
17
186
  interface OperationCard<Input = Record<string, unknown>> {
18
187
  capability_id: string;
19
188
  version: string;
@@ -28,11 +197,13 @@ interface OperationCard<Input = Record<string, unknown>> {
28
197
  };
29
198
  graphql?: {
30
199
  operationName: string;
200
+ operationType: "query" | "mutation";
31
201
  documentPath: string;
32
202
  variables?: Record<string, string>;
33
203
  limits?: {
34
204
  maxPageSize?: number;
35
205
  };
206
+ resolution?: ResolutionConfig;
36
207
  };
37
208
  cli?: {
38
209
  command: string;
@@ -54,12 +225,13 @@ interface OperationCard<Input = Record<string, unknown>> {
54
225
  }>;
55
226
  }
56
227
 
228
+ type CliRunResult = {
229
+ stdout: string;
230
+ stderr: string;
231
+ exitCode: number;
232
+ };
57
233
  type CliCommandRunner = {
58
- run(command: string, args: string[], timeoutMs: number): Promise<{
59
- stdout: string;
60
- stderr: string;
61
- exitCode: number;
62
- }>;
234
+ run(command: string, args: string[], timeoutMs: number): Promise<CliRunResult>;
63
235
  };
64
236
 
65
237
  type SafeRunnerOptions = {
@@ -67,9 +239,54 @@ type SafeRunnerOptions = {
67
239
  };
68
240
  declare function createSafeCliCommandRunner(options?: SafeRunnerOptions): CliCommandRunner;
69
241
 
242
+ type CapabilityExplanation = {
243
+ capability_id: string;
244
+ purpose: string;
245
+ required_inputs: string[];
246
+ optional_inputs: Record<string, unknown>;
247
+ preferred_route: "cli" | "graphql" | "rest";
248
+ fallback_routes: Array<"cli" | "graphql" | "rest">;
249
+ output_fields: string[];
250
+ };
251
+ declare function explainCapability(capabilityId: string): CapabilityExplanation;
252
+
70
253
  declare function listOperationCards(): OperationCard[];
71
254
  declare function getOperationCard(capabilityId: string): OperationCard | undefined;
72
255
 
256
+ type CapabilityListItem = {
257
+ capability_id: string;
258
+ description: string;
259
+ required_inputs: string[];
260
+ optional_inputs: string[];
261
+ optional_inputs_detail: Record<string, unknown>;
262
+ };
263
+ declare function listCapabilities(domain?: string): CapabilityListItem[];
264
+
265
+ type GraphqlVariables = Record<string, unknown>;
266
+ type GraphqlError = {
267
+ message: string;
268
+ path?: ReadonlyArray<string | number>;
269
+ extensions?: Record<string, unknown>;
270
+ };
271
+ type GraphqlRawResult<TData> = {
272
+ data: TData | undefined;
273
+ errors: GraphqlError[] | undefined;
274
+ };
275
+ type GraphqlDocument = string | DocumentNode;
276
+ interface GraphqlTransport {
277
+ execute<TData>(query: string, variables?: GraphqlVariables): Promise<TData>;
278
+ executeRaw?<TData>(query: string, variables?: GraphqlVariables): Promise<GraphqlRawResult<TData>>;
279
+ }
280
+ interface GraphqlClient {
281
+ query<TData, TVariables extends GraphqlVariables = GraphqlVariables>(query: GraphqlDocument, variables?: TVariables): Promise<TData>;
282
+ queryRaw<TData, TVariables extends GraphqlVariables = GraphqlVariables>(query: GraphqlDocument, variables?: TVariables): Promise<GraphqlRawResult<TData>>;
283
+ }
284
+ type TokenClientOptions = {
285
+ token: string;
286
+ graphqlUrl?: string;
287
+ };
288
+ declare function createGraphqlClient(transport: GraphqlTransport): GraphqlClient;
289
+
73
290
  type Maybe<T> = T | null;
74
291
  type InputMaybe<T> = Maybe<T>;
75
292
  type Exact<T extends {
@@ -99,6 +316,16 @@ type Scalars = {
99
316
  output: unknown;
100
317
  };
101
318
  };
319
+ type DiffSide = string;
320
+ type PullRequestReviewEvent = string;
321
+ type DraftPullRequestReviewThread = {
322
+ body: Scalars["String"]["input"];
323
+ line?: InputMaybe<Scalars["Int"]["input"]>;
324
+ path?: InputMaybe<Scalars["String"]["input"]>;
325
+ side?: InputMaybe<DiffSide>;
326
+ startLine?: InputMaybe<Scalars["Int"]["input"]>;
327
+ startSide?: InputMaybe<DiffSide>;
328
+ };
102
329
 
103
330
  type IssueCommentsListQueryVariables = Exact<{
104
331
  owner: Scalars["String"]["input"];
@@ -136,6 +363,13 @@ type PrListQueryVariables = Exact<{
136
363
  after?: InputMaybe<Scalars["String"]["input"]>;
137
364
  }>;
138
365
 
366
+ type PrReviewSubmitMutationVariables = Exact<{
367
+ pullRequestId: Scalars["ID"]["input"];
368
+ event: PullRequestReviewEvent;
369
+ body?: InputMaybe<Scalars["String"]["input"]>;
370
+ threads?: InputMaybe<Array<DraftPullRequestReviewThread> | DraftPullRequestReviewThread>;
371
+ }>;
372
+
139
373
  type PrReviewsListQueryVariables = Exact<{
140
374
  owner: Scalars["String"]["input"];
141
375
  name: Scalars["String"]["input"];
@@ -150,19 +384,62 @@ type PrViewQueryVariables = Exact<{
150
384
  prNumber: Scalars["Int"]["input"];
151
385
  }>;
152
386
 
387
+ type ProjectV2FieldsListQueryVariables = Exact<{
388
+ owner: Scalars["String"]["input"];
389
+ projectNumber: Scalars["Int"]["input"];
390
+ first: Scalars["Int"]["input"];
391
+ after?: InputMaybe<Scalars["String"]["input"]>;
392
+ }>;
393
+
394
+ type ProjectV2ItemsListQueryVariables = Exact<{
395
+ owner: Scalars["String"]["input"];
396
+ projectNumber: Scalars["Int"]["input"];
397
+ first: Scalars["Int"]["input"];
398
+ after?: InputMaybe<Scalars["String"]["input"]>;
399
+ }>;
400
+
401
+ type ProjectV2OrgViewQueryVariables = Exact<{
402
+ org: Scalars["String"]["input"];
403
+ projectNumber: Scalars["Int"]["input"];
404
+ }>;
405
+
406
+ type ProjectV2UserViewQueryVariables = Exact<{
407
+ user: Scalars["String"]["input"];
408
+ projectNumber: Scalars["Int"]["input"];
409
+ }>;
410
+
411
+ type ReleaseListQueryVariables = Exact<{
412
+ owner: Scalars["String"]["input"];
413
+ name: Scalars["String"]["input"];
414
+ first: Scalars["Int"]["input"];
415
+ after?: InputMaybe<Scalars["String"]["input"]>;
416
+ }>;
417
+
418
+ type ReleaseViewQueryVariables = Exact<{
419
+ owner: Scalars["String"]["input"];
420
+ name: Scalars["String"]["input"];
421
+ tagName: Scalars["String"]["input"];
422
+ }>;
423
+
424
+ type RepoIssueTypesListQueryVariables = Exact<{
425
+ owner: Scalars["String"]["input"];
426
+ name: Scalars["String"]["input"];
427
+ first: Scalars["Int"]["input"];
428
+ after?: InputMaybe<Scalars["String"]["input"]>;
429
+ }>;
430
+
431
+ type RepoLabelsListQueryVariables = Exact<{
432
+ owner: Scalars["String"]["input"];
433
+ name: Scalars["String"]["input"];
434
+ first: Scalars["Int"]["input"];
435
+ after?: InputMaybe<Scalars["String"]["input"]>;
436
+ }>;
437
+
153
438
  type RepoViewQueryVariables = Exact<{
154
439
  owner: Scalars["String"]["input"];
155
440
  name: Scalars["String"]["input"];
156
441
  }>;
157
442
 
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
443
  type RepoViewInput = RepoViewQueryVariables;
167
444
  type IssueCommentsListInput = IssueCommentsListQueryVariables;
168
445
  type IssueListInput = IssueListQueryVariables;
@@ -187,27 +464,57 @@ type IssueCreateInput = {
187
464
  body?: string;
188
465
  };
189
466
  type IssueUpdateInput = {
190
- issueId: string;
467
+ owner: string;
468
+ name: string;
469
+ issueNumber: number;
191
470
  title?: string;
192
471
  body?: string;
193
472
  };
194
473
  type IssueMutationInput = {
195
- issueId: string;
474
+ owner: string;
475
+ name: string;
476
+ issueNumber: number;
196
477
  };
197
478
  type IssueLabelsUpdateInput = {
198
- issueId: string;
479
+ owner: string;
480
+ name: string;
481
+ issueNumber: number;
482
+ labels: string[];
483
+ };
484
+ type IssueLabelsAddInput = {
485
+ owner: string;
486
+ name: string;
487
+ issueNumber: number;
199
488
  labels: string[];
200
489
  };
201
490
  type IssueAssigneesUpdateInput = {
202
- issueId: string;
491
+ owner: string;
492
+ name: string;
493
+ issueNumber: number;
494
+ assignees: string[];
495
+ };
496
+ type IssueAssigneesAddInput = {
497
+ owner: string;
498
+ name: string;
499
+ issueNumber: number;
500
+ assignees: string[];
501
+ };
502
+ type IssueAssigneesRemoveInput = {
503
+ owner: string;
504
+ name: string;
505
+ issueNumber: number;
203
506
  assignees: string[];
204
507
  };
205
508
  type IssueMilestoneSetInput = {
206
- issueId: string;
207
- milestoneNumber: number | null;
509
+ owner: string;
510
+ name: string;
511
+ issueNumber: number;
512
+ milestoneNumber: number;
208
513
  };
209
514
  type IssueCommentCreateInput = {
210
- issueId: string;
515
+ owner: string;
516
+ name: string;
517
+ issueNumber: number;
211
518
  body: string;
212
519
  };
213
520
  type IssueLinkedPrsListInput = {
@@ -243,9 +550,18 @@ type IssueViewData = {
243
550
  title: string;
244
551
  state: string;
245
552
  url: string;
553
+ body: string;
554
+ labels: string[];
555
+ };
556
+ type IssueListItemData = {
557
+ id: string;
558
+ number: number;
559
+ title: string;
560
+ state: string;
561
+ url: string;
246
562
  };
247
563
  type IssueListData = {
248
- items: Array<IssueViewData>;
564
+ items: Array<IssueListItemData>;
249
565
  pageInfo: {
250
566
  endCursor: string | null;
251
567
  hasNextPage: boolean;
@@ -279,14 +595,45 @@ type IssueLabelsUpdateData = {
279
595
  id: string;
280
596
  labels: string[];
281
597
  };
598
+ type IssueLabelsAddData = {
599
+ id: string;
600
+ labels: string[];
601
+ };
602
+ type IssueLabelsRemoveInput = {
603
+ owner: string;
604
+ name: string;
605
+ issueNumber: number;
606
+ labels: string[];
607
+ };
608
+ type IssueLabelsRemoveData = {
609
+ issueNumber: number;
610
+ removed: string[];
611
+ };
282
612
  type IssueAssigneesUpdateData = {
283
613
  id: string;
284
614
  assignees: string[];
285
615
  };
616
+ type IssueAssigneesAddData = {
617
+ id: string;
618
+ assignees: string[];
619
+ };
620
+ type IssueAssigneesRemoveData = {
621
+ id: string;
622
+ assignees: string[];
623
+ };
286
624
  type IssueMilestoneSetData = {
287
625
  id: string;
288
626
  milestoneNumber: number | null;
289
627
  };
628
+ type IssueMilestoneClearInput = {
629
+ owner: string;
630
+ name: string;
631
+ issueNumber: number;
632
+ };
633
+ type IssueMilestoneClearData = {
634
+ issueNumber: number;
635
+ cleared: boolean;
636
+ };
290
637
  type IssueCommentCreateData = {
291
638
  id: string;
292
639
  body: string;
@@ -315,6 +662,7 @@ type IssueRelationsGetData = {
315
662
  type IssueParentSetData = {
316
663
  issueId: string;
317
664
  parentIssueId: string;
665
+ updated: boolean;
318
666
  };
319
667
  type IssueParentRemoveData = {
320
668
  issueId: string;
@@ -323,6 +671,7 @@ type IssueParentRemoveData = {
323
671
  type IssueBlockedByData = {
324
672
  issueId: string;
325
673
  blockedByIssueId: string;
674
+ added?: boolean;
326
675
  removed?: boolean;
327
676
  };
328
677
  type PrViewData = {
@@ -331,9 +680,18 @@ type PrViewData = {
331
680
  title: string;
332
681
  state: string;
333
682
  url: string;
683
+ body: string;
684
+ labels: string[];
685
+ };
686
+ type PrListItemData = {
687
+ id: string;
688
+ number: number;
689
+ title: string;
690
+ state: string;
691
+ url: string;
334
692
  };
335
693
  type PrListData = {
336
- items: Array<PrViewData>;
694
+ items: Array<PrListItemData>;
337
695
  pageInfo: {
338
696
  endCursor: string | null;
339
697
  hasNextPage: boolean;
@@ -405,6 +763,18 @@ type PrDiffListFilesData = {
405
763
  hasNextPage: boolean;
406
764
  };
407
765
  };
766
+ type PrMergeStatusInput = {
767
+ owner: string;
768
+ name: string;
769
+ prNumber: number;
770
+ };
771
+ type PrMergeStatusData = {
772
+ mergeable: string | null;
773
+ mergeStateStatus: string | null;
774
+ reviewDecision: string | null;
775
+ isDraft: boolean;
776
+ state: string;
777
+ };
408
778
  type ReviewThreadMutationInput = {
409
779
  threadId: string;
410
780
  };
@@ -415,6 +785,234 @@ type ReviewThreadMutationData = {
415
785
  id: string;
416
786
  isResolved: boolean;
417
787
  };
788
+ type DraftComment = {
789
+ path: string;
790
+ body: string;
791
+ line: number;
792
+ side?: "LEFT" | "RIGHT";
793
+ startLine?: number;
794
+ startSide?: "LEFT" | "RIGHT";
795
+ };
796
+ type PrReviewSubmitInput = {
797
+ owner: string;
798
+ name: string;
799
+ prNumber: number;
800
+ event: PrReviewSubmitMutationVariables["event"];
801
+ body?: string;
802
+ comments?: DraftComment[];
803
+ };
804
+ type PrReviewSubmitData = {
805
+ id: string;
806
+ state: string;
807
+ url: string;
808
+ body: string | null;
809
+ };
810
+ type RepoLabelsListInput = RepoLabelsListQueryVariables;
811
+ type RepoLabelItemData = {
812
+ id: string | null;
813
+ name: string | null;
814
+ description: string | null;
815
+ color: string | null;
816
+ isDefault: boolean | null;
817
+ };
818
+ type RepoLabelsListData = {
819
+ items: RepoLabelItemData[];
820
+ pageInfo: {
821
+ hasNextPage: boolean;
822
+ endCursor: string | null;
823
+ };
824
+ };
825
+ type RepoIssueTypesListInput = RepoIssueTypesListQueryVariables;
826
+ type RepoIssueTypeItemData = {
827
+ id: string | null;
828
+ name: string | null;
829
+ color: string | null;
830
+ isEnabled: boolean | null;
831
+ };
832
+ type RepoIssueTypesListData = {
833
+ items: RepoIssueTypeItemData[];
834
+ pageInfo: {
835
+ hasNextPage: boolean;
836
+ endCursor: string | null;
837
+ };
838
+ };
839
+ type ReleaseViewInput = ReleaseViewQueryVariables;
840
+ type ReleaseViewData = {
841
+ id: number | null;
842
+ tagName: string;
843
+ name: string | null;
844
+ isDraft: boolean;
845
+ isPrerelease: boolean;
846
+ url: string | null;
847
+ targetCommitish: string | null;
848
+ createdAt: string | null;
849
+ publishedAt: string | null;
850
+ };
851
+ type ReleaseListInput = ReleaseListQueryVariables;
852
+ type ReleaseItemData = ReleaseViewData;
853
+ type ReleaseListData = {
854
+ items: ReleaseItemData[];
855
+ pageInfo: {
856
+ hasNextPage: boolean;
857
+ endCursor: string | null;
858
+ };
859
+ };
860
+ type ProjectV2OrgViewInput = ProjectV2OrgViewQueryVariables;
861
+ type ProjectV2OrgViewData = {
862
+ id: string | null;
863
+ title: string | null;
864
+ shortDescription: string | null;
865
+ public: boolean | null;
866
+ closed: boolean | null;
867
+ url: string | null;
868
+ };
869
+ type ProjectV2UserViewInput = ProjectV2UserViewQueryVariables;
870
+ type ProjectV2UserViewData = ProjectV2OrgViewData;
871
+ type ProjectV2FieldsListInput = ProjectV2FieldsListQueryVariables;
872
+ type ProjectV2FieldItemData = {
873
+ id: string | null;
874
+ name: string | null;
875
+ dataType: string | null;
876
+ options?: Array<{
877
+ id: string;
878
+ name: string;
879
+ }> | null;
880
+ };
881
+ type ProjectV2FieldsListData = {
882
+ items: ProjectV2FieldItemData[];
883
+ pageInfo: {
884
+ hasNextPage: boolean;
885
+ endCursor: string | null;
886
+ };
887
+ };
888
+ type ProjectV2ItemsListInput = ProjectV2ItemsListQueryVariables;
889
+ type ProjectV2ItemData = {
890
+ id: string | null;
891
+ contentType: string | null;
892
+ contentNumber: number | null;
893
+ contentTitle: string | null;
894
+ };
895
+ type ProjectV2ItemsListData = {
896
+ items: ProjectV2ItemData[];
897
+ pageInfo: {
898
+ hasNextPage: boolean;
899
+ endCursor: string | null;
900
+ };
901
+ };
902
+ type PrCreateInput = {
903
+ owner: string;
904
+ name: string;
905
+ baseRefName: string;
906
+ headRefName: string;
907
+ title: string;
908
+ body?: string;
909
+ draft?: boolean;
910
+ };
911
+ type PrCreateData = {
912
+ number: number;
913
+ url: string;
914
+ title: string;
915
+ state: string;
916
+ draft: boolean;
917
+ };
918
+ type PrUpdateInput = {
919
+ owner: string;
920
+ name: string;
921
+ prNumber: number;
922
+ title?: string;
923
+ body?: string;
924
+ draft?: boolean;
925
+ };
926
+ type PrUpdateData = {
927
+ number: number;
928
+ url: string;
929
+ title: string;
930
+ state: string;
931
+ draft: boolean;
932
+ };
933
+ type PrMergeInput = {
934
+ owner: string;
935
+ name: string;
936
+ prNumber: number;
937
+ mergeMethod?: string;
938
+ deleteBranch?: boolean;
939
+ };
940
+ type PrMergeData = {
941
+ prNumber: number;
942
+ method: string;
943
+ isMethodAssumed: boolean;
944
+ queued: boolean;
945
+ deleteBranch: boolean;
946
+ };
947
+ type PrBranchUpdateInput = {
948
+ owner: string;
949
+ name: string;
950
+ prNumber: number;
951
+ updateMethod?: string;
952
+ };
953
+ type PrBranchUpdateData = {
954
+ prNumber: number;
955
+ updated: boolean;
956
+ };
957
+ type PrAssigneesInput = {
958
+ owner: string;
959
+ name: string;
960
+ prNumber: number;
961
+ assignees: string[];
962
+ };
963
+ type PrAssigneesAddInput = PrAssigneesInput;
964
+ type PrAssigneesRemoveInput = PrAssigneesInput;
965
+ type PrAssigneesAddData = {
966
+ prNumber: number;
967
+ added: string[];
968
+ };
969
+ type PrAssigneesRemoveData = {
970
+ prNumber: number;
971
+ removed: string[];
972
+ };
973
+ type PrReviewsRequestInput = {
974
+ owner: string;
975
+ name: string;
976
+ prNumber: number;
977
+ reviewers: string[];
978
+ };
979
+ type PrReviewsRequestData = {
980
+ prNumber: number;
981
+ reviewers: string[];
982
+ updated: boolean;
983
+ };
984
+ type ProjectV2ItemAddInput = {
985
+ owner: string;
986
+ projectNumber: number;
987
+ issueUrl: string;
988
+ };
989
+ type ProjectV2ItemAddData = {
990
+ itemId: string;
991
+ itemType: string | null;
992
+ };
993
+ type ProjectV2ItemRemoveInput = {
994
+ owner: string;
995
+ projectNumber: number;
996
+ itemId: string;
997
+ };
998
+ type ProjectV2ItemRemoveData = {
999
+ deletedItemId: string;
1000
+ };
1001
+ type ProjectV2ItemFieldUpdateInput = {
1002
+ projectId: string;
1003
+ itemId: string;
1004
+ fieldId: string;
1005
+ valueText?: string;
1006
+ valueNumber?: number;
1007
+ valueDate?: string;
1008
+ valueSingleSelectOptionId?: string;
1009
+ valueIterationId?: string;
1010
+ clear?: boolean;
1011
+ };
1012
+ type ProjectV2ItemFieldUpdateData = {
1013
+ itemId: string;
1014
+ };
1015
+
418
1016
  interface GithubClient extends GraphqlClient {
419
1017
  fetchRepoView(input: RepoViewInput): Promise<RepoViewData>;
420
1018
  fetchIssueCommentsList(input: IssueCommentsListInput): Promise<IssueCommentsListData>;
@@ -424,8 +1022,13 @@ interface GithubClient extends GraphqlClient {
424
1022
  reopenIssue(input: IssueMutationInput): Promise<IssueMutationData>;
425
1023
  deleteIssue(input: IssueMutationInput): Promise<IssueMutationData>;
426
1024
  updateIssueLabels(input: IssueLabelsUpdateInput): Promise<IssueLabelsUpdateData>;
1025
+ addIssueLabels(input: IssueLabelsAddInput): Promise<IssueLabelsAddData>;
1026
+ removeIssueLabels(input: IssueLabelsRemoveInput): Promise<IssueLabelsRemoveData>;
427
1027
  updateIssueAssignees(input: IssueAssigneesUpdateInput): Promise<IssueAssigneesUpdateData>;
1028
+ addIssueAssignees(input: IssueAssigneesAddInput): Promise<IssueAssigneesAddData>;
1029
+ removeIssueAssignees(input: IssueAssigneesRemoveInput): Promise<IssueAssigneesRemoveData>;
428
1030
  setIssueMilestone(input: IssueMilestoneSetInput): Promise<IssueMilestoneSetData>;
1031
+ clearIssueMilestone(input: IssueMilestoneClearInput): Promise<IssueMilestoneClearData>;
429
1032
  createIssueComment(input: IssueCommentCreateInput): Promise<IssueCommentCreateData>;
430
1033
  fetchIssueLinkedPrs(input: IssueLinkedPrsListInput): Promise<IssueLinkedPrsListData>;
431
1034
  fetchIssueRelations(input: IssueRelationsGetInput): Promise<IssueRelationsGetData>;
@@ -440,31 +1043,64 @@ interface GithubClient extends GraphqlClient {
440
1043
  fetchPrCommentsList(input: PrCommentsListInput): Promise<PrCommentsListData>;
441
1044
  fetchPrReviewsList(input: PrReviewsListInput): Promise<PrReviewsListData>;
442
1045
  fetchPrDiffListFiles(input: PrDiffListFilesInput): Promise<PrDiffListFilesData>;
1046
+ fetchPrMergeStatus(input: PrMergeStatusInput): Promise<PrMergeStatusData>;
443
1047
  replyToReviewThread(input: ReplyToReviewThreadInput): Promise<ReviewThreadMutationData>;
444
1048
  resolveReviewThread(input: ReviewThreadMutationInput): Promise<ReviewThreadMutationData>;
445
1049
  unresolveReviewThread(input: ReviewThreadMutationInput): Promise<ReviewThreadMutationData>;
1050
+ submitPrReview(input: PrReviewSubmitInput): Promise<PrReviewSubmitData>;
1051
+ fetchRepoLabelsList(input: RepoLabelsListInput): Promise<RepoLabelsListData>;
1052
+ fetchRepoIssueTypesList(input: RepoIssueTypesListInput): Promise<RepoIssueTypesListData>;
1053
+ fetchReleaseView(input: ReleaseViewInput): Promise<ReleaseViewData>;
1054
+ fetchReleaseList(input: ReleaseListInput): Promise<ReleaseListData>;
1055
+ fetchProjectV2OrgView(input: ProjectV2OrgViewInput): Promise<ProjectV2OrgViewData>;
1056
+ fetchProjectV2UserView(input: ProjectV2UserViewInput): Promise<ProjectV2UserViewData>;
1057
+ fetchProjectV2FieldsList(input: ProjectV2FieldsListInput): Promise<ProjectV2FieldsListData>;
1058
+ fetchProjectV2ItemsList(input: ProjectV2ItemsListInput): Promise<ProjectV2ItemsListData>;
1059
+ createPr(input: PrCreateInput): Promise<PrCreateData>;
1060
+ updatePr(input: PrUpdateInput): Promise<PrUpdateData>;
1061
+ mergePr(input: PrMergeInput): Promise<PrMergeData>;
1062
+ updatePrBranch(input: PrBranchUpdateInput): Promise<PrBranchUpdateData>;
1063
+ addPrAssignees(input: PrAssigneesAddInput): Promise<PrAssigneesAddData>;
1064
+ removePrAssignees(input: PrAssigneesRemoveInput): Promise<PrAssigneesRemoveData>;
1065
+ requestPrReviews(input: PrReviewsRequestInput): Promise<PrReviewsRequestData>;
1066
+ addProjectV2Item(input: ProjectV2ItemAddInput): Promise<ProjectV2ItemAddData>;
1067
+ removeProjectV2Item(input: ProjectV2ItemRemoveInput): Promise<ProjectV2ItemRemoveData>;
1068
+ updateProjectV2ItemField(input: ProjectV2ItemFieldUpdateInput): Promise<ProjectV2ItemFieldUpdateData>;
446
1069
  }
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
1070
  declare function createGithubClientFromToken(tokenOrOptions: string | TokenClientOptions): GithubClient;
457
1071
  declare function createGithubClient(transport: GraphqlTransport): GithubClient;
458
1072
 
1073
+ interface ResolutionCache {
1074
+ get(key: string): unknown | undefined;
1075
+ set(key: string, value: unknown): void;
1076
+ clear(): void;
1077
+ /** Current store size; may include expired entries due to lazy eviction. */
1078
+ readonly size: number;
1079
+ }
1080
+ interface ResolutionCacheOptions {
1081
+ /** Time-to-live in milliseconds. Default: 60 000 (1 min). */
1082
+ ttlMs?: number;
1083
+ /** Maximum number of cached entries. Default: 200. */
1084
+ maxEntries?: number;
1085
+ }
1086
+ declare function createResolutionCache(opts?: ResolutionCacheOptions): ResolutionCache;
1087
+ declare function buildCacheKey(operationName: string, variables: Record<string, unknown>): string;
1088
+
459
1089
  type ExecutionDeps = {
460
- githubClient: Pick<GithubClient, "fetchRepoView" | "fetchIssueCommentsList" | "fetchIssueList" | "fetchIssueView" | "fetchPrList" | "fetchPrView" | "fetchPrCommentsList" | "fetchPrReviewsList" | "fetchPrDiffListFiles" | "replyToReviewThread" | "resolveReviewThread" | "unresolveReviewThread">;
1090
+ githubClient: GithubClient;
461
1091
  githubToken?: string | null;
462
1092
  cliRunner?: CliCommandRunner;
463
1093
  ghCliAvailable?: boolean;
464
1094
  ghAuthenticated?: boolean;
465
1095
  skipGhPreflight?: boolean;
466
1096
  reason?: RouteReasonCode;
1097
+ resolutionCache?: ResolutionCache;
467
1098
  };
1099
+
468
1100
  declare function executeTask(request: TaskRequest, deps: ExecutionDeps): Promise<ResultEnvelope>;
1101
+ declare function executeTasks(requests: Array<{
1102
+ task: string;
1103
+ input: Record<string, unknown>;
1104
+ }>, deps: ExecutionDeps): Promise<ChainResultEnvelope>;
469
1105
 
470
- export { type CliCommandRunner, type GithubClient, type GraphqlClient, type GraphqlTransport, type OperationCard, ResultEnvelope, RouteReasonCode, RouteSource, type TaskRequest, type TokenClientOptions, createGithubClient, createGithubClientFromToken, createGraphqlClient, createSafeCliCommandRunner, executeTask, getOperationCard, listOperationCards };
1106
+ export { type AttemptMeta, type CapabilityExplanation, type CapabilityListItem, type ChainResultEnvelope, type ChainStatus, type ChainStepResult, type CliCommandRunner, type GithubClient, type GraphqlClient, type GraphqlError, type GraphqlRawResult, type GraphqlTransport, type OperationCard, type ResolutionCache, type ResolutionCacheOptions, type ResultEnvelope, type ResultError, type ResultMeta, type RouteReasonCode, type RouteSource, type TaskRequest, type TokenClientOptions, buildCacheKey, createExecuteTool, createGithubClient, createGithubClientFromToken, createGraphqlClient, createResolutionCache, createSafeCliCommandRunner, executeTask, executeTasks, explainCapability, getOperationCard, listCapabilities, listOperationCards };