@shepai/cli 1.149.1-pr467.b05cb61 → 1.149.1-pr469.a02d90d

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 (198) hide show
  1. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +0 -17
  2. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +0 -12
  4. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  5. package/dist/packages/core/src/infrastructure/di/container.js +13 -0
  6. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +0 -1
  7. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
  8. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +1 -18
  9. package/dist/packages/core/src/infrastructure/services/mcp/mcp-server.service.d.ts +25 -0
  10. package/dist/packages/core/src/infrastructure/services/mcp/mcp-server.service.d.ts.map +1 -0
  11. package/dist/packages/core/src/infrastructure/services/mcp/mcp-server.service.js +38 -0
  12. package/dist/packages/core/src/infrastructure/services/mcp/tools/agent-tools.d.ts +13 -0
  13. package/dist/packages/core/src/infrastructure/services/mcp/tools/agent-tools.d.ts.map +1 -0
  14. package/dist/packages/core/src/infrastructure/services/mcp/tools/agent-tools.js +92 -0
  15. package/dist/packages/core/src/infrastructure/services/mcp/tools/feature-tools.d.ts +13 -0
  16. package/dist/packages/core/src/infrastructure/services/mcp/tools/feature-tools.d.ts.map +1 -0
  17. package/dist/packages/core/src/infrastructure/services/mcp/tools/feature-tools.js +122 -0
  18. package/dist/packages/core/src/infrastructure/services/mcp/tools/index.d.ts +12 -0
  19. package/dist/packages/core/src/infrastructure/services/mcp/tools/index.d.ts.map +1 -0
  20. package/dist/packages/core/src/infrastructure/services/mcp/tools/index.js +18 -0
  21. package/dist/packages/core/src/infrastructure/services/mcp/tools/repo-tools.d.ts +13 -0
  22. package/dist/packages/core/src/infrastructure/services/mcp/tools/repo-tools.d.ts.map +1 -0
  23. package/dist/packages/core/src/infrastructure/services/mcp/tools/repo-tools.js +39 -0
  24. package/dist/packages/core/src/infrastructure/services/mcp/tools/settings-tools.d.ts +13 -0
  25. package/dist/packages/core/src/infrastructure/services/mcp/tools/settings-tools.d.ts.map +1 -0
  26. package/dist/packages/core/src/infrastructure/services/mcp/tools/settings-tools.js +57 -0
  27. package/dist/src/presentation/cli/commands/mcp.command.d.ts +20 -0
  28. package/dist/src/presentation/cli/commands/mcp.command.d.ts.map +1 -0
  29. package/dist/src/presentation/cli/commands/mcp.command.js +65 -0
  30. package/dist/src/presentation/cli/index.d.ts +1 -0
  31. package/dist/src/presentation/cli/index.d.ts.map +1 -1
  32. package/dist/src/presentation/cli/index.js +3 -0
  33. package/dist/src/presentation/web/app/(dashboard)/@drawer/create/page.d.ts.map +1 -1
  34. package/dist/src/presentation/web/app/(dashboard)/@drawer/create/page.js +2 -6
  35. package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.d.ts +1 -2
  36. package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.d.ts.map +1 -1
  37. package/dist/src/presentation/web/components/common/control-center-drawer/create-drawer-client.js +2 -2
  38. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +1 -3
  39. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  40. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +3 -29
  41. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +0 -10
  42. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  43. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +3 -37
  44. package/dist/src/presentation/web/hooks/useTheme.d.ts +1 -1
  45. package/dist/tsconfig.build.tsbuildinfo +1 -1
  46. package/package.json +3 -1
  47. package/web/.next/BUILD_ID +1 -1
  48. package/web/.next/build-manifest.json +2 -2
  49. package/web/.next/fallback-build-manifest.json +2 -2
  50. package/web/.next/prerender-manifest.json +3 -3
  51. package/web/.next/required-server-files.js +1 -1
  52. package/web/.next/required-server-files.json +1 -1
  53. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
  54. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
  55. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  56. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +56 -71
  58. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  59. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  60. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  62. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
  65. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  68. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  69. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +56 -71
  71. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  72. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  73. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  74. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  75. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  76. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  77. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
  78. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  79. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
  81. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  82. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  83. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  84. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  85. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  86. package/web/.next/server/app/_global-error.html +2 -2
  87. package/web/.next/server/app/_global-error.rsc +1 -1
  88. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  89. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  90. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  91. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  92. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  93. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
  94. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  95. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  96. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  97. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  98. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  99. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  100. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  101. package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
  102. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  103. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  104. package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
  105. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  106. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  107. package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
  108. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  109. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  110. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  111. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  112. package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js +2 -2
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js.map +1 -1
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  117. package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
  118. package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js.map +1 -1
  119. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
  120. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
  121. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
  122. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  124. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js +1 -1
  126. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js +1 -1
  128. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
  130. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
  131. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js +1 -1
  132. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js.map +1 -1
  133. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js +1 -1
  134. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  136. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  137. package/web/.next/server/chunks/ssr/{_e9e9ed20._.js → _0c5f56e3._.js} +3 -3
  138. package/web/.next/server/chunks/ssr/_0c5f56e3._.js.map +1 -0
  139. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  140. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  141. package/web/.next/server/chunks/ssr/_1b719e7f._.js +1 -1
  142. package/web/.next/server/chunks/ssr/_1b719e7f._.js.map +1 -1
  143. package/web/.next/server/chunks/ssr/_37e8548b._.js +1 -1
  144. package/web/.next/server/chunks/ssr/_37e8548b._.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/{_abec1c45._.js → _48c27bde._.js} +2 -2
  146. package/web/.next/server/chunks/ssr/{_abec1c45._.js.map → _48c27bde._.js.map} +1 -1
  147. package/web/.next/server/chunks/ssr/_55d763e2._.js +1 -1
  148. package/web/.next/server/chunks/ssr/_55d763e2._.js.map +1 -1
  149. package/web/.next/server/chunks/ssr/_6256a985._.js +1 -1
  150. package/web/.next/server/chunks/ssr/_6256a985._.js.map +1 -1
  151. package/web/.next/server/chunks/ssr/{_30459875._.js → _632999e5._.js} +2 -2
  152. package/web/.next/server/chunks/ssr/{_30459875._.js.map → _632999e5._.js.map} +1 -1
  153. package/web/.next/server/chunks/ssr/{_0c473fef._.js → _64bdfc6f._.js} +3 -3
  154. package/web/.next/server/chunks/ssr/_64bdfc6f._.js.map +1 -0
  155. package/web/.next/server/chunks/ssr/_8fcc39d4._.js +1 -1
  156. package/web/.next/server/chunks/ssr/_b71645b4._.js +1 -1
  157. package/web/.next/server/chunks/ssr/_b71645b4._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
  159. package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  161. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  162. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
  163. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
  165. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  167. package/web/.next/server/chunks/ssr/{src_presentation_web_e8241254._.js → src_presentation_web_bf0f159f._.js} +2 -2
  168. package/web/.next/server/chunks/ssr/{src_presentation_web_e8241254._.js.map → src_presentation_web_bf0f159f._.js.map} +1 -1
  169. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  170. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  171. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  172. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  173. package/web/.next/server/pages/500.html +2 -2
  174. package/web/.next/server/server-reference-manifest.js +1 -1
  175. package/web/.next/server/server-reference-manifest.json +100 -122
  176. package/web/.next/static/chunks/{6ad6451b2946abc2.js → 1a8a38f6308de8b4.js} +1 -1
  177. package/web/.next/static/chunks/{cdab8d275a2bcad7.js → 22a499ec013f10be.js} +1 -1
  178. package/web/.next/static/chunks/{80e476ff4f527c2b.js → 4bde88d697f31229.js} +1 -1
  179. package/web/.next/static/chunks/{530c26ce96fc30d1.js → 5cba475c8264bfff.js} +1 -1
  180. package/web/.next/static/chunks/{b37e4ffbcbeec1ee.js → 9651aaa108eba61c.js} +1 -1
  181. package/web/.next/static/chunks/{58638a97a465d8fe.js → 97c21e22559eef75.js} +1 -1
  182. package/web/.next/static/chunks/{5b4039a7214ebe58.js → 9f04f42c1705c673.js} +2 -2
  183. package/web/.next/static/chunks/{7c5b13867975dc5f.js → a704525b56425f85.js} +1 -1
  184. package/web/.next/static/chunks/bb090d9e36df8327.js +1 -0
  185. package/web/.next/static/chunks/{ad38e805c7d1a020.js → bec96dacaa80110a.js} +1 -1
  186. package/web/.next/static/chunks/d6579a7c65fdb449.js +1 -0
  187. package/web/.next/static/chunks/db8e005837f3044b.js +1 -0
  188. package/dist/src/presentation/web/app/actions/get-viewer-permission.d.ts +0 -4
  189. package/dist/src/presentation/web/app/actions/get-viewer-permission.d.ts.map +0 -1
  190. package/dist/src/presentation/web/app/actions/get-viewer-permission.js +0 -14
  191. package/web/.next/server/chunks/ssr/_0c473fef._.js.map +0 -1
  192. package/web/.next/server/chunks/ssr/_e9e9ed20._.js.map +0 -1
  193. package/web/.next/static/chunks/19935f7b538ef132.js +0 -1
  194. package/web/.next/static/chunks/aed3ea7e8478cbee.js +0 -1
  195. package/web/.next/static/chunks/cd88a4cf2cb1b10f.js +0 -1
  196. /package/web/.next/static/{IJF6SpQ55CcjAxQmThTSs → N1E-vO_BaQtqQQzmIws-E}/_buildManifest.js +0 -0
  197. /package/web/.next/static/{IJF6SpQ55CcjAxQmThTSs → N1E-vO_BaQtqQQzmIws-E}/_clientMiddlewareManifest.json +0 -0
  198. /package/web/.next/static/{IJF6SpQ55CcjAxQmThTSs → N1E-vO_BaQtqQQzmIws-E}/_ssgManifest.js +0 -0
@@ -29,12 +29,6 @@ export declare class GitHubUrlParseError extends Error {
29
29
  export declare class GitHubRepoListError extends Error {
30
30
  constructor(message: string, cause?: Error);
31
31
  }
32
- /**
33
- * Thrown when checking the viewer's permission on a repository fails.
34
- */
35
- export declare class GitHubPermissionError extends Error {
36
- constructor(message: string, cause?: Error);
37
- }
38
32
  /**
39
33
  * A GitHub repository as returned by `gh repo list --json`.
40
34
  */
@@ -120,16 +114,5 @@ export interface IGitHubRepositoryService {
120
114
  * @throws {GitHubUrlParseError} if the URL does not match any supported format
121
115
  */
122
116
  parseGitHubUrl(url: string): ParsedGitHubUrl;
123
- /**
124
- * Get the authenticated user's permission level on a GitHub repository.
125
- *
126
- * Uses `gh repo view --json viewerPermission` with the given repo path
127
- * as the working directory.
128
- *
129
- * @param repoPath - Absolute path to a local clone of the repository
130
- * @returns The viewer's permission level: "ADMIN", "MAINTAIN", "WRITE", "TRIAGE", or "READ"
131
- * @throws {GitHubPermissionError} if the permission check fails (e.g. gh not installed, not authenticated)
132
- */
133
- getViewerPermission(repoPath: string): Promise<string>;
134
117
  }
135
118
  //# sourceMappingURL=github-repository-service.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"github-repository-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAMD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,aAAa,EAAE,MAAM,CAAC;CACvB;AAMD;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;;;;;;OAOG;IACH,eAAe,CACb,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;OAMG;IACH,oBAAoB,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAEnF;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAC;IAE7C;;;;;;;;;OASG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACxD"}
1
+ {"version":3,"file":"github-repository-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAM3C;AAMD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,aAAa,EAAE,MAAM,CAAC;CACvB;AAMD;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;;;;;;OAOG;IACH,eAAe,CACb,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;OAMG;IACH,oBAAoB,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAEnF;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAC;CAC9C"}
@@ -56,15 +56,3 @@ export class GitHubRepoListError extends Error {
56
56
  this.cause = cause;
57
57
  }
58
58
  }
59
- /**
60
- * Thrown when checking the viewer's permission on a repository fails.
61
- */
62
- export class GitHubPermissionError extends Error {
63
- constructor(message, cause) {
64
- super(message);
65
- this.name = 'GitHubPermissionError';
66
- Object.setPrototypeOf(this, new.target.prototype);
67
- if (cause)
68
- this.cause = cause;
69
- }
70
- }
@@ -1 +1 @@
1
- {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAiIrC;;;;;;GAMG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CA4WrE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/di/container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAiIrC;;;;;;GAMG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,SAAS,CAAC,CA0XrE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -436,6 +436,19 @@ export async function initializeContainer() {
436
436
  container.register('GetBranchSyncStatusUseCase', {
437
437
  useFactory: (c) => c.resolve(GetBranchSyncStatusUseCase),
438
438
  });
439
+ // McpServerFactory is registered as a lazy async factory to avoid importing
440
+ // @modelcontextprotocol/sdk for non-MCP commands. The factory uses dynamic
441
+ // import() — the actual SDK import only happens when the factory is called.
442
+ container.register('McpServerFactory', {
443
+ useFactory: (c) => {
444
+ return async () => {
445
+ const { McpServerService } = await import('../services/mcp/mcp-server.service.js');
446
+ const versionService = c.resolve('IVersionService');
447
+ const { version } = versionService.getVersion();
448
+ return new McpServerService(version, c);
449
+ };
450
+ },
451
+ });
439
452
  _initialized = true;
440
453
  return container;
441
454
  }
@@ -13,7 +13,6 @@ export declare class GitHubRepositoryService implements IGitHubRepositoryService
13
13
  listUserRepositories(options?: ListUserRepositoriesOptions): Promise<GitHubRepo[]>;
14
14
  cloneRepository(nameWithOwner: string, destination: string, options?: CloneOptions): Promise<void>;
15
15
  parseGitHubUrl(url: string): ParsedGitHubUrl;
16
- getViewerPermission(repoPath: string): Promise<string>;
17
16
  private cleanupPartialClone;
18
17
  }
19
18
  //# sourceMappingURL=github-repository.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"github-repository.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/external/github-repository.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EACV,wBAAwB,EACxB,UAAU,EACV,2BAA2B,EAC3B,YAAY,EACZ,eAAe,EAChB,MAAM,mFAAmF,CAAC;AAyB3F,qBACa,uBAAwB,YAAW,wBAAwB;IAClC,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAyB1B,oBAAoB,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAsClF,eAAe,CACnB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,CAAC;IAgDhB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe;IA2CtC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAyB9C,mBAAmB;CAOlC"}
1
+ {"version":3,"file":"github-repository.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/external/github-repository.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EACV,wBAAwB,EACxB,UAAU,EACV,2BAA2B,EAC3B,YAAY,EACZ,eAAe,EAChB,MAAM,mFAAmF,CAAC;AAwB3F,qBACa,uBAAwB,YAAW,wBAAwB;IAClC,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAyB1B,oBAAoB,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAsClF,eAAe,CACnB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,CAAC;IAgDhB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe;YA2C9B,mBAAmB;CAOlC"}
@@ -20,7 +20,7 @@ import { injectable, inject } from 'tsyringe';
20
20
  import { resolve, normalize } from 'node:path';
21
21
  import { rm } from 'node:fs/promises';
22
22
  import { spawn } from 'node:child_process';
23
- import { GitHubAuthError, GitHubCloneError, GitHubPermissionError, GitHubRepoListError, GitHubUrlParseError, } from '../../../application/ports/output/services/github-repository-service.interface.js';
23
+ import { GitHubAuthError, GitHubCloneError, GitHubRepoListError, GitHubUrlParseError, } from '../../../application/ports/output/services/github-repository-service.interface.js';
24
24
  // ---------------------------------------------------------------------------
25
25
  // URL regex patterns
26
26
  // ---------------------------------------------------------------------------
@@ -154,23 +154,6 @@ let GitHubRepositoryService = class GitHubRepositoryService {
154
154
  'Supported formats: https://github.com/owner/repo, ' +
155
155
  'git@github.com:owner/repo.git, or owner/repo shorthand.');
156
156
  }
157
- async getViewerPermission(repoPath) {
158
- try {
159
- const { stdout } = await this.execFile('gh', ['repo', 'view', '--json', 'viewerPermission'], {
160
- cwd: repoPath,
161
- });
162
- const parsed = JSON.parse(stdout);
163
- return parsed.viewerPermission;
164
- }
165
- catch (error) {
166
- const cause = error instanceof Error ? error : undefined;
167
- const errnoCode = error?.code;
168
- if (errnoCode === 'ENOENT') {
169
- throw new GitHubPermissionError('GitHub CLI (gh) is not installed. Install it from https://cli.github.com/', cause);
170
- }
171
- throw new GitHubPermissionError(`Failed to check repository permission: ${cause?.message ?? String(error)}`, cause);
172
- }
173
- }
174
157
  async cleanupPartialClone(destination) {
175
158
  try {
176
159
  await rm(destination, { recursive: true, force: true });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * MCP Server Service
3
+ *
4
+ * Thin presentation adapter that exposes shep use cases as MCP tools.
5
+ * Uses the official @modelcontextprotocol/sdk with stdio transport.
6
+ *
7
+ * Architecture: This sits in the infrastructure layer as a presentation adapter,
8
+ * the same pattern used by CLI commands and the web server. It resolves use cases
9
+ * from the shared DI container and contains zero business logic.
10
+ */
11
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
12
+ import type DependencyContainer from 'tsyringe/dist/typings/types/dependency-container.js';
13
+ export declare class McpServerService {
14
+ readonly server: McpServer;
15
+ constructor(version: string, container?: DependencyContainer);
16
+ /**
17
+ * Connect the MCP server to a stdio transport and start listening.
18
+ */
19
+ start(): Promise<void>;
20
+ /**
21
+ * Close the MCP server and transport.
22
+ */
23
+ stop(): Promise<void>;
24
+ }
25
+ //# sourceMappingURL=mcp-server.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-server.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/mcp/mcp-server.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,mBAAmB,MAAM,qDAAqD,CAAC;AAG3F,qBAAa,gBAAgB;IAC3B,SAAgB,MAAM,EAAE,SAAS,CAAC;gBAEtB,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,mBAAmB;IAW5D;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * MCP Server Service
3
+ *
4
+ * Thin presentation adapter that exposes shep use cases as MCP tools.
5
+ * Uses the official @modelcontextprotocol/sdk with stdio transport.
6
+ *
7
+ * Architecture: This sits in the infrastructure layer as a presentation adapter,
8
+ * the same pattern used by CLI commands and the web server. It resolves use cases
9
+ * from the shared DI container and contains zero business logic.
10
+ */
11
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
12
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
13
+ import { registerAllTools } from './tools/index.js';
14
+ export class McpServerService {
15
+ server;
16
+ constructor(version, container) {
17
+ this.server = new McpServer({
18
+ name: 'shep',
19
+ version,
20
+ });
21
+ if (container) {
22
+ registerAllTools(this.server, container);
23
+ }
24
+ }
25
+ /**
26
+ * Connect the MCP server to a stdio transport and start listening.
27
+ */
28
+ async start() {
29
+ const transport = new StdioServerTransport();
30
+ await this.server.connect(transport);
31
+ }
32
+ /**
33
+ * Close the MCP server and transport.
34
+ */
35
+ async stop() {
36
+ await this.server.close();
37
+ }
38
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * MCP Agent Tools
3
+ *
4
+ * Registers agent-related MCP tools on the server.
5
+ * Each tool is a thin adapter that delegates to a use case.
6
+ */
7
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
+ import type DependencyContainer from 'tsyringe/dist/typings/types/dependency-container.js';
9
+ /**
10
+ * Register agent-related MCP tools on the server.
11
+ */
12
+ export declare function registerAgentTools(server: McpServer, container: DependencyContainer): void;
13
+ //# sourceMappingURL=agent-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/mcp/tools/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,mBAAmB,MAAM,qDAAqD,CAAC;AAwB3F;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAkF1F"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * MCP Agent Tools
3
+ *
4
+ * Registers agent-related MCP tools on the server.
5
+ * Each tool is a thin adapter that delegates to a use case.
6
+ */
7
+ import { z } from 'zod';
8
+ import { RunAgentUseCase } from '../../../../application/use-cases/agents/run-agent.use-case.js';
9
+ import { GetAgentRunUseCase } from '../../../../application/use-cases/agents/get-agent-run.use-case.js';
10
+ import { ListAgentRunsUseCase } from '../../../../application/use-cases/agents/list-agent-runs.use-case.js';
11
+ import { StopAgentRunUseCase } from '../../../../application/use-cases/agents/stop-agent-run.use-case.js';
12
+ /**
13
+ * Wraps an async handler in try/catch, returning MCP error responses on failure.
14
+ */
15
+ async function withErrorHandling(fn) {
16
+ try {
17
+ return await fn();
18
+ }
19
+ catch (error) {
20
+ const message = error instanceof Error ? error.message : String(error);
21
+ return {
22
+ content: [{ type: 'text', text: message }],
23
+ isError: true,
24
+ };
25
+ }
26
+ }
27
+ /**
28
+ * Register agent-related MCP tools on the server.
29
+ */
30
+ export function registerAgentTools(server, container) {
31
+ server.registerTool('run_agent', {
32
+ description: 'Run a named agent with a prompt. Returns the agent run ID immediately without blocking — use show_agent_run to poll for status.',
33
+ inputSchema: {
34
+ agentName: z.string().describe('Name of the agent to run'),
35
+ prompt: z.string().describe('Prompt or instructions for the agent'),
36
+ },
37
+ }, async ({ agentName, prompt }) => {
38
+ return withErrorHandling(async () => {
39
+ const useCase = container.resolve(RunAgentUseCase);
40
+ const agentRun = await useCase.execute({ agentName, prompt });
41
+ return {
42
+ content: [{ type: 'text', text: JSON.stringify(agentRun, null, 2) }],
43
+ };
44
+ });
45
+ });
46
+ server.registerTool('show_agent_run', {
47
+ description: 'Get the status and details of an agent run by its ID.',
48
+ inputSchema: {
49
+ runId: z.string().describe('Agent run ID'),
50
+ },
51
+ }, async ({ runId }) => {
52
+ return withErrorHandling(async () => {
53
+ const useCase = container.resolve(GetAgentRunUseCase);
54
+ const agentRun = await useCase.execute(runId);
55
+ if (!agentRun) {
56
+ return {
57
+ content: [{ type: 'text', text: `Agent run not found: "${runId}"` }],
58
+ isError: true,
59
+ };
60
+ }
61
+ return {
62
+ content: [{ type: 'text', text: JSON.stringify(agentRun, null, 2) }],
63
+ };
64
+ });
65
+ });
66
+ server.registerTool('list_agent_runs', {
67
+ description: 'List all agent runs, sorted by most recent first.',
68
+ inputSchema: {},
69
+ }, async () => {
70
+ return withErrorHandling(async () => {
71
+ const useCase = container.resolve(ListAgentRunsUseCase);
72
+ const runs = await useCase.execute();
73
+ return {
74
+ content: [{ type: 'text', text: JSON.stringify(runs, null, 2) }],
75
+ };
76
+ });
77
+ });
78
+ server.registerTool('stop_agent_run', {
79
+ description: 'Stop a running agent by its run ID. Returns whether the stop was successful.',
80
+ inputSchema: {
81
+ runId: z.string().describe('Agent run ID to stop'),
82
+ },
83
+ }, async ({ runId }) => {
84
+ return withErrorHandling(async () => {
85
+ const useCase = container.resolve(StopAgentRunUseCase);
86
+ const result = await useCase.execute(runId);
87
+ return {
88
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
89
+ };
90
+ });
91
+ });
92
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * MCP Feature Tools
3
+ *
4
+ * Registers feature-related MCP tools on the server.
5
+ * Each tool is a thin adapter that delegates to a use case.
6
+ */
7
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
+ import type DependencyContainer from 'tsyringe/dist/typings/types/dependency-container.js';
9
+ /**
10
+ * Register feature-related MCP tools on the server.
11
+ */
12
+ export declare function registerFeatureTools(server: McpServer, container: DependencyContainer): void;
13
+ //# sourceMappingURL=feature-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-tools.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/mcp/tools/feature-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,mBAAmB,MAAM,qDAAqD,CAAC;AA0B3F;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAkH5F"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * MCP Feature Tools
3
+ *
4
+ * Registers feature-related MCP tools on the server.
5
+ * Each tool is a thin adapter that delegates to a use case.
6
+ */
7
+ import { z } from 'zod';
8
+ import { ListFeaturesUseCase } from '../../../../application/use-cases/features/list-features.use-case.js';
9
+ import { ShowFeatureUseCase } from '../../../../application/use-cases/features/show-feature.use-case.js';
10
+ import { CreateFeatureUseCase } from '../../../../application/use-cases/features/create/create-feature.use-case.js';
11
+ import { StartFeatureUseCase } from '../../../../application/use-cases/features/start-feature.use-case.js';
12
+ import { SdlcLifecycle } from '../../../../domain/generated/output.js';
13
+ /**
14
+ * Wraps an async handler in try/catch, returning MCP error responses on failure.
15
+ */
16
+ async function withErrorHandling(fn) {
17
+ try {
18
+ return await fn();
19
+ }
20
+ catch (error) {
21
+ const message = error instanceof Error ? error.message : String(error);
22
+ return {
23
+ content: [{ type: 'text', text: message }],
24
+ isError: true,
25
+ };
26
+ }
27
+ }
28
+ /**
29
+ * Register feature-related MCP tools on the server.
30
+ */
31
+ export function registerFeatureTools(server, container) {
32
+ server.registerTool('list_features', {
33
+ description: 'List all features tracked by shep. Optionally filter by lifecycle status (e.g. Pending, Implementation, Review).',
34
+ inputSchema: {
35
+ status: z
36
+ .enum([
37
+ SdlcLifecycle.Started,
38
+ SdlcLifecycle.Analyze,
39
+ SdlcLifecycle.Requirements,
40
+ SdlcLifecycle.Research,
41
+ SdlcLifecycle.Planning,
42
+ SdlcLifecycle.Implementation,
43
+ SdlcLifecycle.Review,
44
+ SdlcLifecycle.Maintain,
45
+ SdlcLifecycle.Blocked,
46
+ SdlcLifecycle.Pending,
47
+ ])
48
+ .optional()
49
+ .describe('Filter by lifecycle status'),
50
+ },
51
+ }, async ({ status }) => {
52
+ return withErrorHandling(async () => {
53
+ const useCase = container.resolve(ListFeaturesUseCase);
54
+ const filters = {};
55
+ if (status) {
56
+ filters.lifecycle = status;
57
+ }
58
+ const features = await useCase.execute(filters);
59
+ return {
60
+ content: [{ type: 'text', text: JSON.stringify(features, null, 2) }],
61
+ };
62
+ });
63
+ });
64
+ server.registerTool('show_feature', {
65
+ description: 'Get detailed information about a feature by ID. Supports prefix matching — you can provide the first few characters of the feature ID.',
66
+ inputSchema: {
67
+ featureId: z.string().describe('Feature ID or ID prefix'),
68
+ },
69
+ }, async ({ featureId }) => {
70
+ return withErrorHandling(async () => {
71
+ const useCase = container.resolve(ShowFeatureUseCase);
72
+ const feature = await useCase.execute(featureId);
73
+ return {
74
+ content: [{ type: 'text', text: JSON.stringify(feature, null, 2) }],
75
+ };
76
+ });
77
+ });
78
+ server.registerTool('create_feature', {
79
+ description: 'Create a new feature in shep. Requires a user input describing the feature and the repository path. Optionally provide a name and description to skip AI metadata extraction.',
80
+ inputSchema: {
81
+ userInput: z.string().describe('Natural language description of the feature to create'),
82
+ repositoryPath: z.string().describe('Absolute path to the repository'),
83
+ name: z.string().optional().describe('Pre-supplied feature name (skips AI extraction)'),
84
+ description: z
85
+ .string()
86
+ .optional()
87
+ .describe('Pre-supplied feature description (skips AI extraction)'),
88
+ pending: z
89
+ .boolean()
90
+ .optional()
91
+ .describe('When true, create in Pending state without spawning an agent'),
92
+ },
93
+ }, async ({ userInput, repositoryPath, name, description, pending }) => {
94
+ return withErrorHandling(async () => {
95
+ const useCase = container.resolve(CreateFeatureUseCase);
96
+ const result = await useCase.execute({
97
+ userInput,
98
+ repositoryPath,
99
+ name,
100
+ description,
101
+ pending,
102
+ });
103
+ return {
104
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
105
+ };
106
+ });
107
+ });
108
+ server.registerTool('start_feature', {
109
+ description: 'Start a pending feature. Triggers an agent run and returns the run ID immediately without blocking.',
110
+ inputSchema: {
111
+ featureId: z.string().describe('ID of the pending feature to start'),
112
+ },
113
+ }, async ({ featureId }) => {
114
+ return withErrorHandling(async () => {
115
+ const useCase = container.resolve(StartFeatureUseCase);
116
+ const result = await useCase.execute(featureId);
117
+ return {
118
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
119
+ };
120
+ });
121
+ });
122
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * MCP Tools Registration
3
+ *
4
+ * Barrel module that registers all MCP tools on a server instance.
5
+ */
6
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
7
+ import type DependencyContainer from 'tsyringe/dist/typings/types/dependency-container.js';
8
+ /**
9
+ * Register all MCP tools on the server.
10
+ */
11
+ export declare function registerAllTools(server: McpServer, container: DependencyContainer): void;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/mcp/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,mBAAmB,MAAM,qDAAqD,CAAC;AAM3F;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAKxF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * MCP Tools Registration
3
+ *
4
+ * Barrel module that registers all MCP tools on a server instance.
5
+ */
6
+ import { registerFeatureTools } from './feature-tools.js';
7
+ import { registerAgentTools } from './agent-tools.js';
8
+ import { registerRepoTools } from './repo-tools.js';
9
+ import { registerSettingsTools } from './settings-tools.js';
10
+ /**
11
+ * Register all MCP tools on the server.
12
+ */
13
+ export function registerAllTools(server, container) {
14
+ registerFeatureTools(server, container);
15
+ registerAgentTools(server, container);
16
+ registerRepoTools(server, container);
17
+ registerSettingsTools(server, container);
18
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * MCP Repository Tools
3
+ *
4
+ * Registers repository-related MCP tools on the server.
5
+ * Each tool is a thin adapter that delegates to a use case.
6
+ */
7
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
+ import type DependencyContainer from 'tsyringe/dist/typings/types/dependency-container.js';
9
+ /**
10
+ * Register repository-related MCP tools on the server.
11
+ */
12
+ export declare function registerRepoTools(server: McpServer, container: DependencyContainer): void;
13
+ //# sourceMappingURL=repo-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo-tools.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/mcp/tools/repo-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,mBAAmB,MAAM,qDAAqD,CAAC;AAoB3F;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAiBzF"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * MCP Repository Tools
3
+ *
4
+ * Registers repository-related MCP tools on the server.
5
+ * Each tool is a thin adapter that delegates to a use case.
6
+ */
7
+ import { ListRepositoriesUseCase } from '../../../../application/use-cases/repositories/list-repositories.use-case.js';
8
+ /**
9
+ * Wraps an async handler in try/catch, returning MCP error responses on failure.
10
+ */
11
+ async function withErrorHandling(fn) {
12
+ try {
13
+ return await fn();
14
+ }
15
+ catch (error) {
16
+ const message = error instanceof Error ? error.message : String(error);
17
+ return {
18
+ content: [{ type: 'text', text: message }],
19
+ isError: true,
20
+ };
21
+ }
22
+ }
23
+ /**
24
+ * Register repository-related MCP tools on the server.
25
+ */
26
+ export function registerRepoTools(server, container) {
27
+ server.registerTool('list_repositories', {
28
+ description: 'List all repositories tracked by shep.',
29
+ inputSchema: {},
30
+ }, async () => {
31
+ return withErrorHandling(async () => {
32
+ const useCase = container.resolve(ListRepositoriesUseCase);
33
+ const repositories = await useCase.execute();
34
+ return {
35
+ content: [{ type: 'text', text: JSON.stringify(repositories, null, 2) }],
36
+ };
37
+ });
38
+ });
39
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * MCP Settings Tools
3
+ *
4
+ * Registers settings-related MCP tools on the server.
5
+ * Each tool is a thin adapter that delegates to a use case.
6
+ */
7
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
+ import type DependencyContainer from 'tsyringe/dist/typings/types/dependency-container.js';
9
+ /**
10
+ * Register settings-related MCP tools on the server.
11
+ */
12
+ export declare function registerSettingsTools(server: McpServer, container: DependencyContainer): void;
13
+ //# sourceMappingURL=settings-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-tools.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/mcp/tools/settings-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,mBAAmB,MAAM,qDAAqD,CAAC;AAsB3F;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAwC7F"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * MCP Settings Tools
3
+ *
4
+ * Registers settings-related MCP tools on the server.
5
+ * Each tool is a thin adapter that delegates to a use case.
6
+ */
7
+ import { z } from 'zod';
8
+ import { LoadSettingsUseCase } from '../../../../application/use-cases/settings/load-settings.use-case.js';
9
+ import { UpdateSettingsUseCase } from '../../../../application/use-cases/settings/update-settings.use-case.js';
10
+ /**
11
+ * Wraps an async handler in try/catch, returning MCP error responses on failure.
12
+ */
13
+ async function withErrorHandling(fn) {
14
+ try {
15
+ return await fn();
16
+ }
17
+ catch (error) {
18
+ const message = error instanceof Error ? error.message : String(error);
19
+ return {
20
+ content: [{ type: 'text', text: message }],
21
+ isError: true,
22
+ };
23
+ }
24
+ }
25
+ /**
26
+ * Register settings-related MCP tools on the server.
27
+ */
28
+ export function registerSettingsTools(server, container) {
29
+ server.registerTool('get_settings', {
30
+ description: 'Get the current shep settings including models, agent, environment, and workflow configuration.',
31
+ inputSchema: {},
32
+ }, async () => {
33
+ return withErrorHandling(async () => {
34
+ const useCase = container.resolve(LoadSettingsUseCase);
35
+ const settings = await useCase.execute();
36
+ return {
37
+ content: [{ type: 'text', text: JSON.stringify(settings, null, 2) }],
38
+ };
39
+ });
40
+ });
41
+ server.registerTool('update_settings', {
42
+ description: 'Update shep settings. Pass the full settings object with desired changes. Returns the updated settings.',
43
+ inputSchema: {
44
+ settings: z
45
+ .record(z.string(), z.unknown())
46
+ .describe('Settings object with fields to update'),
47
+ },
48
+ }, async ({ settings }) => {
49
+ return withErrorHandling(async () => {
50
+ const useCase = container.resolve(UpdateSettingsUseCase);
51
+ const updated = await useCase.execute(settings);
52
+ return {
53
+ content: [{ type: 'text', text: JSON.stringify(updated, null, 2) }],
54
+ };
55
+ });
56
+ });
57
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * MCP Command
3
+ *
4
+ * Starts the shep MCP (Model Context Protocol) server in foreground mode.
5
+ * The server listens on stdio for JSON-RPC messages, exposing shep capabilities
6
+ * as MCP tools that AI clients (Claude Desktop, Cursor, VS Code, etc.) can discover
7
+ * and invoke.
8
+ *
9
+ * Usage: shep mcp [--log-level <level>]
10
+ *
11
+ * @example
12
+ * $ shep mcp
13
+ * # Server starts on stdio — configure your MCP client to spawn this process
14
+ */
15
+ import { Command } from 'commander';
16
+ /**
17
+ * Create the mcp command
18
+ */
19
+ export declare function createMcpCommand(): Command;
20
+ //# sourceMappingURL=mcp.command.d.ts.map