@arii/boomtick-mcp 0.4.1 → 0.5.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 (163) hide show
  1. package/.mcp/schemas/boomtick.health.json +14 -10
  2. package/.mcp/schemas/boomtick_health.json +16 -0
  3. package/.mcp/schemas/github.checkout_branch.json +28 -24
  4. package/.mcp/schemas/github.comment_triage_summary.json +21 -17
  5. package/.mcp/schemas/github.create_issue.json +55 -50
  6. package/.mcp/schemas/github.create_pull_request.json +53 -48
  7. package/.mcp/schemas/github.get_merge_conflict_files.json +21 -17
  8. package/.mcp/schemas/github.get_pr.json +30 -12
  9. package/.mcp/schemas/github.get_pr_commits.json +32 -0
  10. package/.mcp/schemas/github.get_pr_diff.json +30 -12
  11. package/.mcp/schemas/github.get_pr_reviews.json +32 -0
  12. package/.mcp/schemas/github.issue_comment.json +35 -17
  13. package/.mcp/schemas/github.issue_update.json +114 -96
  14. package/.mcp/schemas/github.issue_view.json +30 -12
  15. package/.mcp/schemas/github.open_replacement_pr.json +64 -60
  16. package/.mcp/schemas/github.search_open_prs.json +61 -43
  17. package/.mcp/schemas/github_checkout_branch.json +31 -0
  18. package/.mcp/schemas/github_comment_triage_summary.json +24 -0
  19. package/.mcp/schemas/github_create_issue.json +58 -0
  20. package/.mcp/schemas/github_create_pull_request.json +56 -0
  21. package/.mcp/schemas/github_get_merge_conflict_files.json +24 -0
  22. package/.mcp/schemas/github_get_pr.json +32 -0
  23. package/.mcp/schemas/github_get_pr_commits.json +32 -0
  24. package/.mcp/schemas/github_get_pr_diff.json +32 -0
  25. package/.mcp/schemas/github_get_pr_reviews.json +32 -0
  26. package/.mcp/schemas/github_issue_comment.json +38 -0
  27. package/.mcp/schemas/github_issue_update.json +123 -0
  28. package/.mcp/schemas/github_issue_view.json +32 -0
  29. package/.mcp/schemas/github_open_replacement_pr.json +67 -0
  30. package/.mcp/schemas/github_search_open_prs.json +65 -0
  31. package/.mcp/schemas/jules.cancel_session.json +16 -12
  32. package/.mcp/schemas/jules.create_session.json +41 -37
  33. package/.mcp/schemas/jules.get_messages.json +16 -12
  34. package/.mcp/schemas/jules.get_pr.json +16 -12
  35. package/.mcp/schemas/jules.get_session.json +16 -12
  36. package/.mcp/schemas/jules.list_sessions.json +33 -29
  37. package/.mcp/schemas/jules.send_message.json +30 -26
  38. package/.mcp/schemas/jules.trigger_feedback.json +16 -12
  39. package/.mcp/schemas/jules_cancel_session.json +18 -0
  40. package/.mcp/schemas/jules_create_session.json +44 -0
  41. package/.mcp/schemas/jules_get_messages.json +18 -0
  42. package/.mcp/schemas/jules_get_pr.json +18 -0
  43. package/.mcp/schemas/jules_get_session.json +18 -0
  44. package/.mcp/schemas/jules_list_sessions.json +36 -0
  45. package/.mcp/schemas/jules_send_message.json +35 -0
  46. package/.mcp/schemas/jules_trigger_feedback.json +18 -0
  47. package/.mcp/schemas/repo.commit_patch.json +34 -30
  48. package/.mcp/schemas/repo.create_branch.json +21 -17
  49. package/.mcp/schemas/repo.create_repair_branch.json +34 -30
  50. package/.mcp/schemas/repo.get_changed_files.json +19 -15
  51. package/.mcp/schemas/repo.get_command_schema.json +16 -12
  52. package/.mcp/schemas/repo.get_package_scripts.json +21 -17
  53. package/.mcp/schemas/repo.get_workflow_runs.json +50 -0
  54. package/.mcp/schemas/repo.logs.json +42 -24
  55. package/.mcp/schemas/repo.read_agent_context.json +7 -3
  56. package/.mcp/schemas/repo.read_ci_logs.json +35 -17
  57. package/.mcp/schemas/repo.run_tests.json +40 -36
  58. package/.mcp/schemas/repo_commit_patch.json +39 -0
  59. package/.mcp/schemas/repo_create_branch.json +24 -0
  60. package/.mcp/schemas/repo_create_repair_branch.json +37 -0
  61. package/.mcp/schemas/repo_get_changed_files.json +22 -0
  62. package/.mcp/schemas/repo_get_command_schema.json +18 -0
  63. package/.mcp/schemas/repo_get_package_scripts.json +23 -0
  64. package/.mcp/schemas/repo_get_workflow_runs.json +50 -0
  65. package/.mcp/schemas/repo_logs.json +45 -0
  66. package/.mcp/schemas/repo_read_agent_context.json +9 -0
  67. package/.mcp/schemas/repo_read_ci_logs.json +38 -0
  68. package/.mcp/schemas/repo_run_tests.json +45 -0
  69. package/CHANGELOG.md +16 -0
  70. package/README.md +0 -1
  71. package/actions/impact-analysis/action.yml +4 -16
  72. package/actions/run-project-gate/action.yml +2 -9
  73. package/actions/test-build/action.yml +1 -19
  74. package/dist/lib/git.js +74 -0
  75. package/dist/lib/git.test.js +82 -0
  76. package/dist/lib/param_utils.js +35 -0
  77. package/dist/lib/param_utils.test.js +44 -0
  78. package/dist/mcp/definitions.js +27 -40
  79. package/dist/mcp/schemas.test.js +28 -0
  80. package/dist/mcp/server.js +64 -74
  81. package/dist/mcp/server.test.js +0 -33
  82. package/dist/tools/contract.js +229 -10
  83. package/dist/tools/github.create_issue.js +3 -2
  84. package/dist/tools/github.create_issue.test.js +10 -0
  85. package/dist/tools/github.create_pull_request.js +4 -4
  86. package/dist/tools/github.get_merge_conflict_files.js +10 -18
  87. package/dist/tools/github.get_pr.js +4 -1
  88. package/dist/tools/github.get_pr_commits.js +21 -0
  89. package/dist/tools/github.get_pr_diff.js +6 -2
  90. package/dist/tools/github.get_pr_reviews.js +21 -0
  91. package/dist/tools/github.get_pr_reviews.test.js +99 -0
  92. package/dist/tools/github.issue_comment.js +8 -1
  93. package/dist/tools/github.issue_update.js +3 -0
  94. package/dist/tools/github.issue_view.js +4 -1
  95. package/dist/tools/github.search_open_prs.js +4 -0
  96. package/dist/tools/jules/create-session.js +1 -2
  97. package/dist/tools/jules/get-pr.js +1 -2
  98. package/dist/tools/jules/get-session.js +1 -2
  99. package/dist/tools/jules/shared.js +24 -0
  100. package/dist/tools/repo.commit_patch.js +30 -10
  101. package/dist/tools/repo.get_changed_files.js +2 -13
  102. package/dist/tools/repo.get_workflow_runs.js +29 -0
  103. package/dist/tools/repo.logs.js +5 -1
  104. package/dist/tools/repo.read_agent_context.js +27 -1
  105. package/dist/tools/repo.read_agent_context.test.js +1 -1
  106. package/dist/tools/repo.read_ci_logs.js +5 -1
  107. package/dist/tools/repo.run_tests.js +26 -4
  108. package/package.json +4 -7
  109. package/scripts/sync-mcp-schemas.ts +6 -1
  110. package/src/agents/verifier-agent.prompt.md +0 -4
  111. package/src/lib/git.test.ts +110 -0
  112. package/src/lib/git.ts +109 -0
  113. package/src/lib/param_utils.test.ts +49 -0
  114. package/src/lib/param_utils.ts +42 -0
  115. package/src/mcp/definitions.ts +30 -43
  116. package/src/mcp/schemas.test.ts +34 -0
  117. package/src/mcp/server.test.ts +0 -42
  118. package/src/mcp/server.ts +65 -75
  119. package/src/tools/contract.ts +241 -10
  120. package/src/tools/github.create_issue.test.ts +10 -0
  121. package/src/tools/github.create_issue.ts +3 -1
  122. package/src/tools/github.create_pull_request.ts +4 -5
  123. package/src/tools/github.get_merge_conflict_files.ts +10 -20
  124. package/src/tools/github.get_pr.ts +4 -1
  125. package/src/tools/github.get_pr_commits.ts +27 -0
  126. package/src/tools/github.get_pr_diff.ts +7 -2
  127. package/src/tools/github.get_pr_reviews.test.ts +110 -0
  128. package/src/tools/github.get_pr_reviews.ts +27 -0
  129. package/src/tools/github.issue_comment.ts +8 -1
  130. package/src/tools/github.issue_update.ts +4 -1
  131. package/src/tools/github.issue_view.ts +4 -1
  132. package/src/tools/github.search_open_prs.ts +4 -0
  133. package/src/tools/jules/create-session.ts +1 -2
  134. package/src/tools/jules/get-pr.ts +1 -2
  135. package/src/tools/jules/get-session.ts +1 -2
  136. package/src/tools/jules/shared.ts +35 -0
  137. package/src/tools/repo.commit_patch.ts +35 -11
  138. package/src/tools/repo.get_changed_files.ts +2 -16
  139. package/src/tools/repo.get_workflow_runs.ts +36 -0
  140. package/src/tools/repo.logs.ts +5 -1
  141. package/src/tools/repo.read_agent_context.test.ts +1 -1
  142. package/src/tools/repo.read_agent_context.ts +35 -1
  143. package/src/tools/repo.read_ci_logs.ts +5 -1
  144. package/src/tools/repo.run_tests.ts +28 -5
  145. package/.mcp/schemas/agent.search_ddgs.json +0 -27
  146. package/.mcp/schemas/repo.get_route_map.json +0 -19
  147. package/.mcp/schemas/repo.run_lighthouse.json +0 -25
  148. package/.mcp/schemas/repo.run_playwright.json +0 -32
  149. package/dist/lib/td-cli.js +0 -54
  150. package/dist/tools/ddgs.search.js +0 -50
  151. package/dist/tools/ddgs.search.test.js +0 -67
  152. package/dist/tools/ddgs_search.py +0 -23
  153. package/dist/tools/repo.get_route_map.js +0 -37
  154. package/dist/tools/repo.run_lighthouse.js +0 -37
  155. package/dist/tools/repo.run_playwright.js +0 -29
  156. package/scripts/export-mcp-schema.ts +0 -7
  157. package/src/lib/td-cli.ts +0 -73
  158. package/src/tools/ddgs.search.test.ts +0 -92
  159. package/src/tools/ddgs.search.ts +0 -58
  160. package/src/tools/ddgs_search.py +0 -23
  161. package/src/tools/repo.get_route_map.ts +0 -41
  162. package/src/tools/repo.run_lighthouse.ts +0 -40
  163. package/src/tools/repo.run_playwright.ts +0 -35
@@ -1179,7 +1179,7 @@ export const CreateBranchInputJsonSchema = {
1179
1179
  "title": "CreateBranchInput",
1180
1180
  "type": "object"
1181
1181
  };
1182
- export const CreateIssueInputSchema = z.object({ "title": z.string().min(1), "body": z.union([z.string().min(1), z.null()]).default(null), "file": z.union([z.string().min(1), z.null()]).default(null), "repo": z.union([z.string(), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1182
+ export const CreateIssueInputSchema = z.object({ "title": z.string().min(1), "body": z.union([z.string().min(1), z.null()]).default(null), "file": z.union([z.string().min(1), z.null()]).default(null), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1183
1183
  export const CreateIssueInputJsonSchema = {
1184
1184
  "properties": {
1185
1185
  "title": {
@@ -1216,6 +1216,7 @@ export const CreateIssueInputJsonSchema = {
1216
1216
  "repo": {
1217
1217
  "anyOf": [
1218
1218
  {
1219
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
1219
1220
  "type": "string"
1220
1221
  },
1221
1222
  {
@@ -1349,7 +1350,7 @@ export const CreateJulesSessionInputJsonSchema = {
1349
1350
  "title": "CreateJulesSessionInput",
1350
1351
  "type": "object"
1351
1352
  };
1352
- export const CreatePullRequestInputSchema = z.object({ "title": z.string().describe("PR Title."), "body": z.string().describe("Description of changes."), "head": z.string().describe("The branch containing changes to merge."), "base": z.string().describe("The target branch to merge into.").default("main"), "draft": z.boolean().describe("Whether to create the PR as a draft.").default(false), "repo": z.union([z.string(), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1353
+ export const CreatePullRequestInputSchema = z.object({ "title": z.string().describe("PR Title."), "body": z.string().describe("Description of changes."), "head": z.string().describe("The branch containing changes to merge."), "base": z.string().describe("The target branch to merge into.").default("main"), "draft": z.boolean().describe("Whether to create the PR as a draft.").default(false), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1353
1354
  export const CreatePullRequestInputJsonSchema = {
1354
1355
  "properties": {
1355
1356
  "title": {
@@ -1382,6 +1383,7 @@ export const CreatePullRequestInputJsonSchema = {
1382
1383
  "repo": {
1383
1384
  "anyOf": [
1384
1385
  {
1386
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
1385
1387
  "type": "string"
1386
1388
  },
1387
1389
  {
@@ -1510,13 +1512,56 @@ export const GetPackageScriptsInputJsonSchema = {
1510
1512
  "title": "GetPackageScriptsInput",
1511
1513
  "type": "object"
1512
1514
  };
1513
- export const GetPrDiffInputSchema = z.object({ "prNumber": z.number().int().describe("The number of the pull request to get the diff for.") });
1515
+ export const GetPrCommitsInputSchema = z.object({ "prNumber": z.number().int().describe("The number of the PR to list commits for."), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1516
+ export const GetPrCommitsInputJsonSchema = {
1517
+ "properties": {
1518
+ "prNumber": {
1519
+ "description": "The number of the PR to list commits for.",
1520
+ "title": "Prnumber",
1521
+ "type": "integer"
1522
+ },
1523
+ "repo": {
1524
+ "anyOf": [
1525
+ {
1526
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
1527
+ "type": "string"
1528
+ },
1529
+ {
1530
+ "type": "null"
1531
+ }
1532
+ ],
1533
+ "default": null,
1534
+ "description": "The target repository override (e.g. org/repo).",
1535
+ "title": "Repo"
1536
+ }
1537
+ },
1538
+ "required": [
1539
+ "prNumber"
1540
+ ],
1541
+ "title": "GetPrCommitsInput",
1542
+ "type": "object"
1543
+ };
1544
+ export const GetPrDiffInputSchema = z.object({ "prNumber": z.number().int().describe("The number of the pull request to get the diff for."), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1514
1545
  export const GetPrDiffInputJsonSchema = {
1515
1546
  "properties": {
1516
1547
  "prNumber": {
1517
1548
  "description": "The number of the pull request to get the diff for.",
1518
1549
  "title": "Prnumber",
1519
1550
  "type": "integer"
1551
+ },
1552
+ "repo": {
1553
+ "anyOf": [
1554
+ {
1555
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
1556
+ "type": "string"
1557
+ },
1558
+ {
1559
+ "type": "null"
1560
+ }
1561
+ ],
1562
+ "default": null,
1563
+ "description": "The target repository override (e.g. org/repo).",
1564
+ "title": "Repo"
1520
1565
  }
1521
1566
  },
1522
1567
  "required": [
@@ -1525,13 +1570,27 @@ export const GetPrDiffInputJsonSchema = {
1525
1570
  "title": "GetPrDiffInput",
1526
1571
  "type": "object"
1527
1572
  };
1528
- export const GetPrInputSchema = z.object({ "prNumber": z.number().int().describe("The number of the PR to view.") });
1573
+ export const GetPrInputSchema = z.object({ "prNumber": z.number().int().describe("The number of the PR to view."), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1529
1574
  export const GetPrInputJsonSchema = {
1530
1575
  "properties": {
1531
1576
  "prNumber": {
1532
1577
  "description": "The number of the PR to view.",
1533
1578
  "title": "Prnumber",
1534
1579
  "type": "integer"
1580
+ },
1581
+ "repo": {
1582
+ "anyOf": [
1583
+ {
1584
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
1585
+ "type": "string"
1586
+ },
1587
+ {
1588
+ "type": "null"
1589
+ }
1590
+ ],
1591
+ "default": null,
1592
+ "description": "The target repository override (e.g. org/repo).",
1593
+ "title": "Repo"
1535
1594
  }
1536
1595
  },
1537
1596
  "required": [
@@ -1540,6 +1599,35 @@ export const GetPrInputJsonSchema = {
1540
1599
  "title": "GetPrInput",
1541
1600
  "type": "object"
1542
1601
  };
1602
+ export const GetPrReviewsInputSchema = z.object({ "prNumber": z.number().int().describe("The number of the PR to view reviews for."), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1603
+ export const GetPrReviewsInputJsonSchema = {
1604
+ "properties": {
1605
+ "prNumber": {
1606
+ "description": "The number of the PR to view reviews for.",
1607
+ "title": "Prnumber",
1608
+ "type": "integer"
1609
+ },
1610
+ "repo": {
1611
+ "anyOf": [
1612
+ {
1613
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
1614
+ "type": "string"
1615
+ },
1616
+ {
1617
+ "type": "null"
1618
+ }
1619
+ ],
1620
+ "default": null,
1621
+ "description": "The target repository override (e.g. org/repo).",
1622
+ "title": "Repo"
1623
+ }
1624
+ },
1625
+ "required": [
1626
+ "prNumber"
1627
+ ],
1628
+ "title": "GetPrReviewsInput",
1629
+ "type": "object"
1630
+ };
1543
1631
  export const GetRouteMapInputSchema = z.object({ "includeStatic": z.union([z.boolean(), z.null()]).describe("Whether to include static assets in the route map.").default(null) });
1544
1632
  export const GetRouteMapInputJsonSchema = {
1545
1633
  "properties": {
@@ -1560,6 +1648,53 @@ export const GetRouteMapInputJsonSchema = {
1560
1648
  "title": "GetRouteMapInput",
1561
1649
  "type": "object"
1562
1650
  };
1651
+ export const GetWorkflowRunsInputSchema = z.object({ "branch": z.union([z.string(), z.null()]).describe("Filter workflow runs by branch name.").default(null), "event": z.union([z.string(), z.null()]).describe("Filter workflow runs by event (e.g. push, pull_request).").default(null), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1652
+ export const GetWorkflowRunsInputJsonSchema = {
1653
+ "properties": {
1654
+ "branch": {
1655
+ "anyOf": [
1656
+ {
1657
+ "type": "string"
1658
+ },
1659
+ {
1660
+ "type": "null"
1661
+ }
1662
+ ],
1663
+ "default": null,
1664
+ "description": "Filter workflow runs by branch name.",
1665
+ "title": "Branch"
1666
+ },
1667
+ "event": {
1668
+ "anyOf": [
1669
+ {
1670
+ "type": "string"
1671
+ },
1672
+ {
1673
+ "type": "null"
1674
+ }
1675
+ ],
1676
+ "default": null,
1677
+ "description": "Filter workflow runs by event (e.g. push, pull_request).",
1678
+ "title": "Event"
1679
+ },
1680
+ "repo": {
1681
+ "anyOf": [
1682
+ {
1683
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
1684
+ "type": "string"
1685
+ },
1686
+ {
1687
+ "type": "null"
1688
+ }
1689
+ ],
1690
+ "default": null,
1691
+ "description": "The target repository override (e.g. org/repo).",
1692
+ "title": "Repo"
1693
+ }
1694
+ },
1695
+ "title": "GetWorkflowRunsInput",
1696
+ "type": "object"
1697
+ };
1563
1698
  export const HealthCheckInputSchema = z.object({ "checkDeep": z.boolean().describe("Whether to perform a deep health check including external dependencies.").default(false) });
1564
1699
  export const HealthCheckInputJsonSchema = {
1565
1700
  "properties": {
@@ -1573,7 +1708,7 @@ export const HealthCheckInputJsonSchema = {
1573
1708
  "title": "HealthCheckInput",
1574
1709
  "type": "object"
1575
1710
  };
1576
- export const IssueCommentInputSchema = z.object({ "issueNumber": z.number().int().describe("The number of the issue to comment on."), "body": z.string().describe("The content of the comment.") });
1711
+ export const IssueCommentInputSchema = z.object({ "issueNumber": z.number().int().describe("The number of the issue to comment on."), "body": z.string().describe("The content of the comment."), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1577
1712
  export const IssueCommentInputJsonSchema = {
1578
1713
  "properties": {
1579
1714
  "issueNumber": {
@@ -1585,6 +1720,20 @@ export const IssueCommentInputJsonSchema = {
1585
1720
  "description": "The content of the comment.",
1586
1721
  "title": "Body",
1587
1722
  "type": "string"
1723
+ },
1724
+ "repo": {
1725
+ "anyOf": [
1726
+ {
1727
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
1728
+ "type": "string"
1729
+ },
1730
+ {
1731
+ "type": "null"
1732
+ }
1733
+ ],
1734
+ "default": null,
1735
+ "description": "The target repository override (e.g. org/repo).",
1736
+ "title": "Repo"
1588
1737
  }
1589
1738
  },
1590
1739
  "required": [
@@ -1623,7 +1772,7 @@ export const IssueSummaryJsonSchema = {
1623
1772
  "title": "IssueSummary",
1624
1773
  "type": "object"
1625
1774
  };
1626
- export const IssueUpdateInputSchema = z.object({ "issueNumber": z.number().int().describe("The number of the issue to update."), "body": z.union([z.string(), z.null()]).describe("The new body content for the issue.").default(null), "file": z.union([z.string(), z.null()]).describe("Path to file containing new issue body.").default(null), "labels": z.union([z.array(z.string()), z.null()]).describe("Comma-separated list of labels to set.").default(null), "addLabels": z.union([z.array(z.string()), z.null()]).describe("Comma-separated list of labels to add.").default(null), "removeLabels": z.union([z.array(z.string()), z.null()]).describe("Comma-separated list of labels to remove.").default(null), "state": z.union([z.enum(["open", "closed"]), z.null()]).describe("The state to set the issue to.").default(null) });
1775
+ export const IssueUpdateInputSchema = z.object({ "issueNumber": z.number().int().describe("The number of the issue to update."), "body": z.union([z.string(), z.null()]).describe("The new body content for the issue.").default(null), "file": z.union([z.string(), z.null()]).describe("Path to file containing new issue body.").default(null), "labels": z.union([z.array(z.string()), z.null()]).describe("Comma-separated list of labels to set.").default(null), "addLabels": z.union([z.array(z.string()), z.null()]).describe("Comma-separated list of labels to add.").default(null), "removeLabels": z.union([z.array(z.string()), z.null()]).describe("Comma-separated list of labels to remove.").default(null), "state": z.union([z.enum(["open", "closed"]), z.null()]).describe("The state to set the issue to.").default(null), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1627
1776
  export const IssueUpdateInputJsonSchema = {
1628
1777
  "properties": {
1629
1778
  "issueNumber": {
@@ -1721,6 +1870,20 @@ export const IssueUpdateInputJsonSchema = {
1721
1870
  "default": null,
1722
1871
  "description": "The state to set the issue to.",
1723
1872
  "title": "State"
1873
+ },
1874
+ "repo": {
1875
+ "anyOf": [
1876
+ {
1877
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
1878
+ "type": "string"
1879
+ },
1880
+ {
1881
+ "type": "null"
1882
+ }
1883
+ ],
1884
+ "default": null,
1885
+ "description": "The target repository override (e.g. org/repo).",
1886
+ "title": "Repo"
1724
1887
  }
1725
1888
  },
1726
1889
  "required": [
@@ -1804,13 +1967,27 @@ export const IssueUpdateResponseJsonSchema = {
1804
1967
  "title": "IssueUpdateResponse",
1805
1968
  "type": "object"
1806
1969
  };
1807
- export const IssueViewInputSchema = z.object({ "issueNumber": z.number().int().describe("The number of the issue to view.") });
1970
+ export const IssueViewInputSchema = z.object({ "issueNumber": z.number().int().describe("The number of the issue to view."), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
1808
1971
  export const IssueViewInputJsonSchema = {
1809
1972
  "properties": {
1810
1973
  "issueNumber": {
1811
1974
  "description": "The number of the issue to view.",
1812
1975
  "title": "Issuenumber",
1813
1976
  "type": "integer"
1977
+ },
1978
+ "repo": {
1979
+ "anyOf": [
1980
+ {
1981
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
1982
+ "type": "string"
1983
+ },
1984
+ {
1985
+ "type": "null"
1986
+ }
1987
+ ],
1988
+ "default": null,
1989
+ "description": "The target repository override (e.g. org/repo).",
1990
+ "title": "Repo"
1814
1991
  }
1815
1992
  },
1816
1993
  "required": [
@@ -2117,7 +2294,7 @@ export const ReadAgentContextInputJsonSchema = {
2117
2294
  "title": "ReadAgentContextInput",
2118
2295
  "type": "object"
2119
2296
  };
2120
- export const ReadCiLogsInputSchema = z.object({ "prNumber": z.number().int().describe("The number of the pull request to read logs for."), "all": z.boolean().describe("Include logs for successful runs (default: false).").default(false) });
2297
+ export const ReadCiLogsInputSchema = z.object({ "prNumber": z.number().int().describe("The number of the pull request to read logs for."), "all": z.boolean().describe("Include logs for successful runs (default: false).").default(false), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
2121
2298
  export const ReadCiLogsInputJsonSchema = {
2122
2299
  "properties": {
2123
2300
  "prNumber": {
@@ -2130,6 +2307,20 @@ export const ReadCiLogsInputJsonSchema = {
2130
2307
  "description": "Include logs for successful runs (default: false).",
2131
2308
  "title": "All",
2132
2309
  "type": "boolean"
2310
+ },
2311
+ "repo": {
2312
+ "anyOf": [
2313
+ {
2314
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
2315
+ "type": "string"
2316
+ },
2317
+ {
2318
+ "type": "null"
2319
+ }
2320
+ ],
2321
+ "default": null,
2322
+ "description": "The target repository override (e.g. org/repo).",
2323
+ "title": "Repo"
2133
2324
  }
2134
2325
  },
2135
2326
  "required": [
@@ -2301,7 +2492,7 @@ export const ReadPRCommentsResponseJsonSchema = {
2301
2492
  "title": "ReadPRCommentsResponse",
2302
2493
  "type": "object"
2303
2494
  };
2304
- export const RepoLogsInputSchema = z.object({ "prNumber": z.number().int().describe("The number of the pull request to stream logs for."), "grep": z.union([z.string(), z.null()]).describe("Optional pattern to filter log lines.").default(null) });
2495
+ export const RepoLogsInputSchema = z.object({ "prNumber": z.number().int().describe("The number of the pull request to stream logs for."), "grep": z.union([z.string(), z.null()]).describe("Optional pattern to filter log lines.").default(null), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
2305
2496
  export const RepoLogsInputJsonSchema = {
2306
2497
  "properties": {
2307
2498
  "prNumber": {
@@ -2321,6 +2512,20 @@ export const RepoLogsInputJsonSchema = {
2321
2512
  "default": null,
2322
2513
  "description": "Optional pattern to filter log lines.",
2323
2514
  "title": "Grep"
2515
+ },
2516
+ "repo": {
2517
+ "anyOf": [
2518
+ {
2519
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
2520
+ "type": "string"
2521
+ },
2522
+ {
2523
+ "type": "null"
2524
+ }
2525
+ ],
2526
+ "default": null,
2527
+ "description": "The target repository override (e.g. org/repo).",
2528
+ "title": "Repo"
2324
2529
  }
2325
2530
  },
2326
2531
  "required": [
@@ -2801,7 +3006,7 @@ export const SearchDdgsInputJsonSchema = {
2801
3006
  "title": "SearchDdgsInput",
2802
3007
  "type": "object"
2803
3008
  };
2804
- export const SearchPRsInputSchema = z.object({ "state": z.enum(["open", "closed", "all"]).describe("The state of the PRs to search for.").default("open"), "limit": z.number().int().gte(1).lte(100).describe("The maximum number of PRs to return (default: 100, range: 1-100).").default(100), "includeDrafts": z.boolean().describe("Whether to include draft PRs in the results.").default(true), "labels": z.union([z.array(z.string()), z.null()]).describe("Filter PRs by labels.").default(null) });
3009
+ export const SearchPRsInputSchema = z.object({ "state": z.enum(["open", "closed", "all"]).describe("The state of the PRs to search for.").default("open"), "limit": z.number().int().gte(1).lte(100).describe("The maximum number of PRs to return (default: 100, range: 1-100).").default(100), "includeDrafts": z.boolean().describe("Whether to include draft PRs in the results.").default(true), "labels": z.union([z.array(z.string()), z.null()]).describe("Filter PRs by labels.").default(null), "repo": z.union([z.string().regex(new RegExp("^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$")), z.null()]).describe("The target repository override (e.g. org/repo).").default(null) });
2805
3010
  export const SearchPRsInputJsonSchema = {
2806
3011
  "properties": {
2807
3012
  "state": {
@@ -2844,6 +3049,20 @@ export const SearchPRsInputJsonSchema = {
2844
3049
  "default": null,
2845
3050
  "description": "Filter PRs by labels.",
2846
3051
  "title": "Labels"
3052
+ },
3053
+ "repo": {
3054
+ "anyOf": [
3055
+ {
3056
+ "pattern": "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$",
3057
+ "type": "string"
3058
+ },
3059
+ {
3060
+ "type": "null"
3061
+ }
3062
+ ],
3063
+ "default": null,
3064
+ "description": "The target repository override (e.g. org/repo).",
3065
+ "title": "Repo"
2847
3066
  }
2848
3067
  },
2849
3068
  "title": "SearchPRsInput",
@@ -1,16 +1,17 @@
1
1
  import { runCommand } from "../lib/shell.js";
2
+ import { resolveRepo } from "../lib/git.js";
2
3
  import { sanitizeError } from "../lib/error_utils.js";
3
4
  import { CreateIssueInputSchema, CreateIssueResponseSchema } from "./contract.js";
4
5
  export { CreateIssueInputSchema };
5
6
  export async function createIssueHandler(args) {
6
7
  const params = CreateIssueInputSchema.parse(args);
8
+ const targetRepo = resolveRepo(params.repo);
7
9
  const cmdArgs = ["gh", "create-issue", "--title", params.title];
8
10
  if (params.body)
9
11
  cmdArgs.push("--body", params.body);
10
12
  if (params.file)
11
13
  cmdArgs.push("--file", params.file);
12
- if (params.repo)
13
- cmdArgs.push("--repo", params.repo);
14
+ cmdArgs.push("--repo", targetRepo);
14
15
  const result = await runCommand("td-cli", cmdArgs);
15
16
  if (result.exitCode !== 0) {
16
17
  throw new Error(`Failed to create issue: ${sanitizeError(result.stderr)}`);
@@ -23,6 +23,16 @@ describe("github.create_issue", () => {
23
23
  command: "td-cli gh create-issue --title 'Test Issue' --body 'Test Body'"
24
24
  });
25
25
  const result = await createIssueHandler({ title: "Test Issue", body: "Test Body", file: null, repo: null });
26
+ expect(shell.runCommand).toHaveBeenCalledWith("td-cli", [
27
+ "gh",
28
+ "create-issue",
29
+ "--title",
30
+ "Test Issue",
31
+ "--body",
32
+ "Test Body",
33
+ "--repo",
34
+ expect.any(String)
35
+ ]);
26
36
  expect(result.status).toBe("success");
27
37
  expect(result.issue?.number).toBe(123);
28
38
  expect(result.issue?.title).toBe("Test Issue");
@@ -1,22 +1,22 @@
1
1
  import { runCommand } from "../lib/shell.js";
2
+ import { resolveRepo } from "../lib/git.js";
2
3
  import { CreatePullRequestInputSchema } from "./contract.js";
3
4
  export { CreatePullRequestInputSchema };
4
5
  export async function createPullRequestHandler(args) {
5
6
  const params = CreatePullRequestInputSchema.parse(args);
7
+ const targetRepo = resolveRepo(params.repo);
6
8
  const tdArgs = [
7
9
  "gh",
8
10
  "create-pr",
9
11
  "--title", params.title,
10
12
  "--body", params.body,
11
13
  "--head", params.head,
12
- "--base", params.base
14
+ "--base", params.base,
15
+ "--repo", targetRepo
13
16
  ];
14
17
  if (params.draft) {
15
18
  tdArgs.push("--draft");
16
19
  }
17
- if (params.repo) {
18
- tdArgs.push("--repo", params.repo);
19
- }
20
20
  const result = await runCommand("td-cli", tdArgs);
21
21
  if (result.exitCode !== 0) {
22
22
  // Attempt to parse stdout as JSON to see if there's a structured error message
@@ -1,26 +1,18 @@
1
1
  import { z } from "zod";
2
- import { runCommand } from "../lib/shell.js";
2
+ import { getMergeConflictFiles } from "../lib/git.js";
3
3
  export const GetMergeConflictFilesInputSchema = z.object({
4
- prNumber: z.number(),
4
+ prNumber: z.number().optional(),
5
5
  baseBranch: z.string().optional().default("main"),
6
+ headRef: z.string().optional().default("HEAD"),
6
7
  });
7
8
  export async function getMergeConflictFilesHandler(args) {
8
- const result = await runCommand("td-cli", [
9
- "gh", "merge-conflicts", args.prNumber.toString(),
10
- "--base", args.baseBranch || "main"
11
- ]);
12
- if (result.exitCode !== 0) {
13
- throw new Error(`Failed to get merge conflicts: ${result.stderr}`);
14
- }
15
- const output = JSON.parse(result.stdout);
16
- if (output.status === "error") {
17
- throw new Error(`Failed to get merge conflicts: ${output.message}`);
18
- }
9
+ const baseBranch = args.baseBranch || "main";
10
+ const headRef = args.headRef || "HEAD";
11
+ const conflictFiles = await getMergeConflictFiles(baseBranch, headRef);
19
12
  return {
20
- prNumber: output.prNumber,
21
- baseBranch: output.baseBranch,
22
- headRef: output.headRef,
23
- conflictFiles: output.conflictFiles,
24
- commandLog: output.commandLog
13
+ prNumber: args.prNumber,
14
+ baseBranch,
15
+ headRef,
16
+ conflictFiles,
25
17
  };
26
18
  }
@@ -1,12 +1,15 @@
1
1
  import { z } from "zod";
2
2
  import { runCommand } from "../lib/shell.js";
3
+ import { resolveRepo } from "../lib/git.js";
3
4
  import { sanitizeError } from "../lib/error_utils.js";
4
5
  export const GetPrInputSchema = z.object({
5
6
  prNumber: z.number().describe("The number of the PR to view."),
7
+ repo: z.string().optional().describe("The target repository override (e.g. org/repo)."),
6
8
  });
7
9
  export async function getPrHandler(args) {
8
10
  const params = GetPrInputSchema.parse(args);
9
- const result = await runCommand("td-cli", ["gh", "view", params.prNumber.toString()]);
11
+ const targetRepo = resolveRepo(params.repo);
12
+ const result = await runCommand("td-cli", ["gh", "view", params.prNumber.toString(), "--repo", targetRepo]);
10
13
  if (result.exitCode !== 0) {
11
14
  throw new Error(`Failed to get PR details: ${sanitizeError(result.stderr)}`);
12
15
  }
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ import { runCommand } from "../lib/shell.js";
3
+ import { resolveRepo } from "../lib/git.js";
4
+ import { sanitizeError } from "../lib/error_utils.js";
5
+ const GetPrCommitsInputSchema = z.object({
6
+ prNumber: z.number().describe("The number of the PR to list commits for."),
7
+ repo: z.string().optional().describe("The target repository override (e.g. org/repo)."),
8
+ });
9
+ export async function getPrCommitsHandler(args) {
10
+ const params = GetPrCommitsInputSchema.parse(args);
11
+ const targetRepo = resolveRepo(params.repo);
12
+ const result = await runCommand("td-cli", ["gh", "list-pr-commits", "--pr-number", params.prNumber.toString(), "--repo", targetRepo]);
13
+ if (result.exitCode !== 0) {
14
+ throw new Error(`Failed to list PR commits: ${sanitizeError(result.stderr)}`);
15
+ }
16
+ const output = JSON.parse(result.stdout);
17
+ if (output.status === "error") {
18
+ throw new Error(`Failed to list PR commits: ${output.message}`);
19
+ }
20
+ return { commits: output.commits };
21
+ }
@@ -1,11 +1,15 @@
1
1
  import { z } from "zod";
2
2
  import { runCommand } from "../lib/shell.js";
3
+ import { resolveRepo } from "../lib/git.js";
3
4
  export const GetPrDiffInputSchema = z.object({
4
- prNumber: z.number(),
5
+ prNumber: z.number().describe("The number of the pull request to get the diff for."),
6
+ repo: z.string().optional().describe("The target repository override (e.g. org/repo)."),
5
7
  });
6
8
  export async function getPrDiffHandler(args) {
9
+ const params = GetPrDiffInputSchema.parse(args);
10
+ const targetRepo = resolveRepo(params.repo);
7
11
  const result = await runCommand("td-cli", [
8
- "gh", "pr-diff", args.prNumber.toString()
12
+ "gh", "pr-diff", params.prNumber.toString(), "--repo", targetRepo
9
13
  ]);
10
14
  if (result.exitCode !== 0) {
11
15
  throw new Error(`Failed to get PR diff: ${result.stderr}`);
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ import { runCommand } from "../lib/shell.js";
3
+ import { resolveRepo } from "../lib/git.js";
4
+ import { sanitizeError } from "../lib/error_utils.js";
5
+ const GetPrReviewsInputSchema = z.object({
6
+ prNumber: z.number().describe("The number of the PR to view reviews for."),
7
+ repo: z.string().optional().describe("The target repository override (e.g. org/repo)."),
8
+ });
9
+ export async function getPrReviewsHandler(args) {
10
+ const params = GetPrReviewsInputSchema.parse(args);
11
+ const targetRepo = resolveRepo(params.repo);
12
+ const result = await runCommand("td-cli", ["gh", "read-pr-reviews", "--pr-number", params.prNumber.toString(), "--repo", targetRepo]);
13
+ if (result.exitCode !== 0) {
14
+ throw new Error(`Failed to read PR reviews: ${sanitizeError(result.stderr)}`);
15
+ }
16
+ const output = JSON.parse(result.stdout);
17
+ if (output.status === "error") {
18
+ throw new Error(`Failed to read PR reviews: ${output.message}`);
19
+ }
20
+ return { reviews: output.reviews, reviewCount: output.review_count };
21
+ }