@shepai/cli 1.181.0 → 1.182.0-pr512.369be8e

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 (386) hide show
  1. package/apis/json-schema/MessagingCommand.yaml +28 -0
  2. package/apis/json-schema/MessagingCommandType.yaml +17 -0
  3. package/apis/json-schema/MessagingConfig.yaml +40 -0
  4. package/apis/json-schema/MessagingFrameType.yaml +8 -0
  5. package/apis/json-schema/MessagingNotification.yaml +22 -0
  6. package/apis/json-schema/MessagingPlatform.yaml +7 -0
  7. package/apis/json-schema/MessagingPlatformConfig.yaml +38 -0
  8. package/apis/json-schema/Settings.yaml +3 -0
  9. package/dist/packages/core/src/application/ports/output/services/gateway-client.interface.d.ts +58 -0
  10. package/dist/packages/core/src/application/ports/output/services/gateway-client.interface.d.ts.map +1 -0
  11. package/dist/packages/core/src/application/ports/output/services/gateway-client.interface.js +10 -0
  12. package/dist/packages/core/src/application/ports/output/services/message-sender.interface.d.ts +18 -0
  13. package/dist/packages/core/src/application/ports/output/services/message-sender.interface.d.ts.map +1 -0
  14. package/dist/packages/core/src/application/ports/output/services/message-sender.interface.js +9 -0
  15. package/dist/packages/core/src/application/ports/output/services/messaging-service.interface.d.ts +34 -0
  16. package/dist/packages/core/src/application/ports/output/services/messaging-service.interface.d.ts.map +1 -0
  17. package/dist/packages/core/src/application/ports/output/services/messaging-service.interface.js +12 -0
  18. package/dist/packages/core/src/application/ports/output/services/telegram-client.interface.d.ts +19 -0
  19. package/dist/packages/core/src/application/ports/output/services/telegram-client.interface.d.ts.map +1 -0
  20. package/dist/packages/core/src/application/ports/output/services/telegram-client.interface.js +8 -0
  21. package/dist/packages/core/src/application/use-cases/messaging/begin-pairing.use-case.d.ts +46 -0
  22. package/dist/packages/core/src/application/use-cases/messaging/begin-pairing.use-case.d.ts.map +1 -0
  23. package/dist/packages/core/src/application/use-cases/messaging/begin-pairing.use-case.js +148 -0
  24. package/dist/packages/core/src/application/use-cases/messaging/confirm-pairing.use-case.d.ts +19 -0
  25. package/dist/packages/core/src/application/use-cases/messaging/confirm-pairing.use-case.d.ts.map +1 -0
  26. package/dist/packages/core/src/application/use-cases/messaging/confirm-pairing.use-case.js +63 -0
  27. package/dist/packages/core/src/application/use-cases/messaging/disconnect-messaging.use-case.d.ts +19 -0
  28. package/dist/packages/core/src/application/use-cases/messaging/disconnect-messaging.use-case.d.ts.map +1 -0
  29. package/dist/packages/core/src/application/use-cases/messaging/disconnect-messaging.use-case.js +65 -0
  30. package/dist/packages/core/src/domain/generated/output.d.ts +155 -0
  31. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  32. package/dist/packages/core/src/domain/generated/output.js +26 -0
  33. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  34. package/dist/packages/core/src/infrastructure/di/container.js +117 -0
  35. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +24 -0
  36. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  37. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +117 -0
  38. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-messaging-remote-control.d.ts +22 -0
  39. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-messaging-remote-control.d.ts.map +1 -0
  40. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-messaging-remote-control.js +62 -0
  41. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  42. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +43 -3
  43. package/dist/packages/core/src/infrastructure/services/messaging/chat-relay.d.ts +45 -0
  44. package/dist/packages/core/src/infrastructure/services/messaging/chat-relay.d.ts.map +1 -0
  45. package/dist/packages/core/src/infrastructure/services/messaging/chat-relay.js +100 -0
  46. package/dist/packages/core/src/infrastructure/services/messaging/command-executor.d.ts +53 -0
  47. package/dist/packages/core/src/infrastructure/services/messaging/command-executor.d.ts.map +1 -0
  48. package/dist/packages/core/src/infrastructure/services/messaging/command-executor.js +200 -0
  49. package/dist/packages/core/src/infrastructure/services/messaging/content-sanitizer.d.ts +23 -0
  50. package/dist/packages/core/src/infrastructure/services/messaging/content-sanitizer.d.ts.map +1 -0
  51. package/dist/packages/core/src/infrastructure/services/messaging/content-sanitizer.js +39 -0
  52. package/dist/packages/core/src/infrastructure/services/messaging/http-gateway.client.d.ts +19 -0
  53. package/dist/packages/core/src/infrastructure/services/messaging/http-gateway.client.d.ts.map +1 -0
  54. package/dist/packages/core/src/infrastructure/services/messaging/http-gateway.client.js +124 -0
  55. package/dist/packages/core/src/infrastructure/services/messaging/http-telegram.client.d.ts +18 -0
  56. package/dist/packages/core/src/infrastructure/services/messaging/http-telegram.client.d.ts.map +1 -0
  57. package/dist/packages/core/src/infrastructure/services/messaging/http-telegram.client.js +60 -0
  58. package/dist/packages/core/src/infrastructure/services/messaging/messaging-tunnel.adapter.d.ts +68 -0
  59. package/dist/packages/core/src/infrastructure/services/messaging/messaging-tunnel.adapter.d.ts.map +1 -0
  60. package/dist/packages/core/src/infrastructure/services/messaging/messaging-tunnel.adapter.js +262 -0
  61. package/dist/packages/core/src/infrastructure/services/messaging/messaging.service.d.ts +78 -0
  62. package/dist/packages/core/src/infrastructure/services/messaging/messaging.service.d.ts.map +1 -0
  63. package/dist/packages/core/src/infrastructure/services/messaging/messaging.service.js +279 -0
  64. package/dist/packages/core/src/infrastructure/services/messaging/notification-emitter.d.ts +33 -0
  65. package/dist/packages/core/src/infrastructure/services/messaging/notification-emitter.d.ts.map +1 -0
  66. package/dist/packages/core/src/infrastructure/services/messaging/notification-emitter.js +79 -0
  67. package/dist/packages/core/src/infrastructure/services/messaging/stub-gateway.client.d.ts +12 -0
  68. package/dist/packages/core/src/infrastructure/services/messaging/stub-gateway.client.d.ts.map +1 -0
  69. package/dist/packages/core/src/infrastructure/services/messaging/stub-gateway.client.js +26 -0
  70. package/dist/packages/core/src/infrastructure/services/messaging/telegram-message-sender.d.ts +26 -0
  71. package/dist/packages/core/src/infrastructure/services/messaging/telegram-message-sender.d.ts.map +1 -0
  72. package/dist/packages/core/src/infrastructure/services/messaging/telegram-message-sender.js +49 -0
  73. package/dist/packages/core/src/infrastructure/services/messaging/telegram-webhook.parser.d.ts +28 -0
  74. package/dist/packages/core/src/infrastructure/services/messaging/telegram-webhook.parser.d.ts.map +1 -0
  75. package/dist/packages/core/src/infrastructure/services/messaging/telegram-webhook.parser.js +45 -0
  76. package/dist/packages/core/src/infrastructure/services/messaging/tunnel-protocol.d.ts +102 -0
  77. package/dist/packages/core/src/infrastructure/services/messaging/tunnel-protocol.d.ts.map +1 -0
  78. package/dist/packages/core/src/infrastructure/services/messaging/tunnel-protocol.js +16 -0
  79. package/dist/packages/core/src/infrastructure/services/messaging/whatsapp-webhook.parser.d.ts +39 -0
  80. package/dist/packages/core/src/infrastructure/services/messaging/whatsapp-webhook.parser.d.ts.map +1 -0
  81. package/dist/packages/core/src/infrastructure/services/messaging/whatsapp-webhook.parser.js +56 -0
  82. package/dist/src/presentation/cli/commands/_serve.command.d.ts.map +1 -1
  83. package/dist/src/presentation/cli/commands/_serve.command.js +6 -0
  84. package/dist/src/presentation/cli/commands/app/del.command.d.ts +14 -0
  85. package/dist/src/presentation/cli/commands/app/del.command.d.ts.map +1 -0
  86. package/dist/src/presentation/cli/commands/app/del.command.js +58 -0
  87. package/dist/src/presentation/cli/commands/app/index.d.ts +20 -0
  88. package/dist/src/presentation/cli/commands/app/index.d.ts.map +1 -0
  89. package/dist/src/presentation/cli/commands/app/index.js +33 -0
  90. package/dist/src/presentation/cli/commands/app/ls.command.d.ts +11 -0
  91. package/dist/src/presentation/cli/commands/app/ls.command.d.ts.map +1 -0
  92. package/dist/src/presentation/cli/commands/app/ls.command.js +74 -0
  93. package/dist/src/presentation/cli/commands/app/new.command.d.ts +17 -0
  94. package/dist/src/presentation/cli/commands/app/new.command.d.ts.map +1 -0
  95. package/dist/src/presentation/cli/commands/app/new.command.js +58 -0
  96. package/dist/src/presentation/cli/commands/app/resolve-application.d.ts +10 -0
  97. package/dist/src/presentation/cli/commands/app/resolve-application.d.ts.map +1 -0
  98. package/dist/src/presentation/cli/commands/app/resolve-application.js +33 -0
  99. package/dist/src/presentation/cli/commands/app/show.command.d.ts +11 -0
  100. package/dist/src/presentation/cli/commands/app/show.command.d.ts.map +1 -0
  101. package/dist/src/presentation/cli/commands/app/show.command.js +95 -0
  102. package/dist/src/presentation/cli/commands/settings/index.d.ts.map +1 -1
  103. package/dist/src/presentation/cli/commands/settings/index.js +3 -1
  104. package/dist/src/presentation/cli/commands/settings/messaging.command.d.ts +17 -0
  105. package/dist/src/presentation/cli/commands/settings/messaging.command.d.ts.map +1 -0
  106. package/dist/src/presentation/cli/commands/settings/messaging.command.js +187 -0
  107. package/dist/src/presentation/cli/index.js +2 -0
  108. package/dist/src/presentation/web/app/actions/messaging.d.ts +29 -0
  109. package/dist/src/presentation/web/app/actions/messaging.d.ts.map +1 -0
  110. package/dist/src/presentation/web/app/actions/messaging.js +55 -0
  111. package/dist/src/presentation/web/components/features/settings/messaging-settings-section.d.ts +6 -0
  112. package/dist/src/presentation/web/components/features/settings/messaging-settings-section.d.ts.map +1 -0
  113. package/dist/src/presentation/web/components/features/settings/messaging-settings-section.js +206 -0
  114. package/dist/src/presentation/web/components/features/settings/messaging-settings-section.stories.d.ts +17 -0
  115. package/dist/src/presentation/web/components/features/settings/messaging-settings-section.stories.d.ts.map +1 -0
  116. package/dist/src/presentation/web/components/features/settings/messaging-settings-section.stories.js +55 -0
  117. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  118. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +9 -2
  119. package/dist/src/presentation/web/dev-server.js +27 -0
  120. package/dist/translations/ar/cli.json +63 -0
  121. package/dist/translations/ar/web.json +2 -1
  122. package/dist/translations/de/cli.json +63 -0
  123. package/dist/translations/de/web.json +2 -1
  124. package/dist/translations/en/cli.json +63 -0
  125. package/dist/translations/en/web.json +13 -12
  126. package/dist/translations/es/cli.json +63 -0
  127. package/dist/translations/es/web.json +2 -1
  128. package/dist/translations/fr/cli.json +63 -0
  129. package/dist/translations/fr/web.json +2 -1
  130. package/dist/translations/he/cli.json +63 -0
  131. package/dist/translations/he/web.json +2 -1
  132. package/dist/translations/pt/cli.json +63 -0
  133. package/dist/translations/pt/web.json +2 -1
  134. package/dist/translations/ru/cli.json +63 -0
  135. package/dist/translations/ru/web.json +2 -1
  136. package/dist/translations/uk/cli.json +63 -0
  137. package/dist/translations/uk/web.json +2 -1
  138. package/dist/tsconfig.build.tsbuildinfo +1 -1
  139. package/package.json +3 -1
  140. package/web/.next/BUILD_ID +1 -1
  141. package/web/.next/build-manifest.json +2 -2
  142. package/web/.next/fallback-build-manifest.json +2 -2
  143. package/web/.next/prerender-manifest.json +3 -3
  144. package/web/.next/required-server-files.js +3 -3
  145. package/web/.next/required-server-files.json +3 -3
  146. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +32 -32
  147. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  148. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  149. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +30 -30
  150. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  151. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  152. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +33 -33
  153. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  154. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  155. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +41 -41
  156. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  157. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  158. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +41 -41
  159. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  160. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  161. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +31 -31
  162. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  163. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  164. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +31 -31
  165. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  166. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  167. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +30 -30
  168. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  169. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  170. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +33 -33
  171. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  172. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  173. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +41 -41
  174. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  175. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  176. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +41 -41
  177. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  178. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  179. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +30 -30
  180. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  181. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  182. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +31 -31
  183. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  184. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  185. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +31 -31
  186. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  187. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  188. package/web/.next/server/app/_global-error.html +2 -2
  189. package/web/.next/server/app/_global-error.rsc +1 -1
  190. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  191. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  192. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  193. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  194. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  195. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +7 -7
  196. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  197. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  198. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  199. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  200. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  201. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  202. package/web/.next/server/app/application/[id]/page/server-reference-manifest.json +15 -15
  203. package/web/.next/server/app/application/[id]/page.js.nft.json +1 -1
  204. package/web/.next/server/app/application/[id]/page_client-reference-manifest.js +1 -1
  205. package/web/.next/server/app/features/page/server-reference-manifest.json +7 -7
  206. package/web/.next/server/app/features/page.js.nft.json +1 -1
  207. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  208. package/web/.next/server/app/settings/page/server-reference-manifest.json +65 -20
  209. package/web/.next/server/app/settings/page.js +1 -1
  210. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  211. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  212. package/web/.next/server/app/skills/page/server-reference-manifest.json +15 -15
  213. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  214. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  215. package/web/.next/server/app/tools/page/server-reference-manifest.json +13 -13
  216. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  217. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  218. package/web/.next/server/app/version/page/server-reference-manifest.json +7 -7
  219. package/web/.next/server/app/version/page.js.nft.json +1 -1
  220. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  221. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  222. package/web/.next/server/chunks/[root-of-the-server]__b2a4bfcc._.js +1 -1
  223. package/web/.next/server/chunks/[root-of-the-server]__b2a4bfcc._.js.map +1 -1
  224. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
  225. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  227. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  228. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  229. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  230. package/web/.next/server/chunks/ssr/{7f428_lucide-react_dist_esm_icons_5da25833._.js → 7f428_lucide-react_dist_esm_icons_469d51b7._.js} +2 -2
  231. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_469d51b7._.js.map +1 -0
  232. package/web/.next/server/chunks/ssr/[root-of-the-server]__013a0318._.js +1 -1
  233. package/web/.next/server/chunks/ssr/[root-of-the-server]__013a0318._.js.map +1 -1
  234. package/web/.next/server/chunks/ssr/[root-of-the-server]__17dadd08._.js +1 -1
  235. package/web/.next/server/chunks/ssr/[root-of-the-server]__17dadd08._.js.map +1 -1
  236. package/web/.next/server/chunks/ssr/[root-of-the-server]__1925bef0._.js +1 -1
  237. package/web/.next/server/chunks/ssr/[root-of-the-server]__1a9687c4._.js +1 -1
  238. package/web/.next/server/chunks/ssr/[root-of-the-server]__1a9687c4._.js.map +1 -1
  239. package/web/.next/server/chunks/ssr/[root-of-the-server]__24756fa9._.js +2 -2
  240. package/web/.next/server/chunks/ssr/[root-of-the-server]__24756fa9._.js.map +1 -1
  241. package/web/.next/server/chunks/ssr/[root-of-the-server]__42d066e1._.js +3 -0
  242. package/web/.next/server/chunks/ssr/[root-of-the-server]__42d066e1._.js.map +1 -0
  243. package/web/.next/server/chunks/ssr/[root-of-the-server]__4ee8be85._.js +1 -1
  244. package/web/.next/server/chunks/ssr/[root-of-the-server]__70986695._.js +1 -1
  245. package/web/.next/server/chunks/ssr/[root-of-the-server]__70986695._.js.map +1 -1
  246. package/web/.next/server/chunks/ssr/[root-of-the-server]__a5ea76a6._.js +1 -1
  247. package/web/.next/server/chunks/ssr/[root-of-the-server]__a5ea76a6._.js.map +1 -1
  248. package/web/.next/server/chunks/ssr/[root-of-the-server]__dd3e834e._.js +1 -1
  249. package/web/.next/server/chunks/ssr/[root-of-the-server]__dd3e834e._.js.map +1 -1
  250. package/web/.next/server/chunks/ssr/[root-of-the-server]__e265da61._.js +1 -1
  251. package/web/.next/server/chunks/ssr/[root-of-the-server]__f3ca7bea._.js +1 -1
  252. package/web/.next/server/chunks/ssr/[root-of-the-server]__f3ca7bea._.js.map +1 -1
  253. package/web/.next/server/chunks/ssr/{[root-of-the-server]__bb391c45._.js → [root-of-the-server]__f4f07ee6._.js} +2 -2
  254. package/web/.next/server/chunks/ssr/[root-of-the-server]__f4f07ee6._.js.map +1 -0
  255. package/web/.next/server/chunks/ssr/_0277d3b5._.js +1 -1
  256. package/web/.next/server/chunks/ssr/_0277d3b5._.js.map +1 -1
  257. package/web/.next/server/chunks/ssr/{_da028026._.js → _1c03437e._.js} +2 -2
  258. package/web/.next/server/chunks/ssr/{_da028026._.js.map → _1c03437e._.js.map} +1 -1
  259. package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -1
  260. package/web/.next/server/chunks/ssr/{_655cc4fd._.js → _49838974._.js} +2 -2
  261. package/web/.next/server/chunks/ssr/{_655cc4fd._.js.map → _49838974._.js.map} +1 -1
  262. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  263. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  264. package/web/.next/server/chunks/ssr/_708a9069._.js +3 -0
  265. package/web/.next/server/chunks/ssr/_708a9069._.js.map +1 -0
  266. package/web/.next/server/chunks/ssr/{_295fffde._.js → _86bb5eb1._.js} +6 -2
  267. package/web/.next/server/chunks/ssr/_86bb5eb1._.js.map +1 -0
  268. package/web/.next/server/chunks/ssr/_946a7fc6._.js +1 -1
  269. package/web/.next/server/chunks/ssr/_946a7fc6._.js.map +1 -1
  270. package/web/.next/server/chunks/ssr/{_fbf4db9c._.js → _b6df235f._.js} +2 -2
  271. package/web/.next/server/chunks/ssr/{_fbf4db9c._.js.map → _b6df235f._.js.map} +1 -1
  272. package/web/.next/server/chunks/ssr/_bad61758._.js +3 -0
  273. package/web/.next/server/chunks/ssr/_bad61758._.js.map +1 -0
  274. package/web/.next/server/chunks/ssr/{_e5753970._.js → _c5357cf5._.js} +2 -2
  275. package/web/.next/server/chunks/ssr/{_e5753970._.js.map → _c5357cf5._.js.map} +1 -1
  276. package/web/.next/server/chunks/ssr/_d7d82308._.js +3 -0
  277. package/web/.next/server/chunks/ssr/_d7d82308._.js.map +1 -0
  278. package/web/.next/server/chunks/ssr/_dd852eae._.js +3 -0
  279. package/web/.next/server/chunks/ssr/_dd852eae._.js.map +1 -0
  280. package/web/.next/server/chunks/ssr/_eff1b518._.js +1 -1
  281. package/web/.next/server/chunks/ssr/_eff1b518._.js.map +1 -1
  282. package/web/.next/server/chunks/ssr/_f227429a._.js +1 -1
  283. package/web/.next/server/chunks/ssr/_f227429a._.js.map +1 -1
  284. package/web/.next/server/chunks/ssr/_f6b812ec._.js +9 -0
  285. package/web/.next/server/chunks/ssr/_f6b812ec._.js.map +1 -0
  286. package/web/.next/server/chunks/ssr/_f86fc1bf._.js +1 -1
  287. package/web/.next/server/chunks/ssr/_f86fc1bf._.js.map +1 -1
  288. package/web/.next/server/chunks/ssr/_f8c55130._.js +1 -1
  289. package/web/.next/server/chunks/ssr/{_5bb39227._.js → _fa95e517._.js} +2 -2
  290. package/web/.next/server/chunks/ssr/{_5bb39227._.js.map → _fa95e517._.js.map} +1 -1
  291. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  292. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  293. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  294. package/web/.next/server/chunks/ssr/node_modules__pnpm_64cc95e9._.js +3 -0
  295. package/web/.next/server/chunks/ssr/node_modules__pnpm_64cc95e9._.js.map +1 -0
  296. package/web/.next/server/chunks/ssr/src_presentation_web_36f2bc45._.js +1 -1
  297. package/web/.next/server/chunks/ssr/src_presentation_web_36f2bc45._.js.map +1 -1
  298. package/web/.next/server/chunks/ssr/src_presentation_web_486908de._.js +1 -1
  299. package/web/.next/server/chunks/ssr/src_presentation_web_486908de._.js.map +1 -1
  300. package/web/.next/server/chunks/ssr/src_presentation_web_5c3596bc._.js +1 -1
  301. package/web/.next/server/chunks/ssr/src_presentation_web_5c3596bc._.js.map +1 -1
  302. package/web/.next/server/chunks/ssr/src_presentation_web_6159fef8._.js +1 -1
  303. package/web/.next/server/chunks/ssr/src_presentation_web_6159fef8._.js.map +1 -1
  304. package/web/.next/server/chunks/ssr/src_presentation_web_6326f81e._.js +1 -1
  305. package/web/.next/server/chunks/ssr/src_presentation_web_6326f81e._.js.map +1 -1
  306. package/web/.next/server/chunks/ssr/src_presentation_web_6b2fdcd8._.js +1 -1
  307. package/web/.next/server/chunks/ssr/src_presentation_web_6b2fdcd8._.js.map +1 -1
  308. package/web/.next/server/chunks/ssr/src_presentation_web_74703c9f._.js +1 -1
  309. package/web/.next/server/chunks/ssr/src_presentation_web_74703c9f._.js.map +1 -1
  310. package/web/.next/server/chunks/ssr/src_presentation_web_a8056dac._.js +1 -1
  311. package/web/.next/server/chunks/ssr/src_presentation_web_a8056dac._.js.map +1 -1
  312. package/web/.next/server/chunks/ssr/src_presentation_web_ad42cc73._.js +1 -1
  313. package/web/.next/server/chunks/ssr/src_presentation_web_ad42cc73._.js.map +1 -1
  314. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +3 -3
  315. package/web/.next/server/chunks/ssr/src_presentation_web_b00bfb08._.js +1 -1
  316. package/web/.next/server/chunks/ssr/src_presentation_web_b00bfb08._.js.map +1 -1
  317. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
  318. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
  319. package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js +1 -1
  320. package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js.map +1 -1
  321. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  322. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  323. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
  324. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
  325. package/web/.next/server/chunks/ssr/src_presentation_web_f1edcf5e._.js +1 -1
  326. package/web/.next/server/chunks/ssr/src_presentation_web_f1edcf5e._.js.map +1 -1
  327. package/web/.next/server/chunks/ssr/src_presentation_web_f9436804._.js +1 -1
  328. package/web/.next/server/chunks/ssr/src_presentation_web_f9436804._.js.map +1 -1
  329. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
  330. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
  331. package/web/.next/server/pages/500.html +2 -2
  332. package/web/.next/server/server-reference-manifest.js +1 -1
  333. package/web/.next/server/server-reference-manifest.json +109 -64
  334. package/web/.next/static/chunks/0239d68df2738a2a.js +1 -0
  335. package/web/.next/static/chunks/{b40755bc75789277.js → 101e7888c4b7e328.js} +1 -1
  336. package/web/.next/static/chunks/{53f9385d4a447ad4.js → 18fa374b1b856687.js} +2 -2
  337. package/web/.next/static/chunks/{7c3fe3c694874dea.js → 32940aa08b947f66.js} +1 -1
  338. package/web/.next/static/chunks/{ae94e98b7163890b.js → 42d86b3a628702b0.js} +1 -1
  339. package/web/.next/static/chunks/6da04daaac881f27.js +1 -0
  340. package/web/.next/static/chunks/6f9ba92ee19bcbd7.js +5 -0
  341. package/web/.next/static/chunks/{25bbd99fa3dcc0b2.js → 79a8ec8b8de391f8.js} +1 -1
  342. package/web/.next/static/chunks/{e8444bf5f6c35f8b.js → 7bbe49d9daedd94d.js} +5 -1
  343. package/web/.next/static/chunks/{d8e96baa3feb79cb.js → 7e0cb9a6e06f075f.js} +1 -1
  344. package/web/.next/static/chunks/87b197ebd301232a.js +3 -0
  345. package/web/.next/static/chunks/8fe70d4e73e1fe31.css +1 -0
  346. package/web/.next/static/chunks/{6ad23a3ac827b65b.js → b3051a00d29f0f0f.js} +1 -1
  347. package/web/.next/static/chunks/b6b07ccbccda00e2.js +7 -0
  348. package/web/.next/static/chunks/b9b3a6d83e07b213.js +1 -0
  349. package/web/.next/static/chunks/c92bc820f657f9d9.js +1 -0
  350. package/web/.next/static/chunks/{e11508a76f5fca98.js → d436ca26f19e7c42.js} +1 -1
  351. package/web/.next/static/chunks/{5635fe220632fced.js → d8505faa90c97f2b.js} +1 -1
  352. package/web/.next/static/chunks/{d7310881615cb55b.js → e2b0da48f8e15118.js} +1 -1
  353. package/web/.next/static/chunks/{443c0073e58878d8.js → e3ecbef934b77afa.js} +1 -1
  354. package/web/.next/static/chunks/{b6ddc3e5f64bef7f.js → e6fc771fc21a0b62.js} +1 -1
  355. package/web/.next/static/chunks/ecafea5bc026ed41.js +1 -0
  356. package/web/.next/static/chunks/{fe29d30a75e697ed.js → f28fa2d7fa19eee6.js} +1 -1
  357. package/web/.next/static/chunks/f79d32f56056c680.js +1 -0
  358. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_5da25833._.js.map +0 -1
  359. package/web/.next/server/chunks/ssr/[root-of-the-server]__a6f2b763._.js +0 -3
  360. package/web/.next/server/chunks/ssr/[root-of-the-server]__a6f2b763._.js.map +0 -1
  361. package/web/.next/server/chunks/ssr/[root-of-the-server]__bb391c45._.js.map +0 -1
  362. package/web/.next/server/chunks/ssr/_295fffde._.js.map +0 -1
  363. package/web/.next/server/chunks/ssr/_44531b76._.js +0 -9
  364. package/web/.next/server/chunks/ssr/_44531b76._.js.map +0 -1
  365. package/web/.next/server/chunks/ssr/_5bf2415e._.js +0 -7
  366. package/web/.next/server/chunks/ssr/_5bf2415e._.js.map +0 -1
  367. package/web/.next/server/chunks/ssr/_869a3a15._.js +0 -3
  368. package/web/.next/server/chunks/ssr/_869a3a15._.js.map +0 -1
  369. package/web/.next/server/chunks/ssr/_b227ff50._.js +0 -3
  370. package/web/.next/server/chunks/ssr/_b227ff50._.js.map +0 -1
  371. package/web/.next/server/chunks/ssr/_e071ba48._.js +0 -3
  372. package/web/.next/server/chunks/ssr/_e071ba48._.js.map +0 -1
  373. package/web/.next/server/chunks/ssr/node_modules__pnpm_747b43ac._.js +0 -3
  374. package/web/.next/server/chunks/ssr/node_modules__pnpm_747b43ac._.js.map +0 -1
  375. package/web/.next/static/chunks/06b9d6dbf635c370.css +0 -1
  376. package/web/.next/static/chunks/15951ad67a810e2c.js +0 -5
  377. package/web/.next/static/chunks/1ae0cf5be30ef398.js +0 -1
  378. package/web/.next/static/chunks/7a9d8b705c0f8d2d.js +0 -7
  379. package/web/.next/static/chunks/8492d8e0b5f9a4e8.js +0 -1
  380. package/web/.next/static/chunks/927442d2628f6e22.js +0 -1
  381. package/web/.next/static/chunks/b99506a6f7bc2fa8.js +0 -1
  382. package/web/.next/static/chunks/be165be5db7a6054.js +0 -7
  383. package/web/.next/static/chunks/e65f14d14ad46a32.js +0 -1
  384. /package/web/.next/static/{_PzlF7w3QzhaBsMnhT75_ → i04ZwSXpTvkppxSePII4p}/_buildManifest.js +0 -0
  385. /package/web/.next/static/{_PzlF7w3QzhaBsMnhT75_ → i04ZwSXpTvkppxSePII4p}/_clientMiddlewareManifest.json +0 -0
  386. /package/web/.next/static/{_PzlF7w3QzhaBsMnhT75_ → i04ZwSXpTvkppxSePII4p}/_ssgManifest.js +0 -0
@@ -0,0 +1,28 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: MessagingCommand.yaml
3
+ type: object
4
+ properties:
5
+ type:
6
+ $ref: MessagingFrameType.yaml
7
+ description: "Type of frame: command, chat_message, or chat_control"
8
+ command:
9
+ $ref: MessagingCommandType.yaml
10
+ description: The slash command name (new, approve, reject, stop, resume, status)
11
+ featureId:
12
+ type: string
13
+ description: Target feature ID (short numeric or full UUID)
14
+ args:
15
+ type: string
16
+ description: Free-text arguments (feature description, rejection feedback, chat text)
17
+ chatId:
18
+ type: string
19
+ description: Chat ID for routing responses back to the correct conversation
20
+ platform:
21
+ $ref: MessagingPlatform.yaml
22
+ description: Platform for routing responses back (telegram or whatsapp)
23
+ required:
24
+ - type
25
+ - command
26
+ - chatId
27
+ - platform
28
+ description: A parsed command received from a messaging platform via the Gateway tunnel
@@ -0,0 +1,17 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: MessagingCommandType.yaml
3
+ type: string
4
+ enum:
5
+ - new
6
+ - approve
7
+ - reject
8
+ - stop
9
+ - resume
10
+ - status
11
+ - mute
12
+ - unmute
13
+ - list
14
+ - chat
15
+ - end
16
+ - help
17
+ description: Slash commands supported via messaging remote control
@@ -0,0 +1,40 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: MessagingConfig.yaml
3
+ type: object
4
+ properties:
5
+ enabled:
6
+ type: boolean
7
+ default: false
8
+ description: Whether messaging remote control is enabled
9
+ gatewayUrl:
10
+ type: string
11
+ description: URL of the Commands.com Gateway instance
12
+ deviceId:
13
+ type: string
14
+ description: Device ID used when registering integration routes and opening the tunnel
15
+ gatewayClientId:
16
+ type: string
17
+ description: OAuth client ID for fetching gateway access tokens (demo mode uses public client)
18
+ telegram:
19
+ $ref: MessagingPlatformConfig.yaml
20
+ description: Telegram platform configuration
21
+ whatsapp:
22
+ $ref: MessagingPlatformConfig.yaml
23
+ description: WhatsApp platform configuration
24
+ debounceMs:
25
+ type: integer
26
+ minimum: -2147483648
27
+ maximum: 2147483647
28
+ default: 5000
29
+ description: "Debounce window in milliseconds for notification delivery (default: 5000)"
30
+ chatBufferMs:
31
+ type: integer
32
+ minimum: -2147483648
33
+ maximum: 2147483647
34
+ default: 3000
35
+ description: "Buffer interval in milliseconds for chat relay output batching (default: 3000)"
36
+ required:
37
+ - enabled
38
+ - debounceMs
39
+ - chatBufferMs
40
+ description: Messaging remote control configuration
@@ -0,0 +1,8 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: MessagingFrameType.yaml
3
+ type: string
4
+ enum:
5
+ - command
6
+ - chat_message
7
+ - chat_control
8
+ description: Types of messages exchanged through the messaging tunnel
@@ -0,0 +1,22 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: MessagingNotification.yaml
3
+ type: object
4
+ properties:
5
+ event:
6
+ type: string
7
+ description: "Event type: feature lifecycle, CI status, gate waiting, command response, chat response"
8
+ featureId:
9
+ type: string
10
+ description: ID of the feature this notification relates to
11
+ title:
12
+ type: string
13
+ description: Human-readable feature name or title
14
+ message:
15
+ type: string
16
+ description: Human-readable notification body (sanitized, no code or secrets)
17
+ required:
18
+ - event
19
+ - featureId
20
+ - title
21
+ - message
22
+ description: A notification or response sent from Shep to a messaging platform via the Gateway tunnel
@@ -0,0 +1,7 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: MessagingPlatform.yaml
3
+ type: string
4
+ enum:
5
+ - telegram
6
+ - whatsapp
7
+ description: Supported external messaging platforms
@@ -0,0 +1,38 @@
1
+ $schema: https://json-schema.org/draft/2020-12/schema
2
+ $id: MessagingPlatformConfig.yaml
3
+ type: object
4
+ properties:
5
+ enabled:
6
+ type: boolean
7
+ default: false
8
+ description: Whether this platform connection is active
9
+ chatId:
10
+ type: string
11
+ description: Platform-specific chat ID for message routing (set during pairing)
12
+ paired:
13
+ type: boolean
14
+ default: false
15
+ description: Whether the chat has been verified via pairing code
16
+ pendingPairingCode:
17
+ type: string
18
+ description: One-time code shown to the user during pairing, cleared once confirmed
19
+ pendingPairingExpiresAt:
20
+ type: string
21
+ format: date-time
22
+ description: Expiry timestamp for the pending pairing code (ISO-8601)
23
+ routeId:
24
+ type: string
25
+ description: Gateway integration route ID allocated during pairing
26
+ routeToken:
27
+ type: string
28
+ description: Gateway integration route token (path-auth) allocated during pairing
29
+ publicUrl:
30
+ type: string
31
+ description: Public webhook URL that the messaging platform should POST updates to
32
+ botToken:
33
+ type: string
34
+ description: "Bot API token used by the daemon to send outbound messages (Telegram: 123456:ABC...)"
35
+ required:
36
+ - enabled
37
+ - paired
38
+ description: Configuration for a single messaging platform connection
@@ -36,6 +36,9 @@ properties:
36
36
  fabLayout:
37
37
  $ref: FabLayoutConfig.yaml
38
38
  description: FAB layout configuration (optional, defaults applied at runtime)
39
+ messaging:
40
+ $ref: MessagingConfig.yaml
41
+ description: Messaging remote control configuration (optional, defaults applied at runtime)
39
42
  required:
40
43
  - models
41
44
  - user
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Gateway Client Interface
3
+ *
4
+ * Output port for the Commands.com Gateway HTTP API. Implementations handle
5
+ * authentication (OAuth demo/OIDC) and integration-route provisioning so the
6
+ * MessagingService can receive inbound webhooks from Telegram/WhatsApp.
7
+ *
8
+ * Reference: https://github.com/Commands-com/gateway/blob/main/docs/openapi.yaml
9
+ */
10
+ export interface GatewayOAuthToken {
11
+ accessToken: string;
12
+ tokenType: string;
13
+ /** Absolute expiry time in ms since epoch. */
14
+ expiresAt: number;
15
+ refreshToken?: string;
16
+ }
17
+ export interface GatewayIntegrationRoute {
18
+ routeId: string;
19
+ routeToken: string;
20
+ publicUrl: string;
21
+ deviceId: string;
22
+ interfaceType: string;
23
+ }
24
+ export interface CreateIntegrationRouteInput {
25
+ deviceId: string;
26
+ interfaceType: string;
27
+ /** Optional client-provided token override. Gateway issues one if omitted. */
28
+ routeToken?: string;
29
+ tokenMaxAgeDays?: number;
30
+ maxBodyBytes?: number;
31
+ deadlineMs?: number;
32
+ }
33
+ export interface FetchTokenInput {
34
+ gatewayUrl: string;
35
+ clientId: string;
36
+ /** For demo auth the client secret is optional. */
37
+ clientSecret?: string;
38
+ scope?: string;
39
+ }
40
+ /**
41
+ * Port for interacting with the Commands.com Gateway HTTP API.
42
+ *
43
+ * Implementations MUST NOT leak HTTP specifics (status codes, headers) to
44
+ * the application layer — return domain objects or throw domain errors.
45
+ */
46
+ export interface IGatewayClient {
47
+ /**
48
+ * Fetch (or refresh) an OAuth access token for the configured client.
49
+ * Uses the client_credentials grant in demo mode.
50
+ */
51
+ fetchAccessToken(input: FetchTokenInput): Promise<GatewayOAuthToken>;
52
+ /**
53
+ * Register a new integration route on the gateway. The returned `publicUrl`
54
+ * is what the messaging platform (Telegram webhook, etc.) should POST to.
55
+ */
56
+ createIntegrationRoute(gatewayUrl: string, accessToken: string, input: CreateIntegrationRouteInput): Promise<GatewayIntegrationRoute>;
57
+ }
58
+ //# sourceMappingURL=gateway-client.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway-client.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/gateway-client.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAErE;;;OAGG;IACH,sBAAsB,CACpB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACrC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Gateway Client Interface
3
+ *
4
+ * Output port for the Commands.com Gateway HTTP API. Implementations handle
5
+ * authentication (OAuth demo/OIDC) and integration-route provisioning so the
6
+ * MessagingService can receive inbound webhooks from Telegram/WhatsApp.
7
+ *
8
+ * Reference: https://github.com/Commands-com/gateway/blob/main/docs/openapi.yaml
9
+ */
10
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Message Sender Interface
3
+ *
4
+ * Output port for delivering outbound messaging notifications to an end user
5
+ * (Telegram chat, WhatsApp conversation, etc.). Implementations make direct
6
+ * HTTPS calls to the respective platform APIs — the tunnel is for inbound
7
+ * webhook relay only, not for pushing notifications.
8
+ */
9
+ import type { MessagingNotification } from '../../../../domain/generated/output.js';
10
+ export interface IMessageSender {
11
+ /**
12
+ * Deliver a notification to the configured end user. Implementations
13
+ * should handle platform routing (telegram vs whatsapp) internally based
14
+ * on current settings, and silently no-op if no platform is paired.
15
+ */
16
+ send(notification: MessagingNotification): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=message-sender.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-sender.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/message-sender.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAEpF,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,IAAI,CAAC,YAAY,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Message Sender Interface
3
+ *
4
+ * Output port for delivering outbound messaging notifications to an end user
5
+ * (Telegram chat, WhatsApp conversation, etc.). Implementations make direct
6
+ * HTTPS calls to the respective platform APIs — the tunnel is for inbound
7
+ * webhook relay only, not for pushing notifications.
8
+ */
9
+ export {};
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Messaging Service Interface
3
+ *
4
+ * Output port for the external messaging remote control subsystem.
5
+ * Enables controlling Shep via Telegram/WhatsApp through the
6
+ * Commands.com Gateway tunnel.
7
+ *
8
+ * Following Clean Architecture:
9
+ * - Application layer depends on this interface
10
+ * - Infrastructure layer provides concrete implementation (MessagingService)
11
+ */
12
+ import type { MessagingNotification } from '../../../../domain/generated/output.js';
13
+ /**
14
+ * Port interface for the messaging remote control service.
15
+ *
16
+ * Implementations must:
17
+ * - Connect to the Gateway via WebSocket tunnel
18
+ * - Handle inbound commands (parsed by Gateway) and map them to use cases
19
+ * - Push outbound notifications through the tunnel for delivery to messaging apps
20
+ * - Support interactive chat relay between messaging apps and agent sessions
21
+ */
22
+ export interface IMessagingService {
23
+ /** Start listening for inbound commands from the Gateway tunnel */
24
+ start(): Promise<void>;
25
+ /** Stop the messaging service and disconnect from the tunnel */
26
+ stop(): Promise<void>;
27
+ /** Send a notification to the user's messaging app via the Gateway */
28
+ sendNotification(notification: MessagingNotification): Promise<void>;
29
+ /** Check if messaging is configured and connected */
30
+ isConnected(): boolean;
31
+ /** Check if messaging is configured (credentials present, even if not connected) */
32
+ isConfigured(): boolean;
33
+ }
34
+ //# sourceMappingURL=messaging-service.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messaging-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/messaging-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAEpF;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,mEAAmE;IACnE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB,gEAAgE;IAChE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtB,sEAAsE;IACtE,gBAAgB,CAAC,YAAY,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErE,qDAAqD;IACrD,WAAW,IAAI,OAAO,CAAC;IAEvB,oFAAoF;IACpF,YAAY,IAAI,OAAO,CAAC;CACzB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Messaging Service Interface
3
+ *
4
+ * Output port for the external messaging remote control subsystem.
5
+ * Enables controlling Shep via Telegram/WhatsApp through the
6
+ * Commands.com Gateway tunnel.
7
+ *
8
+ * Following Clean Architecture:
9
+ * - Application layer depends on this interface
10
+ * - Infrastructure layer provides concrete implementation (MessagingService)
11
+ */
12
+ export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Telegram Bot API Client Interface
3
+ *
4
+ * Output port for making outbound calls to api.telegram.org. Used by the
5
+ * messaging service to reply to users after processing a webhook, and to
6
+ * push debounced notifications from the daemon.
7
+ */
8
+ export interface SendTelegramMessageInput {
9
+ /** Bot token (e.g. `123456:ABCDEF-...`). */
10
+ botToken: string;
11
+ chatId: string;
12
+ text: string;
13
+ /** Optional parse mode (`Markdown`, `MarkdownV2`, `HTML`). */
14
+ parseMode?: 'Markdown' | 'MarkdownV2' | 'HTML';
15
+ }
16
+ export interface ITelegramClient {
17
+ sendMessage(input: SendTelegramMessageInput): Promise<void>;
18
+ }
19
+ //# sourceMappingURL=telegram-client.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-client.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/telegram-client.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,wBAAwB;IACvC,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;CAChD;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Telegram Bot API Client Interface
3
+ *
4
+ * Output port for making outbound calls to api.telegram.org. Used by the
5
+ * messaging service to reply to users after processing a webhook, and to
6
+ * push debounced notifications from the daemon.
7
+ */
8
+ export {};
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Begin Messaging Pairing Use Case
3
+ *
4
+ * Initiates a pairing handshake for a messaging platform (Telegram/WhatsApp):
5
+ *
6
+ * 1. Validates the Gateway URL.
7
+ * 2. Fetches an OAuth access token from the Gateway (demo mode uses the
8
+ * public client; OIDC mode would inject a real client secret).
9
+ * 3. Creates an integration route on the Gateway for the target platform.
10
+ * The returned `publicUrl` is what the user must point their Telegram
11
+ * webhook (or WhatsApp callback) at.
12
+ * 4. Generates a one-time 6-digit pairing code and persists it along with
13
+ * the newly-allocated route details on settings.
14
+ * 5. Returns a session DTO for the presentation layer to render.
15
+ *
16
+ * The pairing is finalized when either:
17
+ * - The daemon's tunnel receives a `/pair <code>` message via a
18
+ * `tunnel.request` frame and calls ConfirmMessagingPairingUseCase (future
19
+ * auto-confirm path), or
20
+ * - The user clicks "Confirm pairing" in the UI / CLI after seeing the
21
+ * code echoed by their bot (current manual path).
22
+ */
23
+ import { MessagingPlatform } from '../../../domain/generated/output.js';
24
+ import type { ISettingsRepository } from '../../ports/output/repositories/settings.repository.interface.js';
25
+ import type { IGatewayClient } from '../../ports/output/services/gateway-client.interface.js';
26
+ export interface BeginMessagingPairingInput {
27
+ platform: MessagingPlatform;
28
+ gatewayUrl: string;
29
+ }
30
+ export interface MessagingPairingSession {
31
+ platform: MessagingPlatform;
32
+ code: string;
33
+ /** ISO-8601 expiry. */
34
+ expiresAt: string;
35
+ gatewayUrl: string;
36
+ /** Public webhook URL the platform should POST updates to. */
37
+ publicUrl: string;
38
+ routeId: string;
39
+ }
40
+ export declare class BeginMessagingPairingUseCase {
41
+ private readonly settingsRepository;
42
+ private readonly gatewayClient;
43
+ constructor(settingsRepository: ISettingsRepository, gatewayClient: IGatewayClient);
44
+ execute(input: BeginMessagingPairingInput): Promise<MessagingPairingSession>;
45
+ }
46
+ //# sourceMappingURL=begin-pairing.use-case.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"begin-pairing.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/messaging/begin-pairing.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAC5G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AAK9F,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAwBD,qBACa,4BAA4B;IAGrC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAFb,kBAAkB,EAAE,mBAAmB,EAEvC,aAAa,EAAE,cAAc;IAG1C,OAAO,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAkFnF"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Begin Messaging Pairing Use Case
3
+ *
4
+ * Initiates a pairing handshake for a messaging platform (Telegram/WhatsApp):
5
+ *
6
+ * 1. Validates the Gateway URL.
7
+ * 2. Fetches an OAuth access token from the Gateway (demo mode uses the
8
+ * public client; OIDC mode would inject a real client secret).
9
+ * 3. Creates an integration route on the Gateway for the target platform.
10
+ * The returned `publicUrl` is what the user must point their Telegram
11
+ * webhook (or WhatsApp callback) at.
12
+ * 4. Generates a one-time 6-digit pairing code and persists it along with
13
+ * the newly-allocated route details on settings.
14
+ * 5. Returns a session DTO for the presentation layer to render.
15
+ *
16
+ * The pairing is finalized when either:
17
+ * - The daemon's tunnel receives a `/pair <code>` message via a
18
+ * `tunnel.request` frame and calls ConfirmMessagingPairingUseCase (future
19
+ * auto-confirm path), or
20
+ * - The user clicks "Confirm pairing" in the UI / CLI after seeing the
21
+ * code echoed by their bot (current manual path).
22
+ */
23
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
24
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
25
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
26
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
27
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
28
+ };
29
+ var __metadata = (this && this.__metadata) || function (k, v) {
30
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
31
+ };
32
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
33
+ return function (target, key) { decorator(target, key, paramIndex); }
34
+ };
35
+ import { injectable, inject } from 'tsyringe';
36
+ import { randomInt, randomUUID } from 'node:crypto';
37
+ import { MessagingPlatform } from '../../../domain/generated/output.js';
38
+ const PAIRING_CODE_TTL_MS = 10 * 60 * 1000; // 10 minutes
39
+ const DEFAULT_GATEWAY_CLIENT_ID = 'commands-desktop-public';
40
+ function assertValidGatewayUrl(url) {
41
+ if (!url?.trim()) {
42
+ throw new Error('Gateway URL is required to begin pairing.');
43
+ }
44
+ try {
45
+ const parsed = new URL(url);
46
+ if (!parsed.protocol) {
47
+ throw new Error('invalid');
48
+ }
49
+ }
50
+ catch {
51
+ throw new Error('Gateway URL must be a valid URL (e.g., https://gateway.example.com).');
52
+ }
53
+ }
54
+ function generatePairingCode() {
55
+ return randomInt(0, 1_000_000).toString().padStart(6, '0');
56
+ }
57
+ function platformKey(platform) {
58
+ return platform === MessagingPlatform.Telegram ? 'telegram' : 'whatsapp';
59
+ }
60
+ let BeginMessagingPairingUseCase = class BeginMessagingPairingUseCase {
61
+ settingsRepository;
62
+ gatewayClient;
63
+ constructor(settingsRepository, gatewayClient) {
64
+ this.settingsRepository = settingsRepository;
65
+ this.gatewayClient = gatewayClient;
66
+ }
67
+ async execute(input) {
68
+ assertValidGatewayUrl(input.gatewayUrl);
69
+ const settings = await this.settingsRepository.load();
70
+ if (!settings) {
71
+ throw new Error('Settings not found. Please run initialization first.');
72
+ }
73
+ const existing = settings.messaging ?? {
74
+ enabled: false,
75
+ debounceMs: 5000,
76
+ chatBufferMs: 3000,
77
+ };
78
+ // Device ID is stable across platforms and across pairings. Generate
79
+ // lazily on first pairing so the gateway can scope all routes + the
80
+ // tunnel connection to the same device owner.
81
+ const deviceId = existing.deviceId ?? `shep-${randomUUID()}`;
82
+ const clientId = existing.gatewayClientId ?? DEFAULT_GATEWAY_CLIENT_ID;
83
+ const key = platformKey(input.platform);
84
+ // 1. Fetch OAuth access token from the gateway.
85
+ let accessToken;
86
+ try {
87
+ const token = await this.gatewayClient.fetchAccessToken({
88
+ gatewayUrl: input.gatewayUrl,
89
+ clientId,
90
+ });
91
+ accessToken = token.accessToken;
92
+ }
93
+ catch (err) {
94
+ const msg = err instanceof Error ? err.message : String(err);
95
+ throw new Error(`Gateway authentication failed: ${msg}`);
96
+ }
97
+ // 2. Create an integration route for this platform.
98
+ let route;
99
+ try {
100
+ route = await this.gatewayClient.createIntegrationRoute(input.gatewayUrl, accessToken, {
101
+ deviceId,
102
+ interfaceType: key,
103
+ });
104
+ }
105
+ catch (err) {
106
+ const msg = err instanceof Error ? err.message : String(err);
107
+ throw new Error(`Gateway route registration failed: ${msg}`);
108
+ }
109
+ // 3. Generate pairing code + persist everything.
110
+ const code = generatePairingCode();
111
+ const expiresAt = new Date(Date.now() + PAIRING_CODE_TTL_MS).toISOString();
112
+ const existingPlatform = existing[key] ?? { enabled: false, paired: false };
113
+ settings.messaging = {
114
+ ...existing,
115
+ enabled: true,
116
+ gatewayUrl: input.gatewayUrl,
117
+ deviceId,
118
+ gatewayClientId: clientId,
119
+ [key]: {
120
+ ...existingPlatform,
121
+ enabled: true,
122
+ paired: false,
123
+ pendingPairingCode: code,
124
+ pendingPairingExpiresAt: expiresAt,
125
+ routeId: route.routeId,
126
+ routeToken: route.routeToken,
127
+ publicUrl: route.publicUrl,
128
+ },
129
+ };
130
+ settings.updatedAt = new Date();
131
+ await this.settingsRepository.update(settings);
132
+ return {
133
+ platform: input.platform,
134
+ code,
135
+ expiresAt,
136
+ gatewayUrl: input.gatewayUrl,
137
+ publicUrl: route.publicUrl,
138
+ routeId: route.routeId,
139
+ };
140
+ }
141
+ };
142
+ BeginMessagingPairingUseCase = __decorate([
143
+ injectable(),
144
+ __param(0, inject('ISettingsRepository')),
145
+ __param(1, inject('IGatewayClient')),
146
+ __metadata("design:paramtypes", [Object, Object])
147
+ ], BeginMessagingPairingUseCase);
148
+ export { BeginMessagingPairingUseCase };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Confirm Messaging Pairing Use Case
3
+ *
4
+ * Finalizes a pairing handshake started by BeginMessagingPairingUseCase.
5
+ * Marks the platform as paired, stores the chatId, and clears the pending
6
+ * pairing code.
7
+ */
8
+ import { MessagingPlatform, type Settings } from '../../../domain/generated/output.js';
9
+ import type { ISettingsRepository } from '../../ports/output/repositories/settings.repository.interface.js';
10
+ export interface ConfirmMessagingPairingInput {
11
+ platform: MessagingPlatform;
12
+ chatId: string;
13
+ }
14
+ export declare class ConfirmMessagingPairingUseCase {
15
+ private readonly settingsRepository;
16
+ constructor(settingsRepository: ISettingsRepository);
17
+ execute(input: ConfirmMessagingPairingInput): Promise<Settings>;
18
+ }
19
+ //# sourceMappingURL=confirm-pairing.use-case.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-pairing.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/messaging/confirm-pairing.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAE5G,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,8BAA8B;IAGvC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB;IAGpD,OAAO,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,QAAQ,CAAC;CAqCtE"}