@ghx-dev/core 0.1.1 → 0.2.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 (187) hide show
  1. package/.claude-plugin/plugin.json +21 -0
  2. package/README.md +17 -20
  3. package/dist/cards/issue.assignees.add.yaml +50 -0
  4. package/dist/cards/issue.assignees.remove.yaml +50 -0
  5. package/dist/cards/issue.assignees.set.yaml +47 -0
  6. package/dist/cards/issue.close.yaml +16 -2
  7. package/dist/cards/issue.comments.create.yaml +16 -2
  8. package/dist/cards/issue.create.yaml +11 -0
  9. package/dist/cards/issue.delete.yaml +16 -2
  10. package/dist/cards/issue.labels.add.yaml +48 -0
  11. package/dist/cards/issue.labels.remove.yaml +50 -0
  12. package/dist/cards/issue.labels.set.yaml +47 -0
  13. package/dist/cards/issue.milestone.clear.yaml +40 -0
  14. package/dist/cards/issue.milestone.set.yaml +23 -4
  15. package/dist/{core/registry/cards/issue.blocked_by.add.yaml → cards/issue.relations.blocked_by.add.yaml} +3 -2
  16. package/dist/cards/{issue.blocked_by.remove.yaml → issue.relations.blocked_by.remove.yaml} +1 -1
  17. package/dist/cards/{issue.parent.remove.yaml → issue.relations.parent.remove.yaml} +11 -1
  18. package/dist/{core/registry/cards/issue.parent.set.yaml → cards/issue.relations.parent.set.yaml} +3 -2
  19. package/dist/{core/registry/cards/issue.linked_prs.list.yaml → cards/issue.relations.prs.list.yaml} +1 -1
  20. package/dist/cards/{issue.relations.get.yaml → issue.relations.view.yaml} +1 -1
  21. package/dist/cards/issue.reopen.yaml +16 -2
  22. package/dist/cards/issue.update.yaml +16 -2
  23. package/dist/cards/issue.view.yaml +7 -5
  24. package/dist/cards/{pr.review.submit_approve.yaml → pr.assignees.add.yaml} +12 -9
  25. package/dist/cards/pr.assignees.remove.yaml +29 -0
  26. package/dist/{core/registry/cards/pr.status.checks.yaml → cards/pr.checks.list.yaml} +15 -2
  27. package/dist/{core/registry/cards/pr.checks.rerun_all.yaml → cards/pr.checks.rerun.all.yaml} +2 -4
  28. package/dist/{core/registry/cards/pr.checks.rerun_failed.yaml → cards/pr.checks.rerun.failed.yaml} +3 -5
  29. package/dist/cards/pr.create.yaml +30 -0
  30. package/dist/cards/{pr.diff.list_files.yaml → pr.diff.files.yaml} +1 -1
  31. package/dist/cards/{pr.ready_for_review.set.yaml → pr.diff.view.yaml} +6 -8
  32. package/dist/{core/registry/cards/pr.mergeability.view.yaml → cards/pr.merge.status.yaml} +6 -3
  33. package/dist/{core/registry/cards/pr.merge.execute.yaml → cards/pr.merge.yaml} +1 -1
  34. package/dist/cards/pr.reviews.list.yaml +1 -1
  35. package/dist/cards/{pr.reviewers.request.yaml → pr.reviews.request.yaml} +1 -1
  36. package/dist/cards/pr.reviews.submit.yaml +67 -0
  37. package/dist/cards/{pr.comments.list.yaml → pr.threads.list.yaml} +2 -2
  38. package/dist/cards/{pr.comment.reply.yaml → pr.threads.reply.yaml} +4 -2
  39. package/dist/cards/{pr.comment.resolve.yaml → pr.threads.resolve.yaml} +1 -1
  40. package/dist/cards/{pr.comment.unresolve.yaml → pr.threads.unresolve.yaml} +1 -1
  41. package/dist/cards/pr.update.yaml +29 -0
  42. package/dist/cards/pr.view.yaml +7 -5
  43. package/dist/cards/project_v2.fields.list.yaml +2 -2
  44. package/dist/{core/registry/cards/project_v2.item.field.update.yaml → cards/project_v2.items.field.update.yaml} +3 -3
  45. package/dist/{core/registry/cards/project_v2.item.add_issue.yaml → cards/project_v2.items.issue.add.yaml} +3 -3
  46. package/dist/cards/project_v2.items.issue.remove.yaml +23 -0
  47. package/dist/cards/project_v2.items.list.yaml +2 -2
  48. package/dist/{core/registry/cards/project_v2.org.get.yaml → cards/project_v2.org.view.yaml} +3 -3
  49. package/dist/cards/{project_v2.user.get.yaml → project_v2.user.view.yaml} +3 -3
  50. package/dist/{core/registry/cards/release.create_draft.yaml → cards/release.create.yaml} +1 -1
  51. package/dist/cards/{release.publish_draft.yaml → release.publish.yaml} +1 -1
  52. package/dist/{core/registry/cards/release.get.yaml → cards/release.view.yaml} +1 -1
  53. package/dist/cards/repo.issue_types.list.yaml +2 -2
  54. package/dist/cards/repo.view.yaml +2 -4
  55. package/dist/cards/{workflow_dispatch.run.yaml → workflow.dispatch.yaml} +1 -1
  56. package/dist/{core/registry/cards/workflow_job.logs.get.yaml → cards/workflow.job.logs.raw.yaml} +2 -2
  57. package/dist/{core/registry/cards/workflow_job.logs.analyze.yaml → cards/workflow.job.logs.view.yaml} +1 -1
  58. package/dist/{core/registry/cards/workflow_run.artifacts.list.yaml → cards/workflow.run.artifacts.list.yaml} +1 -1
  59. package/dist/cards/{workflow_run.cancel.yaml → workflow.run.cancel.yaml} +1 -1
  60. package/dist/cards/{workflow_run.rerun_all.yaml → workflow.run.rerun.all.yaml} +3 -3
  61. package/dist/{core/registry/cards/workflow_run.rerun_failed.yaml → cards/workflow.run.rerun.failed.yaml} +3 -3
  62. package/dist/{core/registry/cards/workflow_run.get.yaml → cards/workflow.run.view.yaml} +19 -4
  63. package/dist/cards/{workflow_runs.list.yaml → workflow.runs.list.yaml} +1 -1
  64. package/dist/cards/{workflow.get.yaml → workflow.view.yaml} +2 -2
  65. package/dist/chunk-3DU2WHXF.js +15 -0
  66. package/dist/chunk-3DU2WHXF.js.map +1 -0
  67. package/dist/chunk-3P3KHWFU.js +5779 -0
  68. package/dist/chunk-3P3KHWFU.js.map +1 -0
  69. package/dist/chunk-BIWBJA2F.js +228 -0
  70. package/dist/chunk-BIWBJA2F.js.map +1 -0
  71. package/dist/chunk-HEHONZTO.js +121 -0
  72. package/dist/chunk-HEHONZTO.js.map +1 -0
  73. package/dist/chunk-Q7RCIK2C.js +773 -0
  74. package/dist/chunk-Q7RCIK2C.js.map +1 -0
  75. package/dist/chunk-R3CBGJZX.js +12 -0
  76. package/dist/chunk-R3CBGJZX.js.map +1 -0
  77. package/dist/chunk-TDABI6C7.js +167 -0
  78. package/dist/chunk-TDABI6C7.js.map +1 -0
  79. package/dist/chunk-TPQYVCAS.js +15 -0
  80. package/dist/chunk-TPQYVCAS.js.map +1 -0
  81. package/dist/cli/index.js +202 -21
  82. package/dist/cli/index.js.map +1 -1
  83. package/dist/core/registry/cards/issue.assignees.add.yaml +50 -0
  84. package/dist/core/registry/cards/issue.assignees.remove.yaml +50 -0
  85. package/dist/core/registry/cards/issue.assignees.set.yaml +47 -0
  86. package/dist/core/registry/cards/issue.close.yaml +16 -2
  87. package/dist/core/registry/cards/issue.comments.create.yaml +16 -2
  88. package/dist/core/registry/cards/issue.create.yaml +11 -0
  89. package/dist/core/registry/cards/issue.delete.yaml +16 -2
  90. package/dist/core/registry/cards/issue.labels.add.yaml +48 -0
  91. package/dist/core/registry/cards/issue.labels.remove.yaml +50 -0
  92. package/dist/core/registry/cards/issue.labels.set.yaml +47 -0
  93. package/dist/core/registry/cards/issue.milestone.clear.yaml +40 -0
  94. package/dist/core/registry/cards/issue.milestone.set.yaml +23 -4
  95. package/dist/{cards/issue.blocked_by.add.yaml → core/registry/cards/issue.relations.blocked_by.add.yaml} +3 -2
  96. package/dist/core/registry/cards/{issue.blocked_by.remove.yaml → issue.relations.blocked_by.remove.yaml} +1 -1
  97. package/dist/core/registry/cards/{issue.parent.remove.yaml → issue.relations.parent.remove.yaml} +11 -1
  98. package/dist/{cards/issue.parent.set.yaml → core/registry/cards/issue.relations.parent.set.yaml} +3 -2
  99. package/dist/{cards/issue.linked_prs.list.yaml → core/registry/cards/issue.relations.prs.list.yaml} +1 -1
  100. package/dist/core/registry/cards/{issue.relations.get.yaml → issue.relations.view.yaml} +1 -1
  101. package/dist/core/registry/cards/issue.reopen.yaml +16 -2
  102. package/dist/core/registry/cards/issue.update.yaml +16 -2
  103. package/dist/core/registry/cards/issue.view.yaml +7 -5
  104. package/dist/core/registry/cards/pr.assignees.add.yaml +29 -0
  105. package/dist/core/registry/cards/pr.assignees.remove.yaml +29 -0
  106. package/dist/{cards/pr.status.checks.yaml → core/registry/cards/pr.checks.list.yaml} +15 -2
  107. package/dist/{cards/pr.checks.rerun_all.yaml → core/registry/cards/pr.checks.rerun.all.yaml} +2 -4
  108. package/dist/{cards/pr.checks.rerun_failed.yaml → core/registry/cards/pr.checks.rerun.failed.yaml} +3 -5
  109. package/dist/core/registry/cards/pr.create.yaml +30 -0
  110. package/dist/core/registry/cards/{pr.diff.list_files.yaml → pr.diff.files.yaml} +1 -1
  111. package/dist/core/registry/cards/{pr.ready_for_review.set.yaml → pr.diff.view.yaml} +6 -8
  112. package/dist/{cards/pr.mergeability.view.yaml → core/registry/cards/pr.merge.status.yaml} +6 -3
  113. package/dist/{cards/pr.merge.execute.yaml → core/registry/cards/pr.merge.yaml} +1 -1
  114. package/dist/core/registry/cards/pr.reviews.list.yaml +1 -1
  115. package/dist/core/registry/cards/{pr.reviewers.request.yaml → pr.reviews.request.yaml} +1 -1
  116. package/dist/core/registry/cards/pr.reviews.submit.yaml +67 -0
  117. package/dist/core/registry/cards/{pr.comments.list.yaml → pr.threads.list.yaml} +2 -2
  118. package/dist/core/registry/cards/{pr.comment.reply.yaml → pr.threads.reply.yaml} +4 -2
  119. package/dist/core/registry/cards/{pr.comment.resolve.yaml → pr.threads.resolve.yaml} +1 -1
  120. package/dist/core/registry/cards/{pr.comment.unresolve.yaml → pr.threads.unresolve.yaml} +1 -1
  121. package/dist/core/registry/cards/pr.update.yaml +29 -0
  122. package/dist/core/registry/cards/pr.view.yaml +7 -5
  123. package/dist/core/registry/cards/project_v2.fields.list.yaml +2 -2
  124. package/dist/{cards/project_v2.item.field.update.yaml → core/registry/cards/project_v2.items.field.update.yaml} +3 -3
  125. package/dist/{cards/project_v2.item.add_issue.yaml → core/registry/cards/project_v2.items.issue.add.yaml} +3 -3
  126. package/dist/core/registry/cards/project_v2.items.issue.remove.yaml +23 -0
  127. package/dist/core/registry/cards/project_v2.items.list.yaml +2 -2
  128. package/dist/{cards/project_v2.org.get.yaml → core/registry/cards/project_v2.org.view.yaml} +3 -3
  129. package/dist/core/registry/cards/{project_v2.user.get.yaml → project_v2.user.view.yaml} +3 -3
  130. package/dist/{cards/release.create_draft.yaml → core/registry/cards/release.create.yaml} +1 -1
  131. package/dist/core/registry/cards/{release.publish_draft.yaml → release.publish.yaml} +1 -1
  132. package/dist/{cards/release.get.yaml → core/registry/cards/release.view.yaml} +1 -1
  133. package/dist/core/registry/cards/repo.issue_types.list.yaml +2 -2
  134. package/dist/core/registry/cards/repo.view.yaml +2 -4
  135. package/dist/core/registry/cards/{workflow_dispatch.run.yaml → workflow.dispatch.yaml} +1 -1
  136. package/dist/{cards/workflow_job.logs.get.yaml → core/registry/cards/workflow.job.logs.raw.yaml} +2 -2
  137. package/dist/{cards/workflow_job.logs.analyze.yaml → core/registry/cards/workflow.job.logs.view.yaml} +1 -1
  138. package/dist/{cards/workflow_run.artifacts.list.yaml → core/registry/cards/workflow.run.artifacts.list.yaml} +1 -1
  139. package/dist/core/registry/cards/{workflow_run.cancel.yaml → workflow.run.cancel.yaml} +1 -1
  140. package/dist/core/registry/cards/{workflow_run.rerun_all.yaml → workflow.run.rerun.all.yaml} +3 -3
  141. package/dist/{cards/workflow_run.rerun_failed.yaml → core/registry/cards/workflow.run.rerun.failed.yaml} +3 -3
  142. package/dist/{cards/workflow_run.get.yaml → core/registry/cards/workflow.run.view.yaml} +19 -4
  143. package/dist/core/registry/cards/{workflow_runs.list.yaml → workflow.runs.list.yaml} +1 -1
  144. package/dist/core/registry/cards/{workflow.get.yaml → workflow.view.yaml} +2 -2
  145. package/dist/index.d.ts +374 -35
  146. package/dist/index.js +33 -5
  147. package/dist/index.js.map +1 -1
  148. package/dist/issue-mutations-FJNZW7L5.js +668 -0
  149. package/dist/issue-mutations-FJNZW7L5.js.map +1 -0
  150. package/dist/issue-queries-GRA4MKPD.js +208 -0
  151. package/dist/issue-queries-GRA4MKPD.js.map +1 -0
  152. package/dist/pr-mutations-UG67YOF5.js +344 -0
  153. package/dist/pr-mutations-UG67YOF5.js.map +1 -0
  154. package/dist/pr-queries-UOEOXIJQ.js +331 -0
  155. package/dist/pr-queries-UOEOXIJQ.js.map +1 -0
  156. package/dist/repo-JDUHFPZF.js +66 -0
  157. package/dist/repo-JDUHFPZF.js.map +1 -0
  158. package/package.json +18 -18
  159. package/skills/using-ghx/SKILL.md +61 -0
  160. package/dist/agent.d.ts +0 -32
  161. package/dist/agent.js +0 -38
  162. package/dist/agent.js.map +0 -1
  163. package/dist/cards/check_run.annotations.list.yaml +0 -35
  164. package/dist/cards/issue.assignees.update.yaml +0 -27
  165. package/dist/cards/issue.labels.update.yaml +0 -27
  166. package/dist/cards/pr.assignees.update.yaml +0 -38
  167. package/dist/cards/pr.checks.get_failed.yaml +0 -42
  168. package/dist/cards/pr.review.submit_comment.yaml +0 -26
  169. package/dist/cards/pr.review.submit_request_changes.yaml +0 -26
  170. package/dist/cards/workflow_run.jobs.list.yaml +0 -35
  171. package/dist/chunk-OL4ARD3R.js +0 -242
  172. package/dist/chunk-OL4ARD3R.js.map +0 -1
  173. package/dist/chunk-PJ2JKKQE.js +0 -4148
  174. package/dist/chunk-PJ2JKKQE.js.map +0 -1
  175. package/dist/chunk-SCIJMW5P.js +0 -54
  176. package/dist/chunk-SCIJMW5P.js.map +0 -1
  177. package/dist/cli/assets/skills/ghx/SKILL.md +0 -57
  178. package/dist/core/registry/cards/check_run.annotations.list.yaml +0 -35
  179. package/dist/core/registry/cards/issue.assignees.update.yaml +0 -27
  180. package/dist/core/registry/cards/issue.labels.update.yaml +0 -27
  181. package/dist/core/registry/cards/pr.assignees.update.yaml +0 -38
  182. package/dist/core/registry/cards/pr.checks.get_failed.yaml +0 -42
  183. package/dist/core/registry/cards/pr.review.submit_approve.yaml +0 -26
  184. package/dist/core/registry/cards/pr.review.submit_comment.yaml +0 -26
  185. package/dist/core/registry/cards/pr.review.submit_request_changes.yaml +0 -26
  186. package/dist/core/registry/cards/workflow_run.jobs.list.yaml +0 -35
  187. package/dist/envelope-BpF6MNCv.d.ts +0 -55
@@ -1,54 +0,0 @@
1
- import {
2
- getOperationCard,
3
- listOperationCards
4
- } from "./chunk-OL4ARD3R.js";
5
-
6
- // src/agent-interface/tools/explain-tool.ts
7
- function extractRequiredInputs(inputSchema) {
8
- if (!inputSchema || typeof inputSchema !== "object") {
9
- return [];
10
- }
11
- const required = inputSchema.required;
12
- if (!Array.isArray(required)) {
13
- return [];
14
- }
15
- return required.filter((entry) => typeof entry === "string");
16
- }
17
- function extractOutputFields(outputSchema) {
18
- if (!outputSchema || typeof outputSchema !== "object") {
19
- return [];
20
- }
21
- const properties = outputSchema.properties;
22
- if (!properties || typeof properties !== "object") {
23
- return [];
24
- }
25
- return Object.keys(properties);
26
- }
27
- function explainCapability(capabilityId) {
28
- const card = getOperationCard(capabilityId);
29
- if (!card) {
30
- throw new Error(`Unknown capability: ${capabilityId}`);
31
- }
32
- return {
33
- capability_id: card.capability_id,
34
- purpose: card.description,
35
- required_inputs: extractRequiredInputs(card.input_schema),
36
- preferred_route: card.routing.preferred,
37
- fallback_routes: [...card.routing.fallbacks],
38
- output_fields: extractOutputFields(card.output_schema)
39
- };
40
- }
41
-
42
- // src/agent-interface/tools/list-capabilities-tool.ts
43
- function listCapabilities() {
44
- return listOperationCards().map((card) => ({
45
- capability_id: card.capability_id,
46
- description: card.description
47
- }));
48
- }
49
-
50
- export {
51
- explainCapability,
52
- listCapabilities
53
- };
54
- //# sourceMappingURL=chunk-SCIJMW5P.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/agent-interface/tools/explain-tool.ts","../src/agent-interface/tools/list-capabilities-tool.ts"],"sourcesContent":["import { getOperationCard } from \"../../core/registry/index.js\"\n\nexport type CapabilityExplanation = {\n capability_id: string\n purpose: string\n required_inputs: string[]\n preferred_route: \"cli\" | \"graphql\" | \"rest\"\n fallback_routes: Array<\"cli\" | \"graphql\" | \"rest\">\n output_fields: string[]\n}\n\nfunction extractRequiredInputs(inputSchema: Record<string, unknown> | null | undefined): string[] {\n if (!inputSchema || typeof inputSchema !== \"object\") {\n return []\n }\n\n const required = (inputSchema as Record<string, unknown>).required\n if (!Array.isArray(required)) {\n return []\n }\n\n return required.filter((entry): entry is string => typeof entry === \"string\")\n}\n\nfunction extractOutputFields(outputSchema: Record<string, unknown> | null | undefined): string[] {\n if (!outputSchema || typeof outputSchema !== \"object\") {\n return []\n }\n\n const properties = (outputSchema as Record<string, unknown>).properties\n if (!properties || typeof properties !== \"object\") {\n return []\n }\n\n return Object.keys(properties)\n}\n\nexport function explainCapability(capabilityId: string): CapabilityExplanation {\n const card = getOperationCard(capabilityId)\n if (!card) {\n throw new Error(`Unknown capability: ${capabilityId}`)\n }\n\n return {\n capability_id: card.capability_id,\n purpose: card.description,\n required_inputs: extractRequiredInputs(card.input_schema),\n preferred_route: card.routing.preferred,\n fallback_routes: [...card.routing.fallbacks],\n output_fields: extractOutputFields(card.output_schema),\n }\n}\n","import { listOperationCards } from \"../../core/registry/index.js\"\n\nexport type CapabilityListItem = {\n capability_id: string\n description: string\n}\n\nexport function listCapabilities(): CapabilityListItem[] {\n return listOperationCards().map((card) => ({\n capability_id: card.capability_id,\n description: card.description,\n }))\n}\n"],"mappings":";;;;;;AAWA,SAAS,sBAAsB,aAAmE;AAChG,MAAI,CAAC,eAAe,OAAO,gBAAgB,UAAU;AACnD,WAAO,CAAC;AAAA,EACV;AAEA,QAAM,WAAY,YAAwC;AAC1D,MAAI,CAAC,MAAM,QAAQ,QAAQ,GAAG;AAC5B,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,SAAS,OAAO,CAAC,UAA2B,OAAO,UAAU,QAAQ;AAC9E;AAEA,SAAS,oBAAoB,cAAoE;AAC/F,MAAI,CAAC,gBAAgB,OAAO,iBAAiB,UAAU;AACrD,WAAO,CAAC;AAAA,EACV;AAEA,QAAM,aAAc,aAAyC;AAC7D,MAAI,CAAC,cAAc,OAAO,eAAe,UAAU;AACjD,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,OAAO,KAAK,UAAU;AAC/B;AAEO,SAAS,kBAAkB,cAA6C;AAC7E,QAAM,OAAO,iBAAiB,YAAY;AAC1C,MAAI,CAAC,MAAM;AACT,UAAM,IAAI,MAAM,uBAAuB,YAAY,EAAE;AAAA,EACvD;AAEA,SAAO;AAAA,IACL,eAAe,KAAK;AAAA,IACpB,SAAS,KAAK;AAAA,IACd,iBAAiB,sBAAsB,KAAK,YAAY;AAAA,IACxD,iBAAiB,KAAK,QAAQ;AAAA,IAC9B,iBAAiB,CAAC,GAAG,KAAK,QAAQ,SAAS;AAAA,IAC3C,eAAe,oBAAoB,KAAK,aAAa;AAAA,EACvD;AACF;;;AC5CO,SAAS,mBAAyC;AACvD,SAAO,mBAAmB,EAAE,IAAI,CAAC,UAAU;AAAA,IACzC,eAAe,KAAK;AAAA,IACpB,aAAa,KAAK;AAAA,EACpB,EAAE;AACJ;","names":[]}
@@ -1,57 +0,0 @@
1
- # ghx CLI Skill
2
-
3
- Use `ghx` as the default interface for supported GitHub operations.
4
-
5
- ## Session Bootstrap (run once)
6
-
7
- ```bash
8
- gh auth status
9
- ghx capabilities list
10
- ```
11
-
12
- If authentication fails, stop and request authentication before continuing.
13
-
14
- ## Workflow
15
-
16
- 1. Choose a capability from `ghx capabilities list`.
17
- 2. If required inputs are unclear, inspect the capability:
18
-
19
- ```bash
20
- ghx capabilities explain <capability_id>
21
- ```
22
-
23
- 3. Execute with structured JSON input:
24
-
25
- ```bash
26
- ghx run <capability_id> --input '<json>'
27
- ```
28
-
29
- ## Result Handling Rules
30
-
31
- `ghx run` returns a result envelope: `{ ok, data, error, meta }`.
32
-
33
- - Check `ok` first.
34
- - If `ok=true`, use `data`.
35
- - If `ok=false`, read `error.code` and `error.message`.
36
- - If `error.retryable=true`, retry once.
37
- - For supported operations, do not parse raw `gh` output.
38
-
39
- ## Input Conventions
40
-
41
- - Repository identity is `owner` + `name`.
42
- - Do not guess input fields; run `ghx capabilities explain <capability_id>`.
43
-
44
- ## Examples
45
-
46
- ```bash
47
- ghx run repo.view --input '{"owner":"octocat","name":"hello-world"}'
48
- ghx run issue.create --input '{"owner":"octocat","name":"hello-world","title":"Bug report","body":"Steps to reproduce"}'
49
- ghx run pr.view --input '{"owner":"octocat","name":"hello-world","prNumber":42}'
50
- ghx run pr.checks.get_failed --input '{"owner":"octocat","name":"hello-world","prNumber":42}'
51
- ```
52
-
53
- ## Guardrails
54
-
55
- - Prefer `ghx` over direct `gh` or API calls for supported operations.
56
- - Treat `meta.route_used` as informational only.
57
- - If a required input is unknown, ask the user instead of guessing.
@@ -1,35 +0,0 @@
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
@@ -1,27 +0,0 @@
1
- capability_id: issue.assignees.update
2
- version: "1.0.0"
3
- description: Replace issue assignees.
4
- input_schema:
5
- type: object
6
- required: [issueId, assignees]
7
- properties:
8
- issueId: { type: string, minLength: 1 }
9
- assignees:
10
- type: array
11
- items: { type: string, minLength: 1 }
12
- additionalProperties: false
13
- output_schema:
14
- type: object
15
- required: [id, assignees]
16
- properties:
17
- id: { type: string, minLength: 1 }
18
- assignees:
19
- type: array
20
- items: { type: string, minLength: 1 }
21
- additionalProperties: false
22
- routing:
23
- preferred: graphql
24
- fallbacks: []
25
- graphql:
26
- operationName: IssueAssigneesUpdate
27
- documentPath: src/gql/operations/issue-assignees-update.graphql
@@ -1,27 +0,0 @@
1
- capability_id: issue.labels.update
2
- version: "1.0.0"
3
- description: Replace issue labels.
4
- input_schema:
5
- type: object
6
- required: [issueId, labels]
7
- properties:
8
- issueId: { type: string, minLength: 1 }
9
- labels:
10
- type: array
11
- items: { type: string, minLength: 1 }
12
- additionalProperties: false
13
- output_schema:
14
- type: object
15
- required: [id, labels]
16
- properties:
17
- id: { type: string, minLength: 1 }
18
- labels:
19
- type: array
20
- items: { type: string, minLength: 1 }
21
- additionalProperties: false
22
- routing:
23
- preferred: graphql
24
- fallbacks: []
25
- graphql:
26
- operationName: IssueLabelsUpdate
27
- documentPath: src/gql/operations/issue-labels-update.graphql
@@ -1,38 +0,0 @@
1
- capability_id: pr.assignees.update
2
- version: "1.0.0"
3
- description: Update pull request assignees.
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
- add:
12
- type: array
13
- items: { type: string, minLength: 1 }
14
- remove:
15
- type: array
16
- items: { type: string, minLength: 1 }
17
- anyOf:
18
- - required: [add]
19
- - required: [remove]
20
- additionalProperties: false
21
- output_schema:
22
- type: object
23
- required: [prNumber, add, remove, updated]
24
- properties:
25
- prNumber: { type: integer, minimum: 1 }
26
- add:
27
- type: array
28
- items: { type: string, minLength: 1 }
29
- remove:
30
- type: array
31
- items: { type: string, minLength: 1 }
32
- updated: { type: boolean }
33
- additionalProperties: false
34
- routing:
35
- preferred: cli
36
- fallbacks: []
37
- cli:
38
- command: pr edit
@@ -1,42 +0,0 @@
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]
@@ -1,26 +0,0 @@
1
- capability_id: pr.review.submit_approve
2
- version: "1.0.0"
3
- description: Submit an approving pull request review.
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
- body: { type: string, minLength: 1 }
12
- additionalProperties: false
13
- output_schema:
14
- type: object
15
- required: [prNumber, event, submitted, body]
16
- properties:
17
- prNumber: { type: integer, minimum: 1 }
18
- event: { type: string, const: APPROVE }
19
- submitted: { type: boolean }
20
- body: { type: [string, "null"] }
21
- additionalProperties: false
22
- routing:
23
- preferred: cli
24
- fallbacks: []
25
- cli:
26
- command: pr review
@@ -1,26 +0,0 @@
1
- capability_id: pr.review.submit_comment
2
- version: "1.0.0"
3
- description: Submit a comment-only pull request review.
4
- input_schema:
5
- type: object
6
- required: [owner, name, prNumber, body]
7
- properties:
8
- owner: { type: string, minLength: 1 }
9
- name: { type: string, minLength: 1 }
10
- prNumber: { type: integer, minimum: 1 }
11
- body: { type: string, minLength: 1 }
12
- additionalProperties: false
13
- output_schema:
14
- type: object
15
- required: [prNumber, event, submitted, body]
16
- properties:
17
- prNumber: { type: integer, minimum: 1 }
18
- event: { type: string, const: COMMENT }
19
- submitted: { type: boolean }
20
- body: { type: string, minLength: 1 }
21
- additionalProperties: false
22
- routing:
23
- preferred: cli
24
- fallbacks: []
25
- cli:
26
- command: pr review
@@ -1,26 +0,0 @@
1
- capability_id: pr.review.submit_request_changes
2
- version: "1.0.0"
3
- description: Submit a pull request review requesting changes.
4
- input_schema:
5
- type: object
6
- required: [owner, name, prNumber, body]
7
- properties:
8
- owner: { type: string, minLength: 1 }
9
- name: { type: string, minLength: 1 }
10
- prNumber: { type: integer, minimum: 1 }
11
- body: { type: string, minLength: 1 }
12
- additionalProperties: false
13
- output_schema:
14
- type: object
15
- required: [prNumber, event, submitted, body]
16
- properties:
17
- prNumber: { type: integer, minimum: 1 }
18
- event: { type: string, const: REQUEST_CHANGES }
19
- submitted: { type: boolean }
20
- body: { type: string, minLength: 1 }
21
- additionalProperties: false
22
- routing:
23
- preferred: cli
24
- fallbacks: []
25
- cli:
26
- command: pr review
@@ -1,35 +0,0 @@
1
- capability_id: workflow_run.jobs.list
2
- version: "1.0.0"
3
- description: List jobs in a workflow run.
4
- input_schema:
5
- type: object
6
- required: [owner, name, runId]
7
- properties:
8
- owner: { type: string, minLength: 1 }
9
- name: { type: string, minLength: 1 }
10
- runId: { 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: [id, name, status, conclusion, startedAt, completedAt, url]
21
- properties:
22
- id: { type: integer, minimum: 0 }
23
- name: { type: [string, "null"] }
24
- status: { type: [string, "null"] }
25
- conclusion: { type: [string, "null"] }
26
- startedAt: { type: [string, "null"] }
27
- completedAt: { type: [string, "null"] }
28
- url: { type: [string, "null"] }
29
- additionalProperties: false
30
- additionalProperties: false
31
- routing:
32
- preferred: cli
33
- fallbacks: []
34
- cli:
35
- command: run view
@@ -1,55 +0,0 @@
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];
15
-
16
- type RouteSource = "cli" | "rest" | "graphql";
17
- interface ResultError {
18
- code: ErrorCode;
19
- message: string;
20
- retryable: boolean;
21
- details?: Record<string, unknown>;
22
- }
23
- interface AttemptMeta {
24
- route: RouteSource;
25
- status: "success" | "error" | "skipped";
26
- error_code?: ErrorCode;
27
- duration_ms?: number;
28
- }
29
- interface ResultMeta {
30
- capability_id: string;
31
- route_used?: RouteSource;
32
- reason?: RouteReasonCode;
33
- attempts?: AttemptMeta[];
34
- pagination?: {
35
- has_next_page?: boolean;
36
- end_cursor?: string;
37
- next?: unknown;
38
- };
39
- timings?: {
40
- total_ms?: number;
41
- adapter_ms?: number;
42
- };
43
- cost?: {
44
- tokens_in?: number;
45
- tokens_out?: number;
46
- };
47
- }
48
- interface ResultEnvelope<TData = unknown> {
49
- ok: boolean;
50
- data?: TData;
51
- error?: ResultError;
52
- meta: ResultMeta;
53
- }
54
-
55
- export type { AttemptMeta as A, ResultEnvelope as R, RouteSource as a, RouteReasonCode as b, ResultError as c, ResultMeta as d };