@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
@@ -87,6 +87,30 @@ export interface SettingsRow {
87
87
  fab_position_swapped: number;
88
88
  skill_injection_enabled: number;
89
89
  skill_injection_skills: string | null;
90
+ messaging_enabled: number;
91
+ messaging_gateway_url: string | null;
92
+ messaging_device_id: string | null;
93
+ messaging_gateway_client_id: string | null;
94
+ messaging_debounce_ms: number | null;
95
+ messaging_chat_buffer_ms: number | null;
96
+ messaging_telegram_enabled: number;
97
+ messaging_telegram_paired: number;
98
+ messaging_telegram_chat_id: string | null;
99
+ messaging_telegram_route_id: string | null;
100
+ messaging_telegram_route_token: string | null;
101
+ messaging_telegram_public_url: string | null;
102
+ messaging_telegram_bot_token: string | null;
103
+ messaging_telegram_pending_code: string | null;
104
+ messaging_telegram_pending_expires_at: string | null;
105
+ messaging_whatsapp_enabled: number;
106
+ messaging_whatsapp_paired: number;
107
+ messaging_whatsapp_chat_id: string | null;
108
+ messaging_whatsapp_route_id: string | null;
109
+ messaging_whatsapp_route_token: string | null;
110
+ messaging_whatsapp_public_url: string | null;
111
+ messaging_whatsapp_bot_token: string | null;
112
+ messaging_whatsapp_pending_code: string | null;
113
+ messaging_whatsapp_pending_expires_at: string | null;
90
114
  }
91
115
  /**
92
116
  * Maps Settings domain object to database row.
@@ -1 +1 @@
1
- {"version":3,"file":"settings.mapper.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,QAAQ,EAGT,MAAM,wCAAwC,CAAC;AAUhD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAE1B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAInB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IAGtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,uBAAuB,EAAE,MAAM,CAAC;IAGhC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EA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,IAAI,CAAC;IAG/C,mBAAmB,EAAE,MAAM,CAAC;IAG5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC;IAClC,mCAAmC,EAAE,MAAM,CAAC;IAG5C,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAG1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0BAA0B,EAAE,MAAM,CAAC;IACnC,yBAAyB,EAAE,MAAM,CAAC;IAClC,4BAA4B,EAAE,MAAM,CAAC;IACrC,+BAA+B,EAAE,MAAM,CAAC;IACxC,sBAAsB,EAAE,MAAM,CAAC;IAE/B,yBAAyB,EAAE,MAAM,CAAC;IAClC,sCAAsC,EAAE,MAAM,CAAC;IAC/C,yCAAyC,EAAE,MAAM,CAAC;IAGlD,0BAA0B,EAAE,MAAM,CAAC;IAGnC,oBAAoB,EAAE,MAAM,CAAC;IAG7B,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAuH1D;AAiED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,QAAQ,CA8GvD"}
1
+ {"version":3,"file":"settings.mapper.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,QAAQ,EAKT,MAAM,wCAAwC,CAAC;AAUhD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAE1B,E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D"}
@@ -115,8 +115,58 @@ export function toDatabase(settings) {
115
115
  skill_injection_skills: settings.workflow.skillInjection?.skills?.length
116
116
  ? JSON.stringify(settings.workflow.skillInjection.skills)
117
117
  : null,
118
+ // Messaging remote control (migration 056)
119
+ ...messagingToRow(settings.messaging),
118
120
  };
119
121
  }
122
+ /**
123
+ * Serialize MessagingConfig into the snake_case DB row columns.
124
+ * An undefined config writes zeros/nulls so the row is valid.
125
+ */
126
+ function messagingToRow(messaging) {
127
+ const tg = messaging?.telegram;
128
+ const wa = messaging?.whatsapp;
129
+ return {
130
+ messaging_enabled: messaging?.enabled ? 1 : 0,
131
+ messaging_gateway_url: messaging?.gatewayUrl ?? null,
132
+ messaging_device_id: messaging?.deviceId ?? null,
133
+ messaging_gateway_client_id: messaging?.gatewayClientId ?? null,
134
+ messaging_debounce_ms: messaging?.debounceMs ?? null,
135
+ messaging_chat_buffer_ms: messaging?.chatBufferMs ?? null,
136
+ messaging_telegram_enabled: tg?.enabled ? 1 : 0,
137
+ messaging_telegram_paired: tg?.paired ? 1 : 0,
138
+ messaging_telegram_chat_id: tg?.chatId ?? null,
139
+ messaging_telegram_route_id: tg?.routeId ?? null,
140
+ messaging_telegram_route_token: tg?.routeToken ?? null,
141
+ messaging_telegram_public_url: tg?.publicUrl ?? null,
142
+ messaging_telegram_bot_token: tg?.botToken ?? null,
143
+ messaging_telegram_pending_code: tg?.pendingPairingCode ?? null,
144
+ messaging_telegram_pending_expires_at: serializeIsoLike(tg?.pendingPairingExpiresAt),
145
+ messaging_whatsapp_enabled: wa?.enabled ? 1 : 0,
146
+ messaging_whatsapp_paired: wa?.paired ? 1 : 0,
147
+ messaging_whatsapp_chat_id: wa?.chatId ?? null,
148
+ messaging_whatsapp_route_id: wa?.routeId ?? null,
149
+ messaging_whatsapp_route_token: wa?.routeToken ?? null,
150
+ messaging_whatsapp_public_url: wa?.publicUrl ?? null,
151
+ messaging_whatsapp_bot_token: wa?.botToken ?? null,
152
+ messaging_whatsapp_pending_code: wa?.pendingPairingCode ?? null,
153
+ messaging_whatsapp_pending_expires_at: serializeIsoLike(wa?.pendingPairingExpiresAt),
154
+ };
155
+ }
156
+ /**
157
+ * The generated TypeSpec type for `pendingPairingExpiresAt` is `any` because
158
+ * TypeSpec emitted a loose shape for this `utcDateTime` field. Callers pass
159
+ * either a Date or an ISO string; we normalize both to a string for storage.
160
+ */
161
+ function serializeIsoLike(value) {
162
+ if (value == null)
163
+ return null;
164
+ if (value instanceof Date)
165
+ return value.toISOString();
166
+ if (typeof value === 'string')
167
+ return value;
168
+ return String(value);
169
+ }
120
170
  /**
121
171
  * Build the stageTimeouts spread from DB row columns.
122
172
  * Returns `{ stageTimeouts: { ... } }` when at least one column is non-null,
@@ -275,7 +325,74 @@ export function fromDatabase(row) {
275
325
  fabLayout: {
276
326
  swapPosition: (row.fab_position_swapped ?? 0) !== 0,
277
327
  },
328
+ // Messaging remote control (migration 056)
329
+ // Always present — even for rows written before the migration, defaults
330
+ // decode to { enabled: false, debounceMs: 5000, chatBufferMs: 3000 } so
331
+ // consumers always see a valid MessagingConfig shape.
332
+ messaging: messagingFromRow(row),
278
333
  // Onboarding (INTEGER → boolean)
279
334
  onboardingComplete: row.onboarding_complete === 1,
280
335
  };
281
336
  }
337
+ /**
338
+ * Deserialize MessagingConfig from the DB row. Returns a fully populated
339
+ * MessagingConfig with safe defaults for rows that predate migration 056 or
340
+ * were written by code that never set the messaging field (e.g. main branch).
341
+ */
342
+ function messagingFromRow(row) {
343
+ const telegram = readPlatform(row.messaging_telegram_enabled, row.messaging_telegram_paired, row.messaging_telegram_chat_id, row.messaging_telegram_route_id, row.messaging_telegram_route_token, row.messaging_telegram_public_url, row.messaging_telegram_bot_token, row.messaging_telegram_pending_code, row.messaging_telegram_pending_expires_at);
344
+ const whatsapp = readPlatform(row.messaging_whatsapp_enabled, row.messaging_whatsapp_paired, row.messaging_whatsapp_chat_id, row.messaging_whatsapp_route_id, row.messaging_whatsapp_route_token, row.messaging_whatsapp_public_url, row.messaging_whatsapp_bot_token, row.messaging_whatsapp_pending_code, row.messaging_whatsapp_pending_expires_at);
345
+ const config = {
346
+ enabled: (row.messaging_enabled ?? 0) === 1,
347
+ debounceMs: row.messaging_debounce_ms ?? 5000,
348
+ chatBufferMs: row.messaging_chat_buffer_ms ?? 3000,
349
+ };
350
+ if (row.messaging_gateway_url !== null && row.messaging_gateway_url !== undefined) {
351
+ config.gatewayUrl = row.messaging_gateway_url;
352
+ }
353
+ if (row.messaging_device_id !== null && row.messaging_device_id !== undefined) {
354
+ config.deviceId = row.messaging_device_id;
355
+ }
356
+ if (row.messaging_gateway_client_id !== null && row.messaging_gateway_client_id !== undefined) {
357
+ config.gatewayClientId = row.messaging_gateway_client_id;
358
+ }
359
+ if (telegram)
360
+ config.telegram = telegram;
361
+ if (whatsapp)
362
+ config.whatsapp = whatsapp;
363
+ return config;
364
+ }
365
+ function readPlatform(enabled, paired, chatId, routeId, routeToken, publicUrl, botToken, pendingCode, pendingExpiresAt) {
366
+ // Omit the platform entirely when no data has been written. This matches
367
+ // the pre-persistence shape where callers used `config.telegram?.paired`.
368
+ const hasAny = (enabled ?? 0) === 1 ||
369
+ (paired ?? 0) === 1 ||
370
+ chatId !== null ||
371
+ routeId !== null ||
372
+ routeToken !== null ||
373
+ publicUrl !== null ||
374
+ botToken !== null ||
375
+ pendingCode !== null ||
376
+ pendingExpiresAt !== null;
377
+ if (!hasAny)
378
+ return undefined;
379
+ const platform = {
380
+ enabled: (enabled ?? 0) === 1,
381
+ paired: (paired ?? 0) === 1,
382
+ };
383
+ if (chatId !== null)
384
+ platform.chatId = chatId;
385
+ if (routeId !== null)
386
+ platform.routeId = routeId;
387
+ if (routeToken !== null)
388
+ platform.routeToken = routeToken;
389
+ if (publicUrl !== null)
390
+ platform.publicUrl = publicUrl;
391
+ if (botToken !== null)
392
+ platform.botToken = botToken;
393
+ if (pendingCode !== null)
394
+ platform.pendingPairingCode = pendingCode;
395
+ if (pendingExpiresAt !== null)
396
+ platform.pendingPairingExpiresAt = pendingExpiresAt;
397
+ return platform;
398
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Migration 056: Persist MessagingConfig on the settings table
3
+ *
4
+ * Feature 082 (messaging remote control) added `MessagingConfig` to the domain
5
+ * model but the persistence layer was never extended, so every pairing was
6
+ * silently dropped on write. This migration backfills the missing columns.
7
+ *
8
+ * Backward compatibility:
9
+ * - Every column is nullable (or has a safe default of 0) so existing rows
10
+ * from main keep working untouched.
11
+ * - Reading code treats nulls as "not configured", matching the pre-feature
12
+ * behaviour where `settings.messaging` was undefined.
13
+ * - The mapper round-trips values: a row written by an older build (all
14
+ * nulls) decodes to `{ enabled: false, debounceMs: 5000, chatBufferMs: 3000 }`,
15
+ * which is exactly the fallback the in-memory code already uses.
16
+ * - This migration is idempotent via PRAGMA table_info guard.
17
+ */
18
+ import type { MigrationParams } from 'umzug';
19
+ import type Database from 'better-sqlite3';
20
+ export declare function up({ context: db }: MigrationParams<Database.Database>): Promise<void>;
21
+ export declare function down({ context: db }: MigrationParams<Database.Database>): Promise<void>;
22
+ //# sourceMappingURL=056-add-messaging-remote-control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"056-add-messaging-remote-control.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-messaging-remote-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAuC3C,wBAAsB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAS3F;AAED,wBAAsB,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAM7F"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Migration 056: Persist MessagingConfig on the settings table
3
+ *
4
+ * Feature 082 (messaging remote control) added `MessagingConfig` to the domain
5
+ * model but the persistence layer was never extended, so every pairing was
6
+ * silently dropped on write. This migration backfills the missing columns.
7
+ *
8
+ * Backward compatibility:
9
+ * - Every column is nullable (or has a safe default of 0) so existing rows
10
+ * from main keep working untouched.
11
+ * - Reading code treats nulls as "not configured", matching the pre-feature
12
+ * behaviour where `settings.messaging` was undefined.
13
+ * - The mapper round-trips values: a row written by an older build (all
14
+ * nulls) decodes to `{ enabled: false, debounceMs: 5000, chatBufferMs: 3000 }`,
15
+ * which is exactly the fallback the in-memory code already uses.
16
+ * - This migration is idempotent via PRAGMA table_info guard.
17
+ */
18
+ const COLUMNS = [
19
+ // Top-level MessagingConfig fields
20
+ { name: 'messaging_enabled', ddl: 'INTEGER NOT NULL DEFAULT 0' },
21
+ { name: 'messaging_gateway_url', ddl: 'TEXT' },
22
+ { name: 'messaging_device_id', ddl: 'TEXT' },
23
+ { name: 'messaging_gateway_client_id', ddl: 'TEXT' },
24
+ { name: 'messaging_debounce_ms', ddl: 'INTEGER' },
25
+ { name: 'messaging_chat_buffer_ms', ddl: 'INTEGER' },
26
+ // Per-platform: Telegram
27
+ { name: 'messaging_telegram_enabled', ddl: 'INTEGER NOT NULL DEFAULT 0' },
28
+ { name: 'messaging_telegram_paired', ddl: 'INTEGER NOT NULL DEFAULT 0' },
29
+ { name: 'messaging_telegram_chat_id', ddl: 'TEXT' },
30
+ { name: 'messaging_telegram_route_id', ddl: 'TEXT' },
31
+ { name: 'messaging_telegram_route_token', ddl: 'TEXT' },
32
+ { name: 'messaging_telegram_public_url', ddl: 'TEXT' },
33
+ { name: 'messaging_telegram_bot_token', ddl: 'TEXT' },
34
+ { name: 'messaging_telegram_pending_code', ddl: 'TEXT' },
35
+ { name: 'messaging_telegram_pending_expires_at', ddl: 'TEXT' },
36
+ // Per-platform: WhatsApp
37
+ { name: 'messaging_whatsapp_enabled', ddl: 'INTEGER NOT NULL DEFAULT 0' },
38
+ { name: 'messaging_whatsapp_paired', ddl: 'INTEGER NOT NULL DEFAULT 0' },
39
+ { name: 'messaging_whatsapp_chat_id', ddl: 'TEXT' },
40
+ { name: 'messaging_whatsapp_route_id', ddl: 'TEXT' },
41
+ { name: 'messaging_whatsapp_route_token', ddl: 'TEXT' },
42
+ { name: 'messaging_whatsapp_public_url', ddl: 'TEXT' },
43
+ { name: 'messaging_whatsapp_bot_token', ddl: 'TEXT' },
44
+ { name: 'messaging_whatsapp_pending_code', ddl: 'TEXT' },
45
+ { name: 'messaging_whatsapp_pending_expires_at', ddl: 'TEXT' },
46
+ ];
47
+ export async function up({ context: db }) {
48
+ const existing = db.pragma('table_info(settings)');
49
+ const present = new Set(existing.map((c) => c.name));
50
+ for (const col of COLUMNS) {
51
+ if (!present.has(col.name)) {
52
+ db.exec(`ALTER TABLE settings ADD COLUMN ${col.name} ${col.ddl}`);
53
+ }
54
+ }
55
+ }
56
+ export async function down({ context: db }) {
57
+ // SQLite ALTER TABLE DROP COLUMN was only added in 3.35. We leave the
58
+ // columns in place on rollback — they are harmless nullable additions
59
+ // and removing them would require a full table rebuild. This matches
60
+ // the pattern used by earlier migrations in this repo.
61
+ void db;
62
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-settings.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-settings.repository.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8EAA8E,CAAC;AACxH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAOjE;;;GAGG;AACH,qBACa,wBAAyB,YAAW,mBAAmB;IACtD,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAElD;;;;;;OAMG;IACG,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAmFnD;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAgBtC;;;;;OAKG;IACG,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CA2FhD"}
1
+ {"version":3,"file":"sqlite-settings.repository.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/repositories/sqlite-settings.repository.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8EAA8E,CAAC;AACxH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAOjE;;;GAGG;AACH,qBACa,wBAAyB,YAAW,mBAAmB;IACtD,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAElD;;;;;;OAMG;IACG,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAmGnD;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAgBtC;;;;;OAKG;IACG,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAmHhD"}
@@ -73,7 +73,15 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
73
73
  interactive_agent_max_concurrent_sessions,
74
74
  auto_archive_delay_minutes,
75
75
  stage_timeout_fast_implement_ms,
76
- fab_position_swapped
76
+ fab_position_swapped,
77
+ messaging_enabled, messaging_gateway_url, messaging_device_id,
78
+ messaging_gateway_client_id, messaging_debounce_ms, messaging_chat_buffer_ms,
79
+ messaging_telegram_enabled, messaging_telegram_paired, messaging_telegram_chat_id,
80
+ messaging_telegram_route_id, messaging_telegram_route_token, messaging_telegram_public_url,
81
+ messaging_telegram_bot_token, messaging_telegram_pending_code, messaging_telegram_pending_expires_at,
82
+ messaging_whatsapp_enabled, messaging_whatsapp_paired, messaging_whatsapp_chat_id,
83
+ messaging_whatsapp_route_id, messaging_whatsapp_route_token, messaging_whatsapp_public_url,
84
+ messaging_whatsapp_bot_token, messaging_whatsapp_pending_code, messaging_whatsapp_pending_expires_at
77
85
  ) VALUES (
78
86
  @id, @created_at, @updated_at,
79
87
  @model_analyze, @model_requirements, @model_plan, @model_implement, @model_default,
@@ -105,7 +113,15 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
105
113
  @interactive_agent_max_concurrent_sessions,
106
114
  @auto_archive_delay_minutes,
107
115
  @stage_timeout_fast_implement_ms,
108
- @fab_position_swapped
116
+ @fab_position_swapped,
117
+ @messaging_enabled, @messaging_gateway_url, @messaging_device_id,
118
+ @messaging_gateway_client_id, @messaging_debounce_ms, @messaging_chat_buffer_ms,
119
+ @messaging_telegram_enabled, @messaging_telegram_paired, @messaging_telegram_chat_id,
120
+ @messaging_telegram_route_id, @messaging_telegram_route_token, @messaging_telegram_public_url,
121
+ @messaging_telegram_bot_token, @messaging_telegram_pending_code, @messaging_telegram_pending_expires_at,
122
+ @messaging_whatsapp_enabled, @messaging_whatsapp_paired, @messaging_whatsapp_chat_id,
123
+ @messaging_whatsapp_route_id, @messaging_whatsapp_route_token, @messaging_whatsapp_public_url,
124
+ @messaging_whatsapp_bot_token, @messaging_whatsapp_pending_code, @messaging_whatsapp_pending_expires_at
109
125
  )
110
126
  `);
111
127
  // Execute with named parameters (safe from SQL injection)
@@ -211,7 +227,31 @@ let SQLiteSettingsRepository = class SQLiteSettingsRepository {
211
227
  interactive_agent_max_concurrent_sessions = @interactive_agent_max_concurrent_sessions,
212
228
  auto_archive_delay_minutes = @auto_archive_delay_minutes,
213
229
  stage_timeout_fast_implement_ms = @stage_timeout_fast_implement_ms,
214
- fab_position_swapped = @fab_position_swapped
230
+ fab_position_swapped = @fab_position_swapped,
231
+ messaging_enabled = @messaging_enabled,
232
+ messaging_gateway_url = @messaging_gateway_url,
233
+ messaging_device_id = @messaging_device_id,
234
+ messaging_gateway_client_id = @messaging_gateway_client_id,
235
+ messaging_debounce_ms = @messaging_debounce_ms,
236
+ messaging_chat_buffer_ms = @messaging_chat_buffer_ms,
237
+ messaging_telegram_enabled = @messaging_telegram_enabled,
238
+ messaging_telegram_paired = @messaging_telegram_paired,
239
+ messaging_telegram_chat_id = @messaging_telegram_chat_id,
240
+ messaging_telegram_route_id = @messaging_telegram_route_id,
241
+ messaging_telegram_route_token = @messaging_telegram_route_token,
242
+ messaging_telegram_public_url = @messaging_telegram_public_url,
243
+ messaging_telegram_bot_token = @messaging_telegram_bot_token,
244
+ messaging_telegram_pending_code = @messaging_telegram_pending_code,
245
+ messaging_telegram_pending_expires_at = @messaging_telegram_pending_expires_at,
246
+ messaging_whatsapp_enabled = @messaging_whatsapp_enabled,
247
+ messaging_whatsapp_paired = @messaging_whatsapp_paired,
248
+ messaging_whatsapp_chat_id = @messaging_whatsapp_chat_id,
249
+ messaging_whatsapp_route_id = @messaging_whatsapp_route_id,
250
+ messaging_whatsapp_route_token = @messaging_whatsapp_route_token,
251
+ messaging_whatsapp_public_url = @messaging_whatsapp_public_url,
252
+ messaging_whatsapp_bot_token = @messaging_whatsapp_bot_token,
253
+ messaging_whatsapp_pending_code = @messaging_whatsapp_pending_code,
254
+ messaging_whatsapp_pending_expires_at = @messaging_whatsapp_pending_expires_at
215
255
  WHERE id = @id
216
256
  `);
217
257
  // Execute with named parameters (safe from SQL injection)
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Messaging Chat Relay
3
+ *
4
+ * Bridges messaging app chat ↔ Shep interactive agent sessions.
5
+ * When a user enters "chat mode" via /chat <feature_id>, their messages
6
+ * are relayed to the agent and agent responses are batched and sent back
7
+ * through the tunnel.
8
+ *
9
+ * Output batching: agent streaming output is buffered and flushed every
10
+ * N milliseconds (default 3s) to avoid flooding messaging platforms.
11
+ * Only one active relay per user at a time.
12
+ */
13
+ import type { IMessageSender } from '../../../application/ports/output/services/message-sender.interface.js';
14
+ /**
15
+ * Manages the bidirectional chat relay between messaging apps
16
+ * and Shep interactive agent sessions.
17
+ */
18
+ export declare class MessagingChatRelay {
19
+ private readonly sender;
20
+ private readonly bufferIntervalMs;
21
+ private activeRelay;
22
+ private buffer;
23
+ private bufferTimer;
24
+ constructor(sender: IMessageSender, bufferIntervalMs?: number);
25
+ /** Start a chat relay for a specific feature */
26
+ startRelay(featureId: string, chatId: string, platform: string, worktreePath?: string, unsubscribe?: () => void): string;
27
+ /** Get the worktree path of the active relay, if any. */
28
+ getActiveWorktreePath(): string | null;
29
+ /** End the active chat relay */
30
+ endRelay(): string;
31
+ /** Check if there is an active relay */
32
+ hasActiveRelay(): boolean;
33
+ /** Get the active relay's feature ID */
34
+ getActiveFeatureId(): string | null;
35
+ /**
36
+ * Buffer an agent response chunk and schedule a flush.
37
+ * Called when the agent produces output during a chat relay.
38
+ */
39
+ bufferAgentOutput(delta: string): void;
40
+ /** Flush any buffered output immediately (e.g., on stream completion) */
41
+ flushBuffer(): void;
42
+ /** Stop the relay and clean up all resources */
43
+ stop(): void;
44
+ }
45
+ //# sourceMappingURL=chat-relay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-relay.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/messaging/chat-relay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wEAAwE,CAAC;AAa7G;;;GAGG;AACH,qBAAa,kBAAkB;IAM3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IANnC,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,WAAW,CAA8C;gBAG9C,MAAM,EAAE,cAAc,EACtB,gBAAgB,GAAE,MAAmC;IAGxE,gDAAgD;IAChD,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,YAAY,SAAK,EACjB,WAAW,CAAC,EAAE,MAAM,IAAI,GACvB,MAAM;IAWT,yDAAyD;IACzD,qBAAqB,IAAI,MAAM,GAAG,IAAI;IAItC,gCAAgC;IAChC,QAAQ,IAAI,MAAM;IAYlB,wCAAwC;IACxC,cAAc,IAAI,OAAO;IAIzB,wCAAwC;IACxC,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAInC;;;OAGG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAatC,yEAAyE;IACzE,WAAW,IAAI,IAAI;IAkBnB,gDAAgD;IAChD,IAAI,IAAI,IAAI;CAKb"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Messaging Chat Relay
3
+ *
4
+ * Bridges messaging app chat ↔ Shep interactive agent sessions.
5
+ * When a user enters "chat mode" via /chat <feature_id>, their messages
6
+ * are relayed to the agent and agent responses are batched and sent back
7
+ * through the tunnel.
8
+ *
9
+ * Output batching: agent streaming output is buffered and flushed every
10
+ * N milliseconds (default 3s) to avoid flooding messaging platforms.
11
+ * Only one active relay per user at a time.
12
+ */
13
+ import { sanitizeForMessaging } from './content-sanitizer.js';
14
+ const DEFAULT_BUFFER_INTERVAL_MS = 3_000;
15
+ /**
16
+ * Manages the bidirectional chat relay between messaging apps
17
+ * and Shep interactive agent sessions.
18
+ */
19
+ export class MessagingChatRelay {
20
+ sender;
21
+ bufferIntervalMs;
22
+ activeRelay = null;
23
+ buffer = '';
24
+ bufferTimer = null;
25
+ constructor(sender, bufferIntervalMs = DEFAULT_BUFFER_INTERVAL_MS) {
26
+ this.sender = sender;
27
+ this.bufferIntervalMs = bufferIntervalMs;
28
+ }
29
+ /** Start a chat relay for a specific feature */
30
+ startRelay(featureId, chatId, platform, worktreePath = '', unsubscribe) {
31
+ // Tear down any previous relay (including its subscription).
32
+ if (this.activeRelay) {
33
+ this.flushBuffer();
34
+ this.activeRelay.unsubscribe?.();
35
+ }
36
+ this.activeRelay = { featureId, chatId, platform, worktreePath, unsubscribe };
37
+ return `Chat relay started for feature #${featureId}. Send messages here to talk to the agent. /end to stop.`;
38
+ }
39
+ /** Get the worktree path of the active relay, if any. */
40
+ getActiveWorktreePath() {
41
+ return this.activeRelay?.worktreePath ?? null;
42
+ }
43
+ /** End the active chat relay */
44
+ endRelay() {
45
+ if (!this.activeRelay) {
46
+ return 'No active chat relay.';
47
+ }
48
+ this.flushBuffer();
49
+ const fid = this.activeRelay.featureId;
50
+ this.activeRelay.unsubscribe?.();
51
+ this.activeRelay = null;
52
+ return `Chat relay ended for feature #${fid}.`;
53
+ }
54
+ /** Check if there is an active relay */
55
+ hasActiveRelay() {
56
+ return this.activeRelay !== null;
57
+ }
58
+ /** Get the active relay's feature ID */
59
+ getActiveFeatureId() {
60
+ return this.activeRelay?.featureId ?? null;
61
+ }
62
+ /**
63
+ * Buffer an agent response chunk and schedule a flush.
64
+ * Called when the agent produces output during a chat relay.
65
+ */
66
+ bufferAgentOutput(delta) {
67
+ if (!this.activeRelay)
68
+ return;
69
+ this.buffer += delta;
70
+ if (!this.bufferTimer) {
71
+ this.bufferTimer = setTimeout(() => {
72
+ this.flushBuffer();
73
+ }, this.bufferIntervalMs);
74
+ this.bufferTimer.unref();
75
+ }
76
+ }
77
+ /** Flush any buffered output immediately (e.g., on stream completion) */
78
+ flushBuffer() {
79
+ if (this.buffer && this.activeRelay) {
80
+ const notification = {
81
+ event: 'chat.response',
82
+ featureId: this.activeRelay.featureId,
83
+ title: '',
84
+ message: sanitizeForMessaging(this.buffer),
85
+ };
86
+ void this.sender.send(notification);
87
+ this.buffer = '';
88
+ }
89
+ if (this.bufferTimer) {
90
+ clearTimeout(this.bufferTimer);
91
+ this.bufferTimer = null;
92
+ }
93
+ }
94
+ /** Stop the relay and clean up all resources */
95
+ stop() {
96
+ this.flushBuffer();
97
+ this.activeRelay?.unsubscribe?.();
98
+ this.activeRelay = null;
99
+ }
100
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Messaging Command Executor
3
+ *
4
+ * Maps inbound MessagingCommand payloads from the Gateway tunnel
5
+ * to existing Shep use case invocations. This is the bridge between
6
+ * external messaging commands and the application layer.
7
+ *
8
+ * All commands are mapped to existing use cases — no new business logic
9
+ * is introduced here. The executor is a thin translation layer.
10
+ *
11
+ * Feature ID resolution: messaging commands use short IDs (first 8 chars
12
+ * of the UUID). The ShowFeatureUseCase and ResumeFeatureUseCase support
13
+ * prefix matching via findByIdPrefix. For approve/reject/stop, we resolve
14
+ * the feature first, then use its agentRunId.
15
+ */
16
+ import type { MessagingCommand } from '../../../domain/generated/output.js';
17
+ import type { IFeatureRepository } from '../../../application/ports/output/repositories/feature-repository.interface.js';
18
+ import type { ListFeaturesUseCase } from '../../../application/use-cases/features/list-features.use-case.js';
19
+ import type { ShowFeatureUseCase } from '../../../application/use-cases/features/show-feature.use-case.js';
20
+ import type { CreateFeatureUseCase } from '../../../application/use-cases/features/create/create-feature.use-case.js';
21
+ import type { ApproveAgentRunUseCase } from '../../../application/use-cases/agents/approve-agent-run.use-case.js';
22
+ import type { RejectAgentRunUseCase } from '../../../application/use-cases/agents/reject-agent-run.use-case.js';
23
+ import type { StopAgentRunUseCase } from '../../../application/use-cases/agents/stop-agent-run.use-case.js';
24
+ import type { ResumeFeatureUseCase } from '../../../application/use-cases/features/resume-feature.use-case.js';
25
+ import type { ListRepositoriesUseCase } from '../../../application/use-cases/repositories/list-repositories.use-case.js';
26
+ /**
27
+ * Execute messaging commands by delegating to existing use cases.
28
+ */
29
+ export declare class MessagingCommandExecutor {
30
+ private readonly featureRepo;
31
+ private readonly createFeature;
32
+ private readonly approveAgentRun;
33
+ private readonly rejectAgentRun;
34
+ private readonly stopAgentRun;
35
+ private readonly resumeFeature;
36
+ private readonly listFeatures;
37
+ private readonly showFeature;
38
+ private readonly listRepositories;
39
+ constructor(featureRepo: IFeatureRepository, createFeature: CreateFeatureUseCase, approveAgentRun: ApproveAgentRunUseCase, rejectAgentRun: RejectAgentRunUseCase, stopAgentRun: StopAgentRunUseCase, resumeFeature: ResumeFeatureUseCase, listFeatures: ListFeaturesUseCase, showFeature: ShowFeatureUseCase, listRepositories: ListRepositoriesUseCase);
40
+ /**
41
+ * Execute a messaging command and return a human-readable response.
42
+ */
43
+ execute(cmd: MessagingCommand): Promise<string>;
44
+ private handleNew;
45
+ private handleApprove;
46
+ private handleReject;
47
+ private handleStop;
48
+ private handleResume;
49
+ private handleStatus;
50
+ /** Resolve a feature by exact ID or prefix match */
51
+ private resolveFeature;
52
+ }
53
+ //# sourceMappingURL=command-executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-executor.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/messaging/command-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAW,MAAM,qCAAqC,CAAC;AACrF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gFAAgF,CAAC;AACzH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kEAAkE,CAAC;AAC3G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2EAA2E,CAAC;AACtH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qEAAqE,CAAC;AAClH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAChH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAC5G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oEAAoE,CAAC;AAC/G,OAAO,KAAK,EAAE,uBAAuB,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