@shepai/cli 1.155.0-pr481.af47b59 → 1.155.0-pr482.ac79b36

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 (201) hide show
  1. package/README.md +113 -117
  2. package/apis/json-schema/Settings.yaml +3 -0
  3. package/apis/json-schema/TelegramCommandType.yaml +11 -0
  4. package/apis/json-schema/TelegramConfig.yaml +21 -0
  5. package/apis/json-schema/TelegramNotifyEvents.yaml +61 -0
  6. package/dist/packages/core/src/application/ports/output/services/telegram-service.interface.d.ts +92 -0
  7. package/dist/packages/core/src/application/ports/output/services/telegram-service.interface.d.ts.map +1 -0
  8. package/dist/packages/core/src/application/ports/output/services/telegram-service.interface.js +37 -0
  9. package/dist/packages/core/src/application/use-cases/telegram/configure-telegram.use-case.d.ts +42 -0
  10. package/dist/packages/core/src/application/use-cases/telegram/configure-telegram.use-case.d.ts.map +1 -0
  11. package/dist/packages/core/src/application/use-cases/telegram/configure-telegram.use-case.js +108 -0
  12. package/dist/packages/core/src/domain/generated/output.d.ts +82 -0
  13. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  14. package/dist/packages/core/src/domain/generated/output.js +9 -0
  15. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  16. package/dist/packages/core/src/infrastructure/di/container.js +12 -1
  17. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +14 -0
  18. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  19. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +34 -0
  20. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/049-add-telegram-settings.d.ts +17 -0
  21. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/049-add-telegram-settings.d.ts.map +1 -0
  22. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/049-add-telegram-settings.js +40 -0
  23. package/dist/packages/core/src/infrastructure/services/notifications/notification.service.d.ts +9 -1
  24. package/dist/packages/core/src/infrastructure/services/notifications/notification.service.d.ts.map +1 -1
  25. package/dist/packages/core/src/infrastructure/services/notifications/notification.service.js +40 -1
  26. package/dist/packages/core/src/infrastructure/services/telegram/telegram.service.d.ts +22 -0
  27. package/dist/packages/core/src/infrastructure/services/telegram/telegram.service.d.ts.map +1 -0
  28. package/dist/packages/core/src/infrastructure/services/telegram/telegram.service.js +128 -0
  29. package/dist/src/presentation/cli/commands/settings/index.d.ts +1 -0
  30. package/dist/src/presentation/cli/commands/settings/index.d.ts.map +1 -1
  31. package/dist/src/presentation/cli/commands/settings/index.js +4 -1
  32. package/dist/src/presentation/cli/commands/settings/telegram.command.d.ts +18 -0
  33. package/dist/src/presentation/cli/commands/settings/telegram.command.d.ts.map +1 -0
  34. package/dist/src/presentation/cli/commands/settings/telegram.command.js +158 -0
  35. package/dist/tsconfig.build.tsbuildinfo +1 -1
  36. package/package.json +1 -1
  37. package/web/.next/BUILD_ID +1 -1
  38. package/web/.next/build-manifest.json +2 -2
  39. package/web/.next/fallback-build-manifest.json +2 -2
  40. package/web/.next/prerender-manifest.json +3 -3
  41. package/web/.next/required-server-files.js +1 -1
  42. package/web/.next/required-server-files.json +1 -1
  43. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
  44. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  45. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +26 -26
  47. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  48. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +29 -29
  50. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  51. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  53. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  54. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
  56. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  57. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  58. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
  59. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  60. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  62. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +26 -26
  65. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +29 -29
  68. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  69. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  71. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  72. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
  74. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  75. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
  77. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  78. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
  80. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  81. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  82. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  83. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  84. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  85. package/web/.next/server/app/_global-error.html +2 -2
  86. package/web/.next/server/app/_global-error.rsc +1 -1
  87. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  88. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  89. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  90. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  91. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  92. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +5 -5
  93. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  94. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  95. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  96. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  97. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  98. package/web/.next/server/app/skills/page/server-reference-manifest.json +10 -10
  99. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  100. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  101. package/web/.next/server/app/tools/page/server-reference-manifest.json +10 -10
  102. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  103. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  104. package/web/.next/server/app/version/page/server-reference-manifest.json +5 -5
  105. package/web/.next/server/app/version/page.js.nft.json +1 -1
  106. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  107. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  108. package/web/.next/server/chunks/[root-of-the-server]__beda892a._.js +1 -1
  109. package/web/.next/server/chunks/[root-of-the-server]__beda892a._.js.map +1 -1
  110. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
  111. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  112. package/web/.next/server/chunks/[root-of-the-server]__d2c18946._.js +1 -1
  113. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  114. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  115. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  116. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  117. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b150ddf._.js.map +1 -1
  118. package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js +1 -1
  119. package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js.map +1 -1
  120. package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js +2 -2
  121. package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js.map +1 -1
  122. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  123. package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js +1 -1
  124. package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js +1 -1
  126. package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js +1 -1
  128. package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js.map +1 -1
  129. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js +1 -1
  130. package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js +1 -1
  131. package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js.map +1 -1
  132. package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js +1 -1
  133. package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js.map +1 -1
  134. package/web/.next/server/chunks/ssr/[root-of-the-server]__f8dd4422._.js +1 -1
  135. package/web/.next/server/chunks/ssr/[root-of-the-server]__f8dd4422._.js.map +1 -1
  136. package/web/.next/server/chunks/ssr/{_65f2dbe6._.js → _002d7e8d._.js} +2 -2
  137. package/web/.next/server/chunks/ssr/{_65f2dbe6._.js.map → _002d7e8d._.js.map} +1 -1
  138. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  139. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  140. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  141. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/_3a0b989f._.js +2 -2
  143. package/web/.next/server/chunks/ssr/_3a0b989f._.js.map +1 -1
  144. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  145. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/_5f69c13f._.js +1 -1
  147. package/web/.next/server/chunks/ssr/_5f69c13f._.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/_7c5b97c6._.js +1 -1
  149. package/web/.next/server/chunks/ssr/_7c5b97c6._.js.map +1 -1
  150. package/web/.next/server/chunks/ssr/_82c57f10._.js +1 -1
  151. package/web/.next/server/chunks/ssr/_82c57f10._.js.map +1 -1
  152. package/web/.next/server/chunks/ssr/{_d1120ef4._.js → _912552dd._.js} +2 -2
  153. package/web/.next/server/chunks/ssr/{_d1120ef4._.js.map → _912552dd._.js.map} +1 -1
  154. package/web/.next/server/chunks/ssr/_9495d50b._.js +1 -1
  155. package/web/.next/server/chunks/ssr/_9495d50b._.js.map +1 -1
  156. package/web/.next/server/chunks/ssr/{_4640978c._.js → _97486b47._.js} +2 -2
  157. package/web/.next/server/chunks/ssr/{_4640978c._.js.map → _97486b47._.js.map} +1 -1
  158. package/web/.next/server/chunks/ssr/_a0e3f7e4._.js +1 -1
  159. package/web/.next/server/chunks/ssr/_a0e3f7e4._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/_ac4a3873._.js +1 -1
  161. package/web/.next/server/chunks/ssr/_ca0aa7f0._.js +1 -1
  162. package/web/.next/server/chunks/ssr/_ca0aa7f0._.js.map +1 -1
  163. package/web/.next/server/chunks/ssr/_cb5a021e._.js +1 -1
  164. package/web/.next/server/chunks/ssr/_cb5a021e._.js.map +1 -1
  165. package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/_d86175ae._.js +1 -1
  167. package/web/.next/server/chunks/ssr/_d86175ae._.js.map +1 -1
  168. package/web/.next/server/chunks/ssr/_d8bedf13._.js +1 -1
  169. package/web/.next/server/chunks/ssr/_d8bedf13._.js.map +1 -1
  170. package/web/.next/server/chunks/ssr/_fa7efce3._.js +2 -2
  171. package/web/.next/server/chunks/ssr/_fa7efce3._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  173. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  174. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js +1 -1
  175. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js.map +1 -1
  176. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js +1 -1
  177. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js.map +1 -1
  178. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  179. package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js +1 -1
  180. package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js.map +1 -1
  181. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  182. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  183. package/web/.next/server/pages/500.html +2 -2
  184. package/web/.next/server/server-reference-manifest.js +1 -1
  185. package/web/.next/server/server-reference-manifest.json +45 -45
  186. package/web/.next/static/chunks/{3432338262ea5cfa.js → 13d4e516b0ecf5f0.js} +1 -1
  187. package/web/.next/static/chunks/{362b815754eed954.js → 6c5e7b36525b3532.js} +2 -2
  188. package/web/.next/static/chunks/{71e12e354ae78bc5.js → 818689ed2c41772b.js} +1 -1
  189. package/web/.next/static/chunks/{64b598518cbee0d3.js → 8208e717057eedd0.js} +1 -1
  190. package/web/.next/static/chunks/a07d5cbafca0277c.js +1 -0
  191. package/web/.next/static/chunks/{31d74fa1d6acc5e7.js → ad67307f6b0c1490.js} +1 -1
  192. package/web/.next/static/chunks/{345fcb2e225b77d5.js → b4e5c56e14e63cb0.js} +3 -3
  193. package/web/.next/static/chunks/{c4651ed82a2fbfc6.js → b6fc216cfa8fa52a.js} +2 -2
  194. package/web/.next/static/chunks/{b9e6584f428f2e87.js → d1c58b0747b10ae5.js} +1 -1
  195. package/web/.next/static/chunks/{dd83670b0a141611.js → d5cbc603b8bb904d.js} +1 -1
  196. package/web/.next/static/chunks/{a6e1c13997e2772b.js → deef7f0b5f7981e8.js} +1 -1
  197. package/web/.next/static/chunks/{c599446f655681bd.js → e664cd5c9c0f4fd4.js} +1 -1
  198. package/web/.next/static/chunks/14a6cecd54027e13.js +0 -1
  199. /package/web/.next/static/{K7WzDNsT2rF466QGhk8x9 → fX8_4OoVzGj6K0VH9X7nb}/_buildManifest.js +0 -0
  200. /package/web/.next/static/{K7WzDNsT2rF466QGhk8x9 → fX8_4OoVzGj6K0VH9X7nb}/_clientMiddlewareManifest.json +0 -0
  201. /package/web/.next/static/{K7WzDNsT2rF466QGhk8x9 → fX8_4OoVzGj6K0VH9X7nb}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -2,15 +2,22 @@
2
2
 
3
3
  # Shep AI
4
4
 
5
- ### AI-assisted feature development with human checkpoints
5
+ ### One command. Full lifecycle. Merged PR.
6
6
 
7
- _Describe a feature in plain English. Shep builds it step by step researching, planning, coding, and testing pausing for your approval at every critical decision._
7
+ _Describe a feature in plain English Shep researches, plans, codes, tests, and opens a PR. You approve when you want to, or let it run hands-free._
8
8
 
9
9
  [![CI](https://github.com/shep-ai/cli/actions/workflows/ci.yml/badge.svg)](https://github.com/shep-ai/cli/actions/workflows/ci.yml)
10
10
  [![npm version](https://img.shields.io/npm/v/@shepai/cli.svg?color=cb3837&logo=npm)](https://www.npmjs.com/package/@shepai/cli)
11
11
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
12
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.3+-3178c6.svg?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
13
+ [![Node.js](https://img.shields.io/badge/Node.js-≥18-339933.svg?logo=node.js&logoColor=white)](https://nodejs.org/)
14
+ [![pnpm](https://img.shields.io/badge/pnpm-≥8-f69220.svg?logo=pnpm&logoColor=white)](https://pnpm.io/)
15
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/shep-ai/cli/pulls)
16
+ [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-fe5196.svg?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
12
17
 
13
- [How It Works](#how-it-works) · [Quick Start](#quick-start) · [Trust & Safety](#trust--safety) · [CLI Reference](#cli-reference) · [FAQ](#faq)
18
+ <br />
19
+
20
+ [Features](#features) · [Quick Start](#quick-start) · [CLI Reference](#cli-reference) · [Architecture](#architecture) · [Contributing](#contributing)
14
21
 
15
22
  <br />
16
23
 
@@ -20,46 +27,6 @@ _Describe a feature in plain English. Shep builds it step by step — researchin
20
27
 
21
28
  ---
22
29
 
23
- ## Who is Shep for?
24
-
25
- Solo developers and small teams who use AI coding agents (Claude Code, Cursor, Gemini CLI) and want structure around the messy parts — turning a feature idea into a clear plan, keeping work isolated per feature, and not losing context when switching between tasks.
26
-
27
- Shep is not a replacement for your coding agent. It's the orchestration layer that sits above it: it manages requirements, plans, git branches, and review gates so you can focus on the parts that need human judgment.
28
-
29
- ---
30
-
31
- ## How It Works
32
-
33
- Every feature moves through a structured pipeline. You control how much autonomy the agent gets.
34
-
35
- ```
36
- You describe Shep generates Shep researches Shep writes Shep codes Shep opens
37
- a feature → requirements → your codebase → a plan → + tests → a PR
38
- ▲ ▲ ▲
39
- Gate 1: PRD Gate 2: Plan Gate 3: Merge
40
- (approve/edit) (approve/edit) (approve/reject)
41
- ```
42
-
43
- **Three approval gates.** Each one pauses execution and waits for you to review, edit, or approve before the agent continues. You choose which gates to enable:
44
-
45
- | Flag | Gate | What you're approving |
46
- |------|------|-----------------------|
47
- | `--allow-prd` | Requirements | Auto-approve the generated PRD |
48
- | `--allow-plan` | Plan | Auto-approve the implementation plan |
49
- | `--allow-merge` | Merge | Auto-approve the final PR |
50
- | `--allow-all` | All three | Fully autonomous — agent handles everything |
51
-
52
- **With no flags**, every gate requires your explicit approval. You see exactly what the agent intends to do before it does it.
53
-
54
- ### What happens when things go wrong
55
-
56
- - **CI fails after PR creation.** Shep reads the CI logs, diagnoses the failure, and pushes a fix. It retries up to 3 times before pausing and asking for your input.
57
- - **Agent gets stuck or produces bad output.** The feature enters a `Blocked` state. You get notified and can provide feedback, reject the current phase, or restart from a checkpoint.
58
- - **You don't like the plan.** Reject it with comments. Shep regenerates the plan incorporating your feedback.
59
- - **You want to take over mid-feature.** The code lives in a standard git worktree on a named branch. You can open it in your IDE and work on it directly at any point.
60
-
61
- ---
62
-
63
30
  ## Quick Start
64
31
 
65
32
  ```bash
@@ -68,62 +35,28 @@ npx @shepai/cli
68
35
 
69
36
  # Or install globally
70
37
  npm i -g @shepai/cli
71
-
72
- # Start Shep — opens the web dashboard at http://localhost:4050
73
38
  shep
74
- ```
75
39
 
76
- ### Your first feature
77
-
78
- ```bash
79
- # With approval gates (recommended to start)
80
- shep feat new "add a /health endpoint that returns uptime and version"
81
-
82
- # Shep will pause at each gate for your review.
83
- # Once you're comfortable, try autonomous mode:
84
- shep feat new "add rate limiting to the API" --allow-all --push --pr
40
+ # Browser opens at http://localhost:4050 — you're in
85
41
  ```
86
42
 
87
- ### Parallel features
43
+ ---
88
44
 
89
- Each feature gets its own git worktree — no stashing, no branch conflicts:
45
+ ## Features
90
46
 
91
47
  ```bash
92
- shep feat new "add stripe payments" --push --pr
93
- shep feat new "add dark mode toggle" --push --pr
94
- # Both run simultaneously in isolated worktrees
48
+ shep feat new "add stripe payments" --allow-all --push --pr
49
+ # PRD research plan code → tests → PR → CI watch — done.
95
50
  ```
96
51
 
97
- ---
52
+ - **Full lifecycle in one shot** — From idea to merged PR: requirements, technical research, implementation plan, code with tests, PR creation, and CI fix loop
53
+ - **Approve or go hands-free** — Three review gates (PRD, Plan, Merge) you can enable, disable, or skip entirely with `--allow-all`
54
+ - **Run 10 features in parallel** — Each gets its own git worktree — switch context instantly, no stashing, no branch juggling, no conflicts
55
+ - **Pick your agent** — Claude Code, Cursor CLI, or Gemini CLI — swap per feature, per repo, anytime
56
+ - **Live dashboard** — Interactive graph of every repo and feature — review diffs, approve merges, launch dev servers, all in-browser
57
+ - **100% local, zero signup** — SQLite in `~/.shep/`, nothing leaves your machine, no account needed
98
58
 
99
- ## Trust & Safety
100
-
101
- Shep runs entirely on your machine. Here's the security model:
102
-
103
- | Concern | How Shep handles it |
104
- |---------|-------------------|
105
- | **Data stays local** | All data lives in `~/.shep/` as SQLite databases. Nothing is sent to Shep servers — there are none. |
106
- | **Agent sandboxing** | Shep delegates coding to your chosen agent (Claude Code, Cursor CLI, Gemini CLI). The agent's own permission model applies. Shep does not grant additional permissions. |
107
- | **Git isolation** | Every feature runs in its own git worktree branched from your main branch. Your working directory is never modified. |
108
- | **No credential access** | Shep never reads, stores, or transmits your API keys. Agent authentication is handled by the agent itself. |
109
- | **Review before merge** | Unless you explicitly pass `--allow-merge`, no code is merged without your approval. PRs are created as drafts when using `--pr`. |
110
- | **Audit trail** | Every agent action, approval, and state transition is logged. View with `shep feat logs <id>`. |
111
-
112
- **What `--allow-all` actually means:** The agent will auto-approve requirements, auto-approve the plan, and auto-merge the PR. It does _not_ bypass CI — your CI pipeline still runs and must pass. Use this for low-risk tasks on repos with good test coverage, not for changes to production infrastructure.
113
-
114
- ---
115
-
116
- ## Features
117
-
118
- - **Structured lifecycle** — Requirements, research, planning, implementation, and review as distinct phases, not one opaque prompt
119
- - **Three configurable approval gates** — Full control, full autonomy, or anything in between
120
- - **Parallel features via worktrees** — Multiple features in flight at once with zero branch conflicts
121
- - **Agent-agnostic** — Claude Code, Cursor CLI, or Gemini CLI — swap anytime per feature or per repo
122
- - **Web dashboard** — Interactive graph of repos and features with real-time status, diff review, and approval actions at `localhost:4050`
123
- - **CI fix loop** — When CI fails, the agent reads logs, diagnoses, and retries before asking for help
124
- - **100% local** — SQLite storage, no cloud dependency, no account needed
125
-
126
- > **[Full features guide with screenshots →](./docs/FEATURES.md)**
59
+ > **[See the full Features Guide with screenshots →](./docs/FEATURES.md)**
127
60
 
128
61
  ---
129
62
 
@@ -208,56 +141,119 @@ shep run <agent> [-p prompt] [-r repo] [-s] Run an agent directly
208
141
 
209
142
  ---
210
143
 
211
- ## FAQ
144
+ ## Architecture
212
145
 
213
- **How is this different from just using Claude Code / Cursor directly?**
214
- Those tools are excellent at writing code given a prompt. Shep adds the layer above: breaking a feature into structured phases, managing requirements and plans as reviewable artifacts, isolating work in git worktrees, and handling the PR/CI lifecycle. Think of it as a project manager for your AI coding agent.
146
+ Clean Architecture with four layers. Dependencies point inward domain has zero external deps.
215
147
 
216
- **What happens if the agent writes bad code?**
217
- The same thing that happens in a normal code review. Shep creates a PR. Your CI runs. If tests fail, Shep attempts to fix them. If the fix loop exhausts retries, the feature pauses and you're notified. You can also reject at any approval gate with feedback, and Shep will regenerate.
148
+ ```mermaid
149
+ flowchart TB
150
+ P["<b>Presentation</b><br/>CLI · Web UI · TUI"]
151
+ A["<b>Application</b><br/>Use Cases · Orchestration · Ports"]
152
+ D["<b>Domain</b><br/>Entities · Value Objects · Services"]
153
+ I["<b>Infrastructure</b><br/>SQLite · LangGraph · DI"]
218
154
 
219
- **Does this work on large codebases?**
220
- Shep's research phase scans your codebase to build context before planning. The quality of the output depends on the underlying agent's ability to handle your repo. If Claude Code or Cursor works well on your codebase directly, Shep will too — it adds structure, not limitations.
155
+ P --> A --> D
156
+ I --> A
221
157
 
222
- **Can I use this on a team?**
223
- Shep runs locally and operates on your git repo. Multiple team members can each run Shep independently. Features are just branches and PRs — your existing review process applies. There is no shared server or collaboration layer today.
158
+ style P fill:#dbeafe,stroke:#3b82f6,color:#1e3a5f
159
+ style A fill:#fef3c7,stroke:#f59e0b,color:#78350f
160
+ style D fill:#d1fae5,stroke:#10b981,color:#064e3b
161
+ style I fill:#ede9fe,stroke:#8b5cf6,color:#4c1d95
162
+ ```
224
163
 
225
- **Is my code sent anywhere?**
226
- Not by Shep. Your code is sent to whichever AI agent you configure (Claude, Cursor, Gemini) under that agent's own privacy terms. Shep itself stores everything in local SQLite and makes no network calls.
164
+ | Layer | Path | Responsibility |
165
+ | -------------- | ----------------------------------- | ------------------------------------------------- |
166
+ | Domain | `packages/core/src/domain/` | Business logic, TypeSpec-generated types |
167
+ | Application | `packages/core/src/application/` | Use cases, output port interfaces |
168
+ | Infrastructure | `packages/core/src/infrastructure/` | SQLite repos, LangGraph agents, DI (tsyringe) |
169
+ | Presentation | `src/presentation/` | CLI (Commander), TUI (Inquirer), Web UI (Next.js) |
227
170
 
228
- ---
171
+ ### Feature Lifecycle
229
172
 
230
- ## Architecture
173
+ Every feature progresses through a structured SDLC pipeline with 9 states:
231
174
 
232
- Shep follows Clean Architecture with four layers. If you're interested in contributing or understanding the internals:
175
+ ```
176
+ Started -> Analyze -> Requirements -> Research -> Planning -> Implementation -> Review -> Maintain
177
+ |
178
+ (Blocked)
179
+ ```
233
180
 
234
- | Layer | Path | Responsibility |
235
- |-------|------|---------------|
236
- | Domain | `packages/core/src/domain/` | Business logic, TypeSpec-generated types |
237
- | Application | `packages/core/src/application/` | Use cases, port interfaces |
238
- | Infrastructure | `packages/core/src/infrastructure/` | SQLite, LangGraph agents, DI |
239
- | Presentation | `src/presentation/` | CLI, TUI, Web UI |
181
+ Human approval gates are configurable at PRD, Plan, and Merge phases. In `--allow-all` mode the agent handles everything autonomously.
240
182
 
241
- > **[Full architecture docs →](./docs/architecture/overview.md)**
183
+ ### Tech Stack
242
184
 
243
- ---
185
+ | Component | Technology |
186
+ | --------------- | ------------------------------------------------------------------------- |
187
+ | Language | TypeScript (ES2022) |
188
+ | Package Manager | pnpm |
189
+ | CLI Framework | Commander |
190
+ | TUI Framework | [@inquirer/prompts](https://github.com/SBoudrias/Inquirer.js) |
191
+ | Web UI | Next.js 16 + React 19 + shadcn/ui + Tailwind CSS 4 |
192
+ | Graph Viz | React Flow (XYFlow) 12 |
193
+ | Design System | Storybook 8.x |
194
+ | Build Tool | tsc + tsc-alias (prod), tsx (CLI dev), Next.js (web dev) |
195
+ | Database | SQLite (better-sqlite3, per-repo) |
196
+ | Domain Models | TypeSpec -> generated TypeScript |
197
+ | Agent System | [LangGraph](https://www.langchain.com/langgraph) (`@langchain/langgraph`) |
198
+ | DI Container | tsyringe |
199
+ | Testing | Vitest (unit/integration) + Playwright (e2e) |
200
+ | Methodology | TDD (Red-Green-Refactor) |
201
+
202
+ ### Supported Tools
203
+
204
+ Shep can detect, install, and manage the following tools:
205
+
206
+ | Category | Tools |
207
+ | ---------- | --------------------------------------------------------------------------------- |
208
+ | IDEs | Alacritty, Antigravity, Cursor, iTerm2, Kitty, TMux, VS Code, Warp, Windsurf, Zed |
209
+ | CLI Agents | Claude Code, Cursor CLI, Gemini CLI |
210
+ | Dev Tools | Git, GitHub CLI |
211
+
212
+ ### Web UI
244
213
 
245
- ## Supported Agents & Tools
214
+ The web dashboard runs at `http://localhost:4050` and provides:
246
215
 
247
- | Category | Supported |
248
- |----------|-----------|
249
- | AI Agents | Claude Code, Cursor CLI, Gemini CLI |
250
- | IDEs | VS Code, Cursor, Zed, Windsurf, and [more](./docs/FEATURES.md) |
251
- | Required | Git, GitHub CLI |
216
+ - **Dashboard canvas** Interactive React Flow graph with feature and repository nodes
217
+ - **Feature drawer** — Tabs for overview, activity, approval, rejection, PR info, deployment, and timeline
218
+ - **Create feature form** Start new features from the UI
219
+ - **Settings, Tools, Skills, and Version pages**
220
+ - **Real-time updates** via Server-Sent Events (SSE)
221
+
222
+ ### Data Model
223
+
224
+ ```
225
+ Repository --+-- Feature --+-- Plan --+-- Task -- ActionItem
226
+ | | +-- Artifact
227
+ | +-- Requirement -- Research
228
+ ```
229
+
230
+ All data lives locally in `~/.shep/`. Per-repo SQLite databases. No cloud dependency.
252
231
 
253
232
  ---
254
233
 
234
+ ## Documentation
235
+
236
+ | Document | Description |
237
+ | -------------------------------------------------- | ------------------------------------------ |
238
+ | [Features Guide](./docs/FEATURES.md) | Full features overview with screenshots |
239
+ | [Competitive Landscape](./docs/competitors/) | How Shep fits in the AI dev tool ecosystem |
240
+ | [CLAUDE.md](./CLAUDE.md) | Guidance for Claude Code instances |
241
+ | [AGENTS.md](./AGENTS.md) | Agent system architecture |
242
+ | [CONTRIBUTING-AGENTS.md](./CONTRIBUTING-AGENTS.md) | AI agent contribution guidelines |
243
+ | [Architecture](./docs/architecture/) | System design and patterns |
244
+ | [Concepts](./docs/concepts/) | Core domain concepts |
245
+ | [UI](./docs/ui/) | Web UI architecture and design system |
246
+ | [Guides](./docs/guides/) | User guides and tutorials |
247
+ | [Development](./docs/development/) | Contributing and development setup |
248
+ | [API Reference](./docs/api/) | Interface and model documentation |
249
+
255
250
  ## Contributing
256
251
 
257
252
  We welcome contributions from humans and AI agents alike.
258
253
 
259
254
  - **Humans**: See [CONTRIBUTING.md](./CONTRIBUTING.md)
260
255
  - **AI Agents**: See [CONTRIBUTING-AGENTS.md](./CONTRIBUTING-AGENTS.md)
256
+ - **Spec-driven workflow**: All features start with `/shep-kit:new-feature` — see [Spec-Driven Workflow](./docs/development/spec-driven-workflow.md)
261
257
 
262
258
  ## License
263
259
 
@@ -33,6 +33,9 @@ properties:
33
33
  interactiveAgent:
34
34
  $ref: InteractiveAgentConfig.yaml
35
35
  description: Interactive agent chat configuration (optional, defaults applied at runtime)
36
+ telegram:
37
+ $ref: TelegramConfig.yaml
38
+ description: Telegram remote control configuration (optional, defaults applied at runtime)
36
39
  required:
37
40
  - models
38
41
  - user
@@ -0,0 +1,11 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: TelegramCommandType.yaml
3
+ type: string
4
+ enum:
5
+ - start
6
+ - status
7
+ - approve
8
+ - reject
9
+ - list_features
10
+ - help
11
+ description: Types of commands accepted via the Telegram bot
@@ -0,0 +1,21 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: TelegramConfig.yaml
3
+ type: object
4
+ properties:
5
+ enabled:
6
+ type: boolean
7
+ default: false
8
+ description: Whether Telegram remote control is enabled
9
+ botToken:
10
+ type: string
11
+ description: Bot API token from @BotFather
12
+ chatId:
13
+ type: string
14
+ description: Paired Telegram chat ID
15
+ notifyEvents:
16
+ $ref: TelegramNotifyEvents.yaml
17
+ description: Notification event types forwarded to Telegram
18
+ required:
19
+ - enabled
20
+ - notifyEvents
21
+ description: Telegram Bot remote control configuration
@@ -0,0 +1,61 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: TelegramNotifyEvents.yaml
3
+ type: object
4
+ properties:
5
+ agentStarted:
6
+ type: boolean
7
+ default: false
8
+ description: Notify when agent starts running
9
+ phaseCompleted:
10
+ type: boolean
11
+ default: false
12
+ description: Notify when agent completes a workflow phase
13
+ waitingApproval:
14
+ type: boolean
15
+ default: true
16
+ description: Notify when agent is waiting for human approval
17
+ agentCompleted:
18
+ type: boolean
19
+ default: true
20
+ description: Notify when agent completes successfully
21
+ agentFailed:
22
+ type: boolean
23
+ default: true
24
+ description: Notify when agent execution fails
25
+ prMerged:
26
+ type: boolean
27
+ default: true
28
+ description: Notify when a pull request is merged on GitHub
29
+ prClosed:
30
+ type: boolean
31
+ default: false
32
+ description: Notify when a pull request is closed without merging on GitHub
33
+ prChecksPassed:
34
+ type: boolean
35
+ default: false
36
+ description: Notify when pull request CI checks pass
37
+ prChecksFailed:
38
+ type: boolean
39
+ default: true
40
+ description: Notify when pull request CI checks fail
41
+ prBlocked:
42
+ type: boolean
43
+ default: true
44
+ description: Notify when pull request has merge conflicts
45
+ mergeReviewReady:
46
+ type: boolean
47
+ default: true
48
+ description: Notify when feature is ready for merge review
49
+ required:
50
+ - agentStarted
51
+ - phaseCompleted
52
+ - waitingApproval
53
+ - agentCompleted
54
+ - agentFailed
55
+ - prMerged
56
+ - prClosed
57
+ - prChecksPassed
58
+ - prChecksFailed
59
+ - prBlocked
60
+ - mergeReviewReady
61
+ description: Telegram notification event type filters
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Telegram Service Interface
3
+ *
4
+ * Output port for interacting with the Telegram Bot API.
5
+ * Infrastructure layer provides concrete implementation.
6
+ *
7
+ * Following Clean Architecture:
8
+ * - Application layer depends on this interface
9
+ * - Infrastructure layer provides concrete implementation (TelegramService)
10
+ */
11
+ import type { NotificationEvent } from '../../../../domain/generated/output.js';
12
+ /**
13
+ * Result of validating a bot token against the Telegram API.
14
+ */
15
+ export interface TelegramBotInfo {
16
+ /** Bot's unique ID */
17
+ id: number;
18
+ /** Bot's display name */
19
+ firstName: string;
20
+ /** Bot's @username */
21
+ username: string;
22
+ }
23
+ /**
24
+ * Result of resolving the chat ID from recent bot updates.
25
+ */
26
+ export interface TelegramChatResolution {
27
+ /** Resolved chat ID from the first /start message */
28
+ chatId: string;
29
+ /** Display name of the user who started the chat */
30
+ firstName: string;
31
+ }
32
+ /**
33
+ * Port interface for Telegram Bot API interactions.
34
+ *
35
+ * Implementations must:
36
+ * - Use the Telegram Bot HTTP API (no SDK dependency required)
37
+ * - Handle network errors gracefully (log, don't crash the host process)
38
+ * - Respect the enabled/disabled toggle in TelegramConfig
39
+ */
40
+ export interface ITelegramService {
41
+ /**
42
+ * Validate a bot token by calling getMe on the Telegram Bot API.
43
+ *
44
+ * @param botToken - The bot token to validate
45
+ * @returns Bot info if valid
46
+ * @throws TelegramAuthError if the token is invalid
47
+ */
48
+ validateBotToken(botToken: string): Promise<TelegramBotInfo>;
49
+ /**
50
+ * Resolve the chat ID by polling getUpdates for a /start message.
51
+ *
52
+ * @param botToken - The bot token to use
53
+ * @returns Chat resolution with the chat ID and sender name
54
+ * @throws TelegramNoChatError if no /start message is found
55
+ */
56
+ resolveChatId(botToken: string): Promise<TelegramChatResolution>;
57
+ /**
58
+ * Send a plain text message to the configured Telegram chat.
59
+ *
60
+ * @param botToken - The bot token to use
61
+ * @param chatId - The chat ID to send to
62
+ * @param text - The message text (supports Telegram MarkdownV2)
63
+ */
64
+ sendMessage(botToken: string, chatId: string, text: string): Promise<void>;
65
+ /**
66
+ * Format and send a notification event to Telegram.
67
+ *
68
+ * @param botToken - The bot token to use
69
+ * @param chatId - The chat ID to send to
70
+ * @param event - The notification event to format and send
71
+ */
72
+ sendNotification(botToken: string, chatId: string, event: NotificationEvent): Promise<void>;
73
+ }
74
+ /**
75
+ * Error thrown when a Telegram bot token is invalid or expired.
76
+ */
77
+ export declare class TelegramAuthError extends Error {
78
+ constructor(message: string);
79
+ }
80
+ /**
81
+ * Error thrown when no /start message is found in recent bot updates.
82
+ */
83
+ export declare class TelegramNoChatError extends Error {
84
+ constructor(message: string);
85
+ }
86
+ /**
87
+ * Error thrown when sending a Telegram message fails.
88
+ */
89
+ export declare class TelegramSendError extends Error {
90
+ constructor(message: string);
91
+ }
92
+ //# sourceMappingURL=telegram-service.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/telegram-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE7D;;;;;;OAMG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAEjE;;;;;;OAMG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3E;;;;;;OAMG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7F;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,OAAO,EAAE,MAAM;CAI5B"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Telegram Service Interface
3
+ *
4
+ * Output port for interacting with the Telegram Bot API.
5
+ * Infrastructure layer provides concrete implementation.
6
+ *
7
+ * Following Clean Architecture:
8
+ * - Application layer depends on this interface
9
+ * - Infrastructure layer provides concrete implementation (TelegramService)
10
+ */
11
+ /**
12
+ * Error thrown when a Telegram bot token is invalid or expired.
13
+ */
14
+ export class TelegramAuthError extends Error {
15
+ constructor(message) {
16
+ super(message);
17
+ this.name = 'TelegramAuthError';
18
+ }
19
+ }
20
+ /**
21
+ * Error thrown when no /start message is found in recent bot updates.
22
+ */
23
+ export class TelegramNoChatError extends Error {
24
+ constructor(message) {
25
+ super(message);
26
+ this.name = 'TelegramNoChatError';
27
+ }
28
+ }
29
+ /**
30
+ * Error thrown when sending a Telegram message fails.
31
+ */
32
+ export class TelegramSendError extends Error {
33
+ constructor(message) {
34
+ super(message);
35
+ this.name = 'TelegramSendError';
36
+ }
37
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Configure Telegram Use Case
3
+ *
4
+ * Validates the Telegram bot token, resolves the chat ID, and
5
+ * persists the Telegram configuration to settings.
6
+ *
7
+ * Business Rules:
8
+ * - Bot token must be valid (verified via Telegram API getMe)
9
+ * - Chat ID is resolved automatically from recent /start messages
10
+ * - If both token and chatId are provided, skip auto-resolution
11
+ * - Disabling clears only the enabled flag (preserves token + chatId for re-enable)
12
+ */
13
+ import type { Settings, TelegramNotifyEvents } from '../../../domain/generated/output.js';
14
+ import type { ISettingsRepository } from '../../ports/output/repositories/settings.repository.interface.js';
15
+ import type { ITelegramService, TelegramBotInfo, TelegramChatResolution } from '../../ports/output/services/telegram-service.interface.js';
16
+ export interface ConfigureTelegramInput {
17
+ /** Enable or disable Telegram integration */
18
+ enabled: boolean;
19
+ /** Bot API token from @BotFather (required when enabling) */
20
+ botToken?: string;
21
+ /** Chat ID to send notifications to (optional, auto-resolved if omitted) */
22
+ chatId?: string;
23
+ /** Notification event type filters (optional, uses defaults if omitted) */
24
+ notifyEvents?: Partial<TelegramNotifyEvents>;
25
+ }
26
+ export interface ConfigureTelegramResult {
27
+ /** Updated settings */
28
+ settings: Settings;
29
+ /** Bot info (only when enabling with a new token) */
30
+ botInfo?: TelegramBotInfo;
31
+ /** Chat resolution info (only when auto-resolving chat ID) */
32
+ chatResolution?: TelegramChatResolution;
33
+ }
34
+ export declare class ConfigureTelegramUseCase {
35
+ private readonly settingsRepository;
36
+ private readonly telegramService;
37
+ constructor(settingsRepository: ISettingsRepository, telegramService: ITelegramService);
38
+ execute(input: ConfigureTelegramInput): Promise<ConfigureTelegramResult>;
39
+ private getDefaultTelegramConfig;
40
+ private getDefaultNotifyEvents;
41
+ }
42
+ //# sourceMappingURL=configure-telegram.use-case.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configure-telegram.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/telegram/configure-telegram.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EACV,QAAQ,EAER,oBAAoB,EACrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAC5G,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACvB,MAAM,2DAA2D,CAAC;AAEnE,MAAM,WAAW,sBAAsB;IACrC,6CAA6C;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,uBAAuB;IACtC,uBAAuB;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,8DAA8D;IAC9D,cAAc,CAAC,EAAE,sBAAsB,CAAC;CACzC;AAED,qBACa,wBAAwB;IAGjC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAFf,kBAAkB,EAAE,mBAAmB,EAEvC,eAAe,EAAE,gBAAgB;IAG9C,OAAO,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA8D9E,OAAO,CAAC,wBAAwB;IAOhC,OAAO,CAAC,sBAAsB;CAe/B"}