@aeolus-fleet/gateway 0.32.2 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (880) hide show
  1. package/README.md +34 -5
  2. package/dist/adapters/crypto/party-sign-in-seals.d.ts +3 -0
  3. package/dist/adapters/crypto/party-sign-in-seals.js +15 -0
  4. package/dist/adapters/crypto/party-sign-in-seals.js.map +1 -0
  5. package/dist/adapters/crypto/slack-install-seals.d.ts +3 -0
  6. package/dist/adapters/crypto/slack-install-seals.js +15 -0
  7. package/dist/adapters/crypto/slack-install-seals.js.map +1 -0
  8. package/dist/adapters/crypto/slack-link-seals.d.ts +3 -0
  9. package/dist/adapters/crypto/slack-link-seals.js +15 -0
  10. package/dist/adapters/crypto/slack-link-seals.js.map +1 -0
  11. package/dist/adapters/crypto/slack-signatures.d.ts +3 -0
  12. package/dist/adapters/crypto/slack-signatures.js +14 -0
  13. package/dist/adapters/crypto/slack-signatures.js.map +1 -0
  14. package/dist/adapters/fleet/rest-fleet-door.js +2 -2
  15. package/dist/adapters/fleet/rest-fleet-door.js.map +1 -1
  16. package/dist/adapters/fleet/ship-names.d.ts +7 -0
  17. package/dist/adapters/fleet/ship-names.js +25 -0
  18. package/dist/adapters/fleet/ship-names.js.map +1 -0
  19. package/dist/adapters/fleet/slack-ships.d.ts +15 -0
  20. package/dist/adapters/fleet/slack-ships.js +32 -0
  21. package/dist/adapters/fleet/slack-ships.js.map +1 -0
  22. package/dist/adapters/http/mcp-endpoint.js +1 -1
  23. package/dist/adapters/http/mcp-endpoint.js.map +1 -1
  24. package/dist/adapters/http/oauth-routes.d.ts +4 -1
  25. package/dist/adapters/http/oauth-routes.js +21 -9
  26. package/dist/adapters/http/oauth-routes.js.map +1 -1
  27. package/dist/adapters/http/openai-apps-challenge.d.ts +10 -0
  28. package/dist/adapters/http/openai-apps-challenge.js +9 -0
  29. package/dist/adapters/http/openai-apps-challenge.js.map +1 -0
  30. package/dist/adapters/http/party-sign-in-routes.d.ts +25 -0
  31. package/dist/adapters/http/party-sign-in-routes.js +45 -0
  32. package/dist/adapters/http/party-sign-in-routes.js.map +1 -0
  33. package/dist/adapters/http/person-tools.d.ts +24 -1
  34. package/dist/adapters/http/person-tools.js +43 -11
  35. package/dist/adapters/http/person-tools.js.map +1 -1
  36. package/dist/adapters/http/slack-routes.d.ts +15 -0
  37. package/dist/adapters/http/slack-routes.js +188 -0
  38. package/dist/adapters/http/slack-routes.js.map +1 -0
  39. package/dist/adapters/mcp/mcp-servers.js +22 -4
  40. package/dist/adapters/mcp/mcp-servers.js.map +1 -1
  41. package/dist/adapters/oauth/authorization-servers.d.ts +2 -0
  42. package/dist/adapters/oauth/authorization-servers.js +127 -0
  43. package/dist/adapters/oauth/authorization-servers.js.map +1 -0
  44. package/dist/adapters/oauth/party-sign-ins.d.ts +2 -0
  45. package/dist/adapters/oauth/party-sign-ins.js +152 -0
  46. package/dist/adapters/oauth/party-sign-ins.js.map +1 -0
  47. package/dist/adapters/prisma/fleet-forgetter.d.ts +1 -1
  48. package/dist/adapters/prisma/fleet-forgetter.js +2 -2
  49. package/dist/adapters/prisma/fleet-forgetter.js.map +1 -1
  50. package/dist/adapters/prisma/generated/browser.d.ts +35 -0
  51. package/dist/adapters/prisma/generated/client.d.ts +35 -0
  52. package/dist/adapters/prisma/generated/internal/class.d.ts +77 -0
  53. package/dist/adapters/prisma/generated/internal/class.js +4 -4
  54. package/dist/adapters/prisma/generated/internal/class.js.map +1 -1
  55. package/dist/adapters/prisma/generated/internal/prismaNamespace.d.ts +629 -1
  56. package/dist/adapters/prisma/generated/internal/prismaNamespace.js +97 -1
  57. package/dist/adapters/prisma/generated/internal/prismaNamespace.js.map +1 -1
  58. package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.d.ts +103 -0
  59. package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.js +97 -1
  60. package/dist/adapters/prisma/generated/internal/prismaNamespaceBrowser.js.map +1 -1
  61. package/dist/adapters/prisma/generated/models/PartyGrant.d.ts +1276 -0
  62. package/dist/adapters/prisma/generated/models/PartyGrant.js +2 -0
  63. package/dist/adapters/prisma/generated/models/PartyGrant.js.map +1 -0
  64. package/dist/adapters/prisma/generated/models/PartySignInNotice.d.ts +1003 -0
  65. package/dist/adapters/prisma/generated/models/PartySignInNotice.js +2 -0
  66. package/dist/adapters/prisma/generated/models/PartySignInNotice.js.map +1 -0
  67. package/dist/adapters/prisma/generated/models/SlackApp.d.ts +1229 -0
  68. package/dist/adapters/prisma/generated/models/SlackApp.js +2 -0
  69. package/dist/adapters/prisma/generated/models/SlackApp.js.map +1 -0
  70. package/dist/adapters/prisma/generated/models/SlackEvent.d.ts +1232 -0
  71. package/dist/adapters/prisma/generated/models/SlackEvent.js +2 -0
  72. package/dist/adapters/prisma/generated/models/SlackEvent.js.map +1 -0
  73. package/dist/adapters/prisma/generated/models/SlackLink.d.ts +1126 -0
  74. package/dist/adapters/prisma/generated/models/SlackLink.js +2 -0
  75. package/dist/adapters/prisma/generated/models/SlackLink.js.map +1 -0
  76. package/dist/adapters/prisma/generated/models/SlackPost.d.ts +1174 -0
  77. package/dist/adapters/prisma/generated/models/SlackPost.js +2 -0
  78. package/dist/adapters/prisma/generated/models/SlackPost.js.map +1 -0
  79. package/dist/adapters/prisma/generated/models/SlackWorkspace.d.ts +1143 -0
  80. package/dist/adapters/prisma/generated/models/SlackWorkspace.js +2 -0
  81. package/dist/adapters/prisma/generated/models/SlackWorkspace.js.map +1 -0
  82. package/dist/adapters/prisma/generated/models.d.ts +7 -0
  83. package/dist/adapters/prisma/party-grants.d.ts +10 -0
  84. package/dist/adapters/prisma/party-grants.js +118 -0
  85. package/dist/adapters/prisma/party-grants.js.map +1 -0
  86. package/dist/adapters/prisma/party-store.js +21 -2
  87. package/dist/adapters/prisma/party-store.js.map +1 -1
  88. package/dist/adapters/prisma/sign-in-notices.d.ts +8 -0
  89. package/dist/adapters/prisma/sign-in-notices.js +22 -0
  90. package/dist/adapters/prisma/sign-in-notices.js.map +1 -0
  91. package/dist/adapters/prisma/slack-events.d.ts +8 -0
  92. package/dist/adapters/prisma/slack-events.js +55 -0
  93. package/dist/adapters/prisma/slack-events.js.map +1 -0
  94. package/dist/adapters/prisma/slack-links.d.ts +8 -0
  95. package/dist/adapters/prisma/slack-links.js +49 -0
  96. package/dist/adapters/prisma/slack-links.js.map +1 -0
  97. package/dist/adapters/prisma/slack-posts.d.ts +4 -0
  98. package/dist/adapters/prisma/slack-posts.js +38 -0
  99. package/dist/adapters/prisma/slack-posts.js.map +1 -0
  100. package/dist/adapters/prisma/slack-stores.d.ts +6 -0
  101. package/dist/adapters/prisma/slack-stores.js +115 -0
  102. package/dist/adapters/prisma/slack-stores.js.map +1 -0
  103. package/dist/adapters/slack/slack-call.d.ts +15 -0
  104. package/dist/adapters/slack/slack-call.js +41 -0
  105. package/dist/adapters/slack/slack-call.js.map +1 -0
  106. package/dist/adapters/slack/slack-messages.d.ts +4 -0
  107. package/dist/adapters/slack/slack-messages.js +53 -0
  108. package/dist/adapters/slack/slack-messages.js.map +1 -0
  109. package/dist/adapters/slack/slack-sign-in.d.ts +4 -0
  110. package/dist/adapters/slack/slack-sign-in.js +33 -0
  111. package/dist/adapters/slack/slack-sign-in.js.map +1 -0
  112. package/dist/adapters/slack/slack-tooling.d.ts +6 -0
  113. package/dist/adapters/slack/slack-tooling.js +68 -0
  114. package/dist/adapters/slack/slack-tooling.js.map +1 -0
  115. package/dist/adapters/trpc/router.d.ts +286 -10
  116. package/dist/adapters/trpc/router.js +263 -11
  117. package/dist/adapters/trpc/router.js.map +1 -1
  118. package/dist/app.d.ts +6 -0
  119. package/dist/app.js +225 -21
  120. package/dist/app.js.map +1 -1
  121. package/dist/bin/aeolus-gateway.js +2 -0
  122. package/dist/bin/aeolus-gateway.js.map +1 -1
  123. package/dist/config.d.ts +8 -0
  124. package/dist/config.js +4 -0
  125. package/dist/config.js.map +1 -1
  126. package/dist/core/connection/connect.d.ts +12 -0
  127. package/dist/core/connection/connect.js +11 -4
  128. package/dist/core/connection/connect.js.map +1 -1
  129. package/dist/core/connection/declare-gateway-scopes.d.ts +15 -0
  130. package/dist/core/connection/declare-gateway-scopes.js +23 -0
  131. package/dist/core/connection/declare-gateway-scopes.js.map +1 -0
  132. package/dist/core/connection/ports.d.ts +5 -0
  133. package/dist/core/mcp-out/grant-calls.d.ts +69 -0
  134. package/dist/core/mcp-out/grant-calls.js +98 -0
  135. package/dist/core/mcp-out/grant-calls.js.map +1 -0
  136. package/dist/core/mcp-out/hand-call.d.ts +6 -1
  137. package/dist/core/mcp-out/hand-call.js +23 -2
  138. package/dist/core/mcp-out/hand-call.js.map +1 -1
  139. package/dist/core/mcp-out/ports.d.ts +6 -2
  140. package/dist/core/mcp-out/state-party.d.ts +5 -2
  141. package/dist/core/mcp-out/state-party.js +7 -2
  142. package/dist/core/mcp-out/state-party.js.map +1 -1
  143. package/dist/core/oauth/exchange-token.d.ts +1 -0
  144. package/dist/core/oauth/exchange-token.js +4 -3
  145. package/dist/core/oauth/exchange-token.js.map +1 -1
  146. package/dist/core/oauth/read-authorization.d.ts +3 -3
  147. package/dist/core/oauth/read-authorization.js +6 -5
  148. package/dist/core/oauth/read-authorization.js.map +1 -1
  149. package/dist/core/parties/add-sign-in-server.d.ts +25 -0
  150. package/dist/core/parties/add-sign-in-server.js +70 -0
  151. package/dist/core/parties/add-sign-in-server.js.map +1 -0
  152. package/dist/core/parties/approve-party.d.ts +2 -2
  153. package/dist/core/parties/check-approving.d.ts +3 -3
  154. package/dist/core/parties/check-approving.js +2 -2
  155. package/dist/core/parties/check-approving.js.map +1 -1
  156. package/dist/core/parties/party.d.ts +3 -2
  157. package/dist/core/parties/party.js +4 -1
  158. package/dist/core/parties/party.js.map +1 -1
  159. package/dist/core/parties/ports.d.ts +49 -0
  160. package/dist/core/parties/read-party-tools.d.ts +5 -2
  161. package/dist/core/parties/read-party-tools.js +7 -2
  162. package/dist/core/parties/read-party-tools.js.map +1 -1
  163. package/dist/core/parties/retire-party.d.ts +5 -1
  164. package/dist/core/parties/retire-party.js +6 -1
  165. package/dist/core/parties/retire-party.js.map +1 -1
  166. package/dist/core/parties/shown-party.d.ts +2 -2
  167. package/dist/core/parties/sign-in-servers.d.ts +4 -0
  168. package/dist/core/parties/sign-in-servers.js +13 -0
  169. package/dist/core/parties/sign-in-servers.js.map +1 -0
  170. package/dist/core/parties/switch-tools.d.ts +3 -1
  171. package/dist/core/parties/switch-tools.js +5 -1
  172. package/dist/core/parties/switch-tools.js.map +1 -1
  173. package/dist/core/party-grants/approved-sign-in-party.d.ts +17 -0
  174. package/dist/core/party-grants/approved-sign-in-party.js +21 -0
  175. package/dist/core/party-grants/approved-sign-in-party.js.map +1 -0
  176. package/dist/core/party-grants/call-grant.d.ts +46 -0
  177. package/dist/core/party-grants/call-grant.js +30 -0
  178. package/dist/core/party-grants/call-grant.js.map +1 -0
  179. package/dist/core/party-grants/complete-party-sign-in.d.ts +52 -0
  180. package/dist/core/party-grants/complete-party-sign-in.js +95 -0
  181. package/dist/core/party-grants/complete-party-sign-in.js.map +1 -0
  182. package/dist/core/party-grants/end-account-grants.d.ts +18 -0
  183. package/dist/core/party-grants/end-account-grants.js +16 -0
  184. package/dist/core/party-grants/end-account-grants.js.map +1 -0
  185. package/dist/core/party-grants/end-grant.d.ts +23 -0
  186. package/dist/core/party-grants/end-grant.js +33 -0
  187. package/dist/core/party-grants/end-grant.js.map +1 -0
  188. package/dist/core/party-grants/end-party-grants.d.ts +19 -0
  189. package/dist/core/party-grants/end-party-grants.js +31 -0
  190. package/dist/core/party-grants/end-party-grants.js.map +1 -0
  191. package/dist/core/party-grants/end-retired-persons-grants.d.ts +19 -0
  192. package/dist/core/party-grants/end-retired-persons-grants.js +30 -0
  193. package/dist/core/party-grants/end-retired-persons-grants.js.map +1 -0
  194. package/dist/core/party-grants/keep-grants-alive.d.ts +18 -0
  195. package/dist/core/party-grants/keep-grants-alive.js +19 -0
  196. package/dist/core/party-grants/keep-grants-alive.js.map +1 -0
  197. package/dist/core/party-grants/list-grants.d.ts +30 -0
  198. package/dist/core/party-grants/list-grants.js +34 -0
  199. package/dist/core/party-grants/list-grants.js.map +1 -0
  200. package/dist/core/party-grants/listing-connection.d.ts +29 -0
  201. package/dist/core/party-grants/listing-connection.js +17 -0
  202. package/dist/core/party-grants/listing-connection.js.map +1 -0
  203. package/dist/core/party-grants/party-grant.d.ts +50 -0
  204. package/dist/core/party-grants/party-grant.js +26 -0
  205. package/dist/core/party-grants/party-grant.js.map +1 -0
  206. package/dist/core/party-grants/ports.d.ts +180 -0
  207. package/dist/core/party-grants/ports.js +2 -0
  208. package/dist/core/party-grants/ports.js.map +1 -0
  209. package/dist/core/party-grants/read-own-grant.d.ts +33 -0
  210. package/dist/core/party-grants/read-own-grant.js +23 -0
  211. package/dist/core/party-grants/read-own-grant.js.map +1 -0
  212. package/dist/core/party-grants/refresh-grant.d.ts +41 -0
  213. package/dist/core/party-grants/refresh-grant.js +58 -0
  214. package/dist/core/party-grants/refresh-grant.js.map +1 -0
  215. package/dist/core/party-grants/remove-grant.d.ts +21 -0
  216. package/dist/core/party-grants/remove-grant.js +25 -0
  217. package/dist/core/party-grants/remove-grant.js.map +1 -0
  218. package/dist/core/party-grants/remove-own-grant.d.ts +17 -0
  219. package/dist/core/party-grants/remove-own-grant.js +21 -0
  220. package/dist/core/party-grants/remove-own-grant.js.map +1 -0
  221. package/dist/core/party-grants/sign-in-party.d.ts +23 -0
  222. package/dist/core/party-grants/sign-in-party.js +22 -0
  223. package/dist/core/party-grants/sign-in-party.js.map +1 -0
  224. package/dist/core/party-grants/start-party-sign-in.d.ts +31 -0
  225. package/dist/core/party-grants/start-party-sign-in.js +31 -0
  226. package/dist/core/party-grants/start-party-sign-in.js.map +1 -0
  227. package/dist/core/party-grants/tell-sign-in-needed.d.ts +29 -0
  228. package/dist/core/party-grants/tell-sign-in-needed.js +27 -0
  229. package/dist/core/party-grants/tell-sign-in-needed.js.map +1 -0
  230. package/dist/core/people/ports.d.ts +23 -2
  231. package/dist/core/people/wake-person.d.ts +9 -2
  232. package/dist/core/people/wake-person.js +33 -9
  233. package/dist/core/people/wake-person.js.map +1 -1
  234. package/dist/core/shared/errors.d.ts +1 -1
  235. package/dist/core/shared/errors.js.map +1 -1
  236. package/dist/core/sign-in/start-sign-in.d.ts +4 -1
  237. package/dist/core/sign-in/start-sign-in.js +8 -2
  238. package/dist/core/sign-in/start-sign-in.js.map +1 -1
  239. package/dist/core/slack/answer-in-slack.d.ts +41 -0
  240. package/dist/core/slack/answer-in-slack.js +59 -0
  241. package/dist/core/slack/answer-in-slack.js.map +1 -0
  242. package/dist/core/slack/complete-install.d.ts +27 -0
  243. package/dist/core/slack/complete-install.js +36 -0
  244. package/dist/core/slack/complete-install.js.map +1 -0
  245. package/dist/core/slack/complete-link.d.ts +41 -0
  246. package/dist/core/slack/complete-link.js +64 -0
  247. package/dist/core/slack/complete-link.js.map +1 -0
  248. package/dist/core/slack/connect-slack.d.ts +34 -0
  249. package/dist/core/slack/connect-slack.js +54 -0
  250. package/dist/core/slack/connect-slack.js.map +1 -0
  251. package/dist/core/slack/disconnect-slack.d.ts +21 -0
  252. package/dist/core/slack/disconnect-slack.js +31 -0
  253. package/dist/core/slack/disconnect-slack.js.map +1 -0
  254. package/dist/core/slack/expose-ship.d.ts +35 -0
  255. package/dist/core/slack/expose-ship.js +59 -0
  256. package/dist/core/slack/expose-ship.js.map +1 -0
  257. package/dist/core/slack/follow-exposed-ships.d.ts +20 -0
  258. package/dist/core/slack/follow-exposed-ships.js +43 -0
  259. package/dist/core/slack/follow-exposed-ships.js.map +1 -0
  260. package/dist/core/slack/gateway-bot.d.ts +20 -0
  261. package/dist/core/slack/gateway-bot.js +22 -0
  262. package/dist/core/slack/gateway-bot.js.map +1 -0
  263. package/dist/core/slack/kept-slack-event.d.ts +32 -0
  264. package/dist/core/slack/kept-slack-event.js +5 -0
  265. package/dist/core/slack/kept-slack-event.js.map +1 -0
  266. package/dist/core/slack/list-exposable.d.ts +25 -0
  267. package/dist/core/slack/list-exposable.js +32 -0
  268. package/dist/core/slack/list-exposable.js.map +1 -0
  269. package/dist/core/slack/ports.d.ts +287 -0
  270. package/dist/core/slack/ports.js +2 -0
  271. package/dist/core/slack/ports.js.map +1 -0
  272. package/dist/core/slack/read-slack-link.d.ts +23 -0
  273. package/dist/core/slack/read-slack-link.js +20 -0
  274. package/dist/core/slack/read-slack-link.js.map +1 -0
  275. package/dist/core/slack/read-slack.d.ts +42 -0
  276. package/dist/core/slack/read-slack.js +35 -0
  277. package/dist/core/slack/read-slack.js.map +1 -0
  278. package/dist/core/slack/remove-bot.d.ts +24 -0
  279. package/dist/core/slack/remove-bot.js +33 -0
  280. package/dist/core/slack/remove-bot.js.map +1 -0
  281. package/dist/core/slack/rotate-configuration-tokens.d.ts +13 -0
  282. package/dist/core/slack/rotate-configuration-tokens.js +14 -0
  283. package/dist/core/slack/rotate-configuration-tokens.js.map +1 -0
  284. package/dist/core/slack/send-slack-events.d.ts +32 -0
  285. package/dist/core/slack/send-slack-events.js +106 -0
  286. package/dist/core/slack/send-slack-events.js.map +1 -0
  287. package/dist/core/slack/ship-bot.d.ts +23 -0
  288. package/dist/core/slack/ship-bot.js +25 -0
  289. package/dist/core/slack/ship-bot.js.map +1 -0
  290. package/dist/core/slack/show-all-in-slack.d.ts +16 -0
  291. package/dist/core/slack/show-all-in-slack.js +18 -0
  292. package/dist/core/slack/show-all-in-slack.js.map +1 -0
  293. package/dist/core/slack/show-in-slack.d.ts +38 -0
  294. package/dist/core/slack/show-in-slack.js +154 -0
  295. package/dist/core/slack/show-in-slack.js.map +1 -0
  296. package/dist/core/slack/slack-app.d.ts +77 -0
  297. package/dist/core/slack/slack-app.js +53 -0
  298. package/dist/core/slack/slack-app.js.map +1 -0
  299. package/dist/core/slack/slack-event.d.ts +51 -0
  300. package/dist/core/slack/slack-event.js +18 -0
  301. package/dist/core/slack/slack-event.js.map +1 -0
  302. package/dist/core/slack/slack-link.d.ts +20 -0
  303. package/dist/core/slack/slack-link.js +2 -0
  304. package/dist/core/slack/slack-link.js.map +1 -0
  305. package/dist/core/slack/slack-markdown.d.ts +13 -0
  306. package/dist/core/slack/slack-markdown.js +27 -0
  307. package/dist/core/slack/slack-markdown.js.map +1 -0
  308. package/dist/core/slack/slack-post-of.d.ts +27 -0
  309. package/dist/core/slack/slack-post-of.js +71 -0
  310. package/dist/core/slack/slack-post-of.js.map +1 -0
  311. package/dist/core/slack/slack-post.d.ts +40 -0
  312. package/dist/core/slack/slack-post.js +13 -0
  313. package/dist/core/slack/slack-post.js.map +1 -0
  314. package/dist/core/slack/slack-request.d.ts +17 -0
  315. package/dist/core/slack/slack-request.js +10 -0
  316. package/dist/core/slack/slack-request.js.map +1 -0
  317. package/dist/core/slack/slack-workspace.d.ts +36 -0
  318. package/dist/core/slack/slack-workspace.js +7 -0
  319. package/dist/core/slack/slack-workspace.js.map +1 -0
  320. package/dist/core/slack/start-install.d.ts +43 -0
  321. package/dist/core/slack/start-install.js +57 -0
  322. package/dist/core/slack/start-install.js.map +1 -0
  323. package/dist/core/slack/start-link.d.ts +32 -0
  324. package/dist/core/slack/start-link.js +46 -0
  325. package/dist/core/slack/start-link.js.map +1 -0
  326. package/dist/core/slack/stop-slack-link.d.ts +16 -0
  327. package/dist/core/slack/stop-slack-link.js +9 -0
  328. package/dist/core/slack/stop-slack-link.js.map +1 -0
  329. package/dist/core/slack/take-access-token.d.ts +25 -0
  330. package/dist/core/slack/take-access-token.js +45 -0
  331. package/dist/core/slack/take-access-token.js.map +1 -0
  332. package/dist/core/slack/take-slack-event.d.ts +49 -0
  333. package/dist/core/slack/take-slack-event.js +81 -0
  334. package/dist/core/slack/take-slack-event.js.map +1 -0
  335. package/dist/core/slack/unlink-slack.d.ts +9 -0
  336. package/dist/core/slack/unlink-slack.js +9 -0
  337. package/dist/core/slack/unlink-slack.js.map +1 -0
  338. package/dist/core/vault/credential.d.ts +34 -0
  339. package/dist/grant-worker.d.ts +20 -0
  340. package/dist/grant-worker.js +24 -0
  341. package/dist/grant-worker.js.map +1 -0
  342. package/dist/slack-event-worker.d.ts +21 -0
  343. package/dist/slack-event-worker.js +38 -0
  344. package/dist/slack-event-worker.js.map +1 -0
  345. package/dist/slack-token-worker.d.ts +19 -0
  346. package/dist/slack-token-worker.js +24 -0
  347. package/dist/slack-token-worker.js.map +1 -0
  348. package/package.json +3 -2
  349. package/src/adapters/prisma/migrations/20261027090000_slack_workspaces/migration.sql +30 -0
  350. package/src/adapters/prisma/migrations/20261027150000_slack_bots/migration.sql +6 -0
  351. package/src/adapters/prisma/migrations/20261027200000_slack_links/migration.sql +15 -0
  352. package/src/adapters/prisma/migrations/20261028090000_slack_events/migration.sql +18 -0
  353. package/src/adapters/prisma/migrations/20261028150000_slack_posts/migration.sql +25 -0
  354. package/src/adapters/prisma/migrations/20261028230000_party_grants/migration.sql +18 -0
  355. package/src/adapters/prisma/migrations/20261029080000_party_sign_in_notices/migration.sql +10 -0
  356. package/src/adapters/prisma/migrations/20261029120000_party_grants_lost/migration.sql +3 -0
  357. package/src/adapters/prisma/migrations/20261029130000_party_grants_refreshed/migration.sql +6 -0
  358. package/src/adapters/prisma/migrations/20261030090000_party_grants_of_account/migration.sql +2 -0
  359. package/src/adapters/prisma/migrations/20261030100000_slack_events_unmatched_answers/migration.sql +2 -0
  360. package/src/adapters/prisma/schema.prisma +148 -0
  361. package/web/.next/BUILD_ID +1 -1
  362. package/web/.next/app-path-routes-manifest.json +8 -1
  363. package/web/.next/build-manifest.json +51 -3
  364. package/web/.next/diagnostics/route-bundle-stats.json +145 -72
  365. package/web/.next/fallback-build-manifest.json +3 -3
  366. package/web/.next/prerender-manifest.json +67 -3
  367. package/web/.next/routes-manifest.json +42 -0
  368. package/web/.next/server/app/(console)/gateway-off/page/server-reference-manifest.json +1 -1
  369. package/web/.next/server/app/(console)/gateway-off/page.js +6 -6
  370. package/web/.next/server/app/(console)/gateway-off/page.js.nft.json +1 -1
  371. package/web/.next/server/app/(console)/gateway-off/page_client-reference-manifest.js +1 -1
  372. package/web/.next/server/app/(console)/meetings/[meetingId]/page/server-reference-manifest.json +3 -3
  373. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js +6 -6
  374. package/web/.next/server/app/(console)/meetings/[meetingId]/page.js.nft.json +1 -1
  375. package/web/.next/server/app/(console)/meetings/[meetingId]/page_client-reference-manifest.js +1 -1
  376. package/web/.next/server/app/(console)/outside-parties/[name]/change/page/server-reference-manifest.json +48 -8
  377. package/web/.next/server/app/(console)/outside-parties/[name]/change/page.js +8 -8
  378. package/web/.next/server/app/(console)/outside-parties/[name]/change/page.js.nft.json +1 -1
  379. package/web/.next/server/app/(console)/outside-parties/[name]/change/page_client-reference-manifest.js +1 -1
  380. package/web/.next/server/app/(console)/outside-parties/[name]/page/server-reference-manifest.json +44 -4
  381. package/web/.next/server/app/(console)/outside-parties/[name]/page.js +8 -8
  382. package/web/.next/server/app/(console)/outside-parties/[name]/page.js.nft.json +1 -1
  383. package/web/.next/server/app/(console)/outside-parties/[name]/page_client-reference-manifest.js +1 -1
  384. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page/server-reference-manifest.json +48 -8
  385. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page.js +8 -8
  386. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page.js.nft.json +1 -1
  387. package/web/.next/server/app/(console)/outside-parties/[name]/retire/page_client-reference-manifest.js +1 -1
  388. package/web/.next/server/app/(console)/outside-parties/add/page/server-reference-manifest.json +46 -6
  389. package/web/.next/server/app/(console)/outside-parties/add/page.js +9 -8
  390. package/web/.next/server/app/(console)/outside-parties/add/page.js.nft.json +1 -1
  391. package/web/.next/server/app/(console)/outside-parties/add/page_client-reference-manifest.js +1 -1
  392. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page/server-reference-manifest.json +2 -2
  393. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page.js +7 -7
  394. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page.js.nft.json +1 -1
  395. package/web/.next/server/app/(console)/outside-parties/add-a2a-agent/page_client-reference-manifest.js +1 -1
  396. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page/server-reference-manifest.json +2 -2
  397. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page.js +7 -7
  398. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page.js.nft.json +1 -1
  399. package/web/.next/server/app/(console)/outside-parties/add-a2a-client/page_client-reference-manifest.js +1 -1
  400. package/web/.next/server/app/(console)/outside-parties/page/server-reference-manifest.json +2 -2
  401. package/web/.next/server/app/(console)/outside-parties/page.js +6 -6
  402. package/web/.next/server/app/(console)/outside-parties/page.js.nft.json +1 -1
  403. package/web/.next/server/app/(console)/outside-parties/page_client-reference-manifest.js +1 -1
  404. package/web/.next/server/app/(console)/overview/changes/route.js +3 -2
  405. package/web/.next/server/app/(console)/overview/changes/route.js.nft.json +1 -1
  406. package/web/.next/server/app/(console)/overview/focus/route.js +3 -2
  407. package/web/.next/server/app/(console)/overview/focus/route.js.nft.json +1 -1
  408. package/web/.next/server/app/(console)/overview/page/server-reference-manifest.json +27 -7
  409. package/web/.next/server/app/(console)/overview/page.js +8 -8
  410. package/web/.next/server/app/(console)/overview/page.js.nft.json +1 -1
  411. package/web/.next/server/app/(console)/overview/page_client-reference-manifest.js +1 -1
  412. package/web/.next/server/app/(console)/overview/requests/[requestId]/page/server-reference-manifest.json +2 -2
  413. package/web/.next/server/app/(console)/overview/requests/[requestId]/page.js +6 -6
  414. package/web/.next/server/app/(console)/overview/requests/[requestId]/page.js.nft.json +1 -1
  415. package/web/.next/server/app/(console)/overview/requests/[requestId]/page_client-reference-manifest.js +1 -1
  416. package/web/.next/server/app/(console)/parties/page/server-reference-manifest.json +8 -8
  417. package/web/.next/server/app/(console)/parties/page.js +7 -7
  418. package/web/.next/server/app/(console)/parties/page.js.nft.json +1 -1
  419. package/web/.next/server/app/(console)/parties/page_client-reference-manifest.js +1 -1
  420. package/web/.next/server/app/(console)/sign-in/failed/page/server-reference-manifest.json +1 -1
  421. package/web/.next/server/app/(console)/sign-in/failed/page.js +6 -6
  422. package/web/.next/server/app/(console)/sign-in/failed/page.js.nft.json +1 -1
  423. package/web/.next/server/app/(console)/sign-in/failed/page_client-reference-manifest.js +1 -1
  424. package/web/.next/server/app/(console)/slack/disconnect/page/app-paths-manifest.json +3 -0
  425. package/web/.next/server/app/(console)/slack/disconnect/page/build-manifest.json +23 -0
  426. package/web/.next/server/app/(console)/slack/disconnect/page/next-font-manifest.json +11 -0
  427. package/web/.next/server/app/(console)/slack/disconnect/page/react-loadable-manifest.json +1 -0
  428. package/web/.next/server/app/(console)/slack/disconnect/page/server-reference-manifest.json +65 -0
  429. package/web/.next/server/app/(console)/slack/disconnect/page.js +22 -0
  430. package/web/.next/server/app/(console)/slack/disconnect/page.js.map +5 -0
  431. package/web/.next/server/app/(console)/slack/disconnect/page.js.nft.json +1 -0
  432. package/web/.next/server/app/(console)/slack/disconnect/page_client-reference-manifest.js +3 -0
  433. package/web/.next/server/app/(console)/slack/expose/page/app-paths-manifest.json +3 -0
  434. package/web/.next/server/app/(console)/slack/expose/page/build-manifest.json +23 -0
  435. package/web/.next/server/app/(console)/slack/expose/page/next-font-manifest.json +11 -0
  436. package/web/.next/server/app/(console)/slack/expose/page/react-loadable-manifest.json +1 -0
  437. package/web/.next/server/app/(console)/slack/expose/page/server-reference-manifest.json +65 -0
  438. package/web/.next/server/app/(console)/slack/expose/page.js +22 -0
  439. package/web/.next/server/app/(console)/slack/expose/page.js.map +5 -0
  440. package/web/.next/server/app/(console)/slack/expose/page.js.nft.json +1 -0
  441. package/web/.next/server/app/(console)/slack/expose/page_client-reference-manifest.js +3 -0
  442. package/web/.next/server/app/(console)/slack/link/route/app-paths-manifest.json +3 -0
  443. package/web/.next/server/app/(console)/slack/link/route/build-manifest.json +12 -0
  444. package/web/.next/server/app/(console)/slack/link/route/server-reference-manifest.json +4 -0
  445. package/web/.next/server/app/(console)/slack/link/route.js +8 -0
  446. package/web/.next/server/app/(console)/slack/link/route.js.map +5 -0
  447. package/web/.next/server/app/(console)/slack/link/route.js.nft.json +1 -0
  448. package/web/.next/server/app/(console)/slack/link/route_client-reference-manifest.js +3 -0
  449. package/web/.next/server/app/(console)/slack/page/app-paths-manifest.json +3 -0
  450. package/web/.next/server/app/(console)/slack/page/build-manifest.json +23 -0
  451. package/web/.next/server/app/(console)/slack/page/next-font-manifest.json +11 -0
  452. package/web/.next/server/app/(console)/slack/page/react-loadable-manifest.json +1 -0
  453. package/web/.next/server/app/(console)/slack/page/server-reference-manifest.json +65 -0
  454. package/web/.next/server/app/(console)/slack/page.js +22 -0
  455. package/web/.next/server/app/(console)/slack/page.js.map +5 -0
  456. package/web/.next/server/app/(console)/slack/page.js.nft.json +1 -0
  457. package/web/.next/server/app/(console)/slack/page_client-reference-manifest.js +3 -0
  458. package/web/.next/server/app/(console)/slack/remove/page/app-paths-manifest.json +3 -0
  459. package/web/.next/server/app/(console)/slack/remove/page/build-manifest.json +23 -0
  460. package/web/.next/server/app/(console)/slack/remove/page/next-font-manifest.json +11 -0
  461. package/web/.next/server/app/(console)/slack/remove/page/react-loadable-manifest.json +1 -0
  462. package/web/.next/server/app/(console)/slack/remove/page/server-reference-manifest.json +65 -0
  463. package/web/.next/server/app/(console)/slack/remove/page.js +22 -0
  464. package/web/.next/server/app/(console)/slack/remove/page.js.map +5 -0
  465. package/web/.next/server/app/(console)/slack/remove/page.js.nft.json +1 -0
  466. package/web/.next/server/app/(console)/slack/remove/page_client-reference-manifest.js +3 -0
  467. package/web/.next/server/app/_global-error/page.js +1 -1
  468. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  469. package/web/.next/server/app/_global-error.html +1 -1
  470. package/web/.next/server/app/_global-error.rsc +1 -1
  471. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  472. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  473. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  474. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  475. package/web/.next/server/app/_not-found/page.js +6 -6
  476. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  477. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  478. package/web/.next/server/app/apple-icon.png/route/app-paths-manifest.json +3 -0
  479. package/web/.next/server/app/apple-icon.png/route/build-manifest.json +12 -0
  480. package/web/.next/server/app/apple-icon.png/route.js +8 -0
  481. package/web/.next/server/app/apple-icon.png/route.js.map +5 -0
  482. package/web/.next/server/app/apple-icon.png/route.js.nft.json +1 -0
  483. package/web/.next/server/app/apple-icon.png.body +0 -0
  484. package/web/.next/server/app/apple-icon.png.meta +1 -0
  485. package/web/.next/server/app/authorize/failed/page/server-reference-manifest.json +1 -1
  486. package/web/.next/server/app/authorize/failed/page.js +5 -5
  487. package/web/.next/server/app/authorize/failed/page.js.nft.json +1 -1
  488. package/web/.next/server/app/authorize/failed/page_client-reference-manifest.js +1 -1
  489. package/web/.next/server/app/authorize/pick/page/server-reference-manifest.json +1 -1
  490. package/web/.next/server/app/authorize/pick/page.js +4 -4
  491. package/web/.next/server/app/authorize/pick/page.js.nft.json +1 -1
  492. package/web/.next/server/app/authorize/pick/page_client-reference-manifest.js +1 -1
  493. package/web/.next/server/app/authorize/waiting/approval/page/server-reference-manifest.json +1 -1
  494. package/web/.next/server/app/authorize/waiting/approval/page.js +6 -6
  495. package/web/.next/server/app/authorize/waiting/approval/page.js.nft.json +1 -1
  496. package/web/.next/server/app/authorize/waiting/approval/page_client-reference-manifest.js +1 -1
  497. package/web/.next/server/app/icon.svg/route/app-paths-manifest.json +3 -0
  498. package/web/.next/server/app/icon.svg/route/build-manifest.json +12 -0
  499. package/web/.next/server/app/icon.svg/route.js +8 -0
  500. package/web/.next/server/app/icon.svg/route.js.map +5 -0
  501. package/web/.next/server/app/icon.svg/route.js.nft.json +1 -0
  502. package/web/.next/server/app/icon.svg.body +19 -0
  503. package/web/.next/server/app/icon.svg.meta +1 -0
  504. package/web/.next/server/app-paths-manifest.json +8 -1
  505. package/web/.next/server/chunks/[root-of-the-server]__1j0sdz18lzulo._.js +315 -0
  506. package/web/.next/server/chunks/[root-of-the-server]__1j0sdz18lzulo._.js.map +1 -0
  507. package/web/.next/server/chunks/[root-of-the-server]__1o2xxi_001xql._.js +315 -0
  508. package/web/.next/server/chunks/[root-of-the-server]__1o2xxi_001xql._.js.map +1 -0
  509. package/web/.next/server/chunks/[root-of-the-server]__1tfyrijwfgqlk._.js +3 -0
  510. package/web/.next/server/chunks/[root-of-the-server]__1tfyrijwfgqlk._.js.map +1 -0
  511. package/web/.next/server/chunks/_0_um96p6psnqx._.js +57 -0
  512. package/web/.next/server/chunks/_0_um96p6psnqx._.js.map +1 -0
  513. package/web/.next/server/chunks/_0xw0b7avhvg75._.js +3 -0
  514. package/web/.next/server/chunks/_0xw0b7avhvg75._.js.map +1 -0
  515. package/web/.next/server/chunks/_1w2t6c0hpdsrn._.js +3 -0
  516. package/web/.next/server/chunks/_1w2t6c0hpdsrn._.js.map +1 -0
  517. package/web/.next/server/chunks/_1xf83h9norhws._.js +57 -0
  518. package/web/.next/server/chunks/_1xf83h9norhws._.js.map +1 -0
  519. package/web/.next/server/chunks/_20ne4s-e_jzxp._.js +3 -0
  520. package/web/.next/server/chunks/_20ne4s-e_jzxp._.js.map +1 -0
  521. package/web/.next/server/chunks/node_modules_next_1zdbrneapig6o._.js +10 -0
  522. package/web/.next/server/chunks/node_modules_next_1zdbrneapig6o._.js.map +1 -0
  523. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js +1 -1
  524. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_change_page_actions_04td11fxohsfm.js.map +1 -1
  525. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js +1 -1
  526. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_page_actions_0u-45itza1ls7.js.map +1 -1
  527. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js +1 -1
  528. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_[name]_retire_page_actions_0s7ps6i0ts7v5.js.map +1 -1
  529. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js +1 -1
  530. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add-a2a-client_page_actions_0d_wgiu94c32e.js.map +1 -1
  531. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js +1 -1
  532. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_outside-parties_add_page_actions_0yfz_dfn-8uo7.js.map +1 -1
  533. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_overview_requests_[requestId]_page_actions_0uki9j3mtuz9e.js +1 -1
  534. package/web/.next/server/chunks/ssr/0vkm_server_app_(console)_overview_requests_[requestId]_page_actions_0uki9j3mtuz9e.js.map +1 -1
  535. package/web/.next/server/chunks/ssr/[root-of-the-server]__001xx3sm5ur-e._.js +4 -0
  536. package/web/.next/server/chunks/ssr/[root-of-the-server]__001xx3sm5ur-e._.js.map +1 -0
  537. package/web/.next/server/chunks/ssr/[root-of-the-server]__03w-pkh4_8jv_._.js +3 -0
  538. package/web/.next/server/chunks/ssr/[root-of-the-server]__03w-pkh4_8jv_._.js.map +1 -0
  539. package/web/.next/server/chunks/ssr/[root-of-the-server]__048-rfvdrnoze._.js +3 -0
  540. package/web/.next/server/chunks/ssr/[root-of-the-server]__048-rfvdrnoze._.js.map +1 -0
  541. package/web/.next/server/chunks/ssr/{[root-of-the-server]__14w0fxvc_of17._.js → [root-of-the-server]__07ba2bfe20c_p._.js} +2 -2
  542. package/web/.next/server/chunks/ssr/[root-of-the-server]__07ba2bfe20c_p._.js.map +1 -0
  543. package/web/.next/server/chunks/ssr/[root-of-the-server]__0a6a1yc_ac-qt._.js +4 -0
  544. package/web/.next/server/chunks/ssr/[root-of-the-server]__0a6a1yc_ac-qt._.js.map +1 -0
  545. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0-og0bl8lr2xq._.js → [root-of-the-server]__0a8db18tyk__5._.js} +2 -2
  546. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0-og0bl8lr2xq._.js.map → [root-of-the-server]__0a8db18tyk__5._.js.map} +1 -1
  547. package/web/.next/server/chunks/ssr/[root-of-the-server]__0f732g7ojc5-a._.js +3 -0
  548. package/web/.next/server/chunks/ssr/[root-of-the-server]__0f732g7ojc5-a._.js.map +1 -0
  549. package/web/.next/server/chunks/ssr/[root-of-the-server]__0fz0817_b9ljl._.js +3 -0
  550. package/web/.next/server/chunks/ssr/[root-of-the-server]__0fz0817_b9ljl._.js.map +1 -0
  551. package/web/.next/server/chunks/ssr/[root-of-the-server]__0i_m5r9lyffk8._.js +3 -0
  552. package/web/.next/server/chunks/ssr/[root-of-the-server]__0i_m5r9lyffk8._.js.map +1 -0
  553. package/web/.next/server/chunks/ssr/[root-of-the-server]__0icm7kndx480o._.js +4 -0
  554. package/web/.next/server/chunks/ssr/[root-of-the-server]__0icm7kndx480o._.js.map +1 -0
  555. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js +1 -1
  556. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k3g0p3t9t0c-._.js.map +1 -1
  557. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k6a9o0872_0x._.js +3 -0
  558. package/web/.next/server/chunks/ssr/[root-of-the-server]__0k6a9o0872_0x._.js.map +1 -0
  559. package/web/.next/server/chunks/ssr/[root-of-the-server]__0pj38h6qumggc._.js +3 -0
  560. package/web/.next/server/chunks/ssr/[root-of-the-server]__0pj38h6qumggc._.js.map +1 -0
  561. package/web/.next/server/chunks/ssr/{[root-of-the-server]__1gb-3dttuacyz._.js → [root-of-the-server]__0y0jwufd7xjsv._.js} +1 -1
  562. package/web/.next/server/chunks/ssr/[root-of-the-server]__10s9e8g5x-ws8._.js +4 -0
  563. package/web/.next/server/chunks/ssr/[root-of-the-server]__10s9e8g5x-ws8._.js.map +1 -0
  564. package/web/.next/server/chunks/ssr/[root-of-the-server]__13yoncr_nx3jc._.js +4 -0
  565. package/web/.next/server/chunks/ssr/[root-of-the-server]__13yoncr_nx3jc._.js.map +1 -0
  566. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js +1 -1
  567. package/web/.next/server/chunks/ssr/[root-of-the-server]__18-8taiduk1jn._.js.map +1 -1
  568. package/web/.next/server/chunks/ssr/{[root-of-the-server]__1m9atpy0vkbmj._.js → [root-of-the-server]__19ecatcacd6t9._.js} +1 -1
  569. package/web/.next/server/chunks/ssr/[root-of-the-server]__1aojrh3-9jh9r._.js +3 -0
  570. package/web/.next/server/chunks/ssr/[root-of-the-server]__1aojrh3-9jh9r._.js.map +1 -0
  571. package/web/.next/server/chunks/ssr/{[root-of-the-server]__1w5swo8gmjyx6._.js → [root-of-the-server]__1kynqd8xcwg2b._.js} +2 -2
  572. package/web/.next/server/chunks/ssr/[root-of-the-server]__1kynqd8xcwg2b._.js.map +1 -0
  573. package/web/.next/server/chunks/ssr/[root-of-the-server]__1nxy_j9eswr3i._.js +3 -0
  574. package/web/.next/server/chunks/ssr/[root-of-the-server]__1nxy_j9eswr3i._.js.map +1 -0
  575. package/web/.next/server/chunks/ssr/{[root-of-the-server]__160zc0ja_jjnu._.js → [root-of-the-server]__1q14l5_4hp9h3._.js} +2 -2
  576. package/web/.next/server/chunks/ssr/[root-of-the-server]__1q14l5_4hp9h3._.js.map +1 -0
  577. package/web/.next/server/chunks/ssr/[root-of-the-server]__1qnls-4cj-7oh._.js +3 -0
  578. package/web/.next/server/chunks/ssr/[root-of-the-server]__1qnls-4cj-7oh._.js.map +1 -0
  579. package/web/.next/server/chunks/ssr/[root-of-the-server]__1qpow96uit9t8._.js +4 -0
  580. package/web/.next/server/chunks/ssr/[root-of-the-server]__1qpow96uit9t8._.js.map +1 -0
  581. package/web/.next/server/chunks/ssr/[root-of-the-server]__1r1t1q3fzoqey._.js +3 -0
  582. package/web/.next/server/chunks/ssr/[root-of-the-server]__1r1t1q3fzoqey._.js.map +1 -0
  583. package/web/.next/server/chunks/ssr/[root-of-the-server]__1xmvo3lr1_qyo._.js +3 -0
  584. package/web/.next/server/chunks/ssr/[root-of-the-server]__1xmvo3lr1_qyo._.js.map +1 -0
  585. package/web/.next/server/chunks/ssr/[root-of-the-server]__1zlq3zji9v53h._.js +3 -0
  586. package/web/.next/server/chunks/ssr/[root-of-the-server]__1zlq3zji9v53h._.js.map +1 -0
  587. package/web/.next/server/chunks/ssr/_0-boiqan2j4tr._.js +3 -0
  588. package/web/.next/server/chunks/ssr/{_0w2ptjht34s6t._.js.map → _0-boiqan2j4tr._.js.map} +1 -1
  589. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js +1 -1
  590. package/web/.next/server/chunks/ssr/_00hfzlqn1og18._.js.map +1 -1
  591. package/web/.next/server/chunks/ssr/_03lk54yp-yhw3._.js +1 -1
  592. package/web/.next/server/chunks/ssr/_03lk54yp-yhw3._.js.map +1 -1
  593. package/web/.next/server/chunks/ssr/_0bizyb21i2sl8._.js +3 -0
  594. package/web/.next/server/chunks/ssr/{_00dg5cvqofspn._.js.map → _0bizyb21i2sl8._.js.map} +1 -1
  595. package/web/.next/server/chunks/ssr/_0eu-76mbv16oa._.js +3 -0
  596. package/web/.next/server/chunks/ssr/_0eu-76mbv16oa._.js.map +1 -0
  597. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js +1 -1
  598. package/web/.next/server/chunks/ssr/_0ka_9elusb800._.js.map +1 -1
  599. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js +1 -1
  600. package/web/.next/server/chunks/ssr/_0pyd1_y7w8ngp._.js.map +1 -1
  601. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js +1 -1
  602. package/web/.next/server/chunks/ssr/_0xickgbbju_9-._.js.map +1 -1
  603. package/web/.next/server/chunks/ssr/_1_wav28san6dm._.js +1 -1
  604. package/web/.next/server/chunks/ssr/_1cnvrfjlqx00k._.js +3 -0
  605. package/web/.next/server/chunks/ssr/_1cnvrfjlqx00k._.js.map +1 -0
  606. package/web/.next/server/chunks/ssr/{_0bhvvyz0q_0ja._.js → _1e2o809f0ekry._.js} +2 -2
  607. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js +1 -1
  608. package/web/.next/server/chunks/ssr/_1pjtire7rqla0._.js.map +1 -1
  609. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js +1 -1
  610. package/web/.next/server/chunks/ssr/_1qbsmlji34yph._.js.map +1 -1
  611. package/web/.next/server/chunks/ssr/_1yqu7dcxs2-so._.js +3 -0
  612. package/web/.next/server/chunks/ssr/_1yqu7dcxs2-so._.js.map +1 -0
  613. package/web/.next/server/chunks/ssr/node_modules_0ettht2so2tkh._.js +3 -0
  614. package/web/.next/server/chunks/ssr/node_modules_0ettht2so2tkh._.js.map +1 -0
  615. package/web/.next/server/chunks/ssr/node_modules_0keape0zsobyj._.js +3 -0
  616. package/web/.next/server/chunks/ssr/node_modules_0keape0zsobyj._.js.map +1 -0
  617. package/web/.next/server/chunks/ssr/node_modules_@base-ui_0jlwmxa9rk8p_._.js +3 -0
  618. package/web/.next/server/chunks/ssr/node_modules_@base-ui_0jlwmxa9rk8p_._.js.map +1 -0
  619. package/web/.next/server/chunks/ssr/node_modules_@base-ui_19e_nxxf4a88q._.js +3 -0
  620. package/web/.next/server/chunks/ssr/node_modules_@base-ui_19e_nxxf4a88q._.js.map +1 -0
  621. package/web/.next/server/chunks/ssr/node_modules_@base-ui_react_1lbvjrzg8s2ox._.js +3 -0
  622. package/web/.next/server/chunks/ssr/node_modules_@base-ui_react_1lbvjrzg8s2ox._.js.map +1 -0
  623. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_00i8qu9x65r6w.js +3 -0
  624. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_00i8qu9x65r6w.js.map +1 -0
  625. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_045k03anc7fhh.js +3 -0
  626. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_045k03anc7fhh.js.map +1 -0
  627. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0a3qpq0qt_bi4.js +3 -0
  628. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0a3qpq0qt_bi4.js.map +1 -0
  629. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0tpm7qi6un9x2.js +3 -0
  630. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0tpm7qi6un9x2.js.map +1 -0
  631. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0uyk6p-2ofqw3.js +3 -0
  632. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0uyk6p-2ofqw3.js.map +1 -0
  633. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0w8e__21f7qvg.js +3 -0
  634. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0w8e__21f7qvg.js.map +1 -0
  635. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ynno0usi0bwx.js +3 -0
  636. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ynno0usi0bwx.js.map +1 -0
  637. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0za9__u5ytp2s.js +3 -0
  638. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0za9__u5ytp2s.js.map +1 -0
  639. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0zyzdu1detzlm.js +3 -0
  640. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0zyzdu1detzlm.js.map +1 -0
  641. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_11t1sej48_ec4.js +3 -0
  642. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_11t1sej48_ec4.js.map +1 -0
  643. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_128zox167vtjm.js +3 -0
  644. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_128zox167vtjm.js.map +1 -0
  645. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_18uz1icr303zj.js +3 -0
  646. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_18uz1icr303zj.js.map +1 -0
  647. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19_qkbe8796m6.js +3 -0
  648. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19_qkbe8796m6.js.map +1 -0
  649. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19uoij8es9z19.js +3 -0
  650. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19uoij8es9z19.js.map +1 -0
  651. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1auju5fur8z6x.js +3 -0
  652. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1auju5fur8z6x.js.map +1 -0
  653. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1c7_m2ii9lash.js +3 -0
  654. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1c7_m2ii9lash.js.map +1 -0
  655. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1chb4qpzj_l1t.js +3 -0
  656. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1chb4qpzj_l1t.js.map +1 -0
  657. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qa52eylhjmki.js +3 -0
  658. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qa52eylhjmki.js.map +1 -0
  659. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qw59-auzd_zx.js +3 -0
  660. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qw59-auzd_zx.js.map +1 -0
  661. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1xzq9xckazj3u.js +3 -0
  662. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1xzq9xckazj3u.js.map +1 -0
  663. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1yis85alzg6hk.js +3 -0
  664. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1yis85alzg6hk.js.map +1 -0
  665. package/web/.next/server/chunks/ssr/web_00e7-_y92losl._.js +3 -0
  666. package/web/.next/server/chunks/ssr/web_00e7-_y92losl._.js.map +1 -0
  667. package/web/.next/server/chunks/ssr/web_09rcfto3dw4wd._.js +3 -0
  668. package/web/.next/server/chunks/ssr/web_09rcfto3dw4wd._.js.map +1 -0
  669. package/web/.next/server/chunks/ssr/web_0plvx3c_1cozb._.js +3 -0
  670. package/web/.next/server/chunks/ssr/web_0plvx3c_1cozb._.js.map +1 -0
  671. package/web/.next/server/chunks/ssr/web_0qgev3ti257yj._.js +3 -0
  672. package/web/.next/server/chunks/ssr/{web_0_jk9eione6lx._.js.map → web_0qgev3ti257yj._.js.map} +1 -1
  673. package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js +1 -1
  674. package/web/.next/server/chunks/ssr/web_0wys4l6za8umr._.js.map +1 -1
  675. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_overview_page_actions_18on1ziyg1nzy.js +1 -1
  676. package/web/.next/server/chunks/ssr/web__next-internal_server_app_(console)_overview_page_actions_18on1ziyg1nzy.js.map +1 -1
  677. package/web/.next/server/chunks/ssr/web_app_(console)_slack_page_tsx_0ts7fo7pqicq6._.js +3 -0
  678. package/web/.next/server/chunks/ssr/web_app_(console)_slack_page_tsx_0ts7fo7pqicq6._.js.map +1 -0
  679. package/web/.next/server/chunks/ssr/web_app_(console)_slack_remove_page_tsx_15q4ril_on0ed._.js +3 -0
  680. package/web/.next/server/chunks/ssr/web_app_(console)_slack_remove_page_tsx_15q4ril_on0ed._.js.map +1 -0
  681. package/web/.next/server/chunks/ssr/web_features_077oo3gzcibvf._.js +3 -0
  682. package/web/.next/server/chunks/ssr/web_features_077oo3gzcibvf._.js.map +1 -0
  683. package/web/.next/server/chunks/ssr/web_features_08yw0utky5j17._.js +3 -0
  684. package/web/.next/server/chunks/ssr/{web_features_19v3mlx8c_h1-._.js.map → web_features_08yw0utky5j17._.js.map} +1 -1
  685. package/web/.next/server/chunks/ssr/web_features_0d48z2epb6oie._.js +3 -0
  686. package/web/.next/server/chunks/ssr/web_features_0d48z2epb6oie._.js.map +1 -0
  687. package/web/.next/server/chunks/ssr/web_features_0f6r-m-dq36vf._.js +3 -0
  688. package/web/.next/server/chunks/ssr/web_features_0f6r-m-dq36vf._.js.map +1 -0
  689. package/web/.next/server/chunks/ssr/web_features_0mi9a9pdzkdji._.js +3 -0
  690. package/web/.next/server/chunks/ssr/web_features_0mi9a9pdzkdji._.js.map +1 -0
  691. package/web/.next/server/chunks/ssr/web_features_0rd6357w-eo50._.js +3 -0
  692. package/web/.next/server/chunks/ssr/web_features_0rd6357w-eo50._.js.map +1 -0
  693. package/web/.next/server/chunks/ssr/web_features_19r68thirqv1n._.js +3 -0
  694. package/web/.next/server/chunks/ssr/web_features_19r68thirqv1n._.js.map +1 -0
  695. package/web/.next/server/chunks/ssr/web_features_1m5g9a6mwrsd-._.js +3 -0
  696. package/web/.next/server/chunks/ssr/{web_features_085cv0gogrxxf._.js.map → web_features_1m5g9a6mwrsd-._.js.map} +1 -1
  697. package/web/.next/server/chunks/ssr/web_features_1utnezwv0xr-l._.js +3 -0
  698. package/web/.next/server/chunks/ssr/web_features_1utnezwv0xr-l._.js.map +1 -0
  699. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js +1 -1
  700. package/web/.next/server/chunks/ssr/web_features_add-a2a-agent_ui_a2a-agent-form_tsx_0z8t1aalwzyl7._.js.map +1 -1
  701. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js +1 -1
  702. package/web/.next/server/chunks/ssr/web_features_add-a2a-client_ui_a2a-client-form_tsx_1anv88g385nwe._.js.map +1 -1
  703. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js +1 -1
  704. package/web/.next/server/chunks/ssr/web_features_add-server_ui_add-server_tsx_1jnmar5xju49k._.js.map +1 -1
  705. package/web/.next/server/chunks/ssr/{web_features_forms_1d1jyea2jni9o._.js → web_features_forms_1muc8tmsxjj_k._.js} +2 -2
  706. package/web/.next/server/chunks/ssr/{web_features_forms_1d1jyea2jni9o._.js.map → web_features_forms_1muc8tmsxjj_k._.js.map} +1 -1
  707. package/web/.next/server/chunks/ssr/web_features_forms_ui_credential-fields_tsx_0l-w19zg-7x4b._.js +1 -1
  708. package/web/.next/server/chunks/ssr/web_features_forms_ui_credential-fields_tsx_0l-w19zg-7x4b._.js.map +1 -1
  709. package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js +1 -1
  710. package/web/.next/server/chunks/ssr/web_features_frame_ui_gateway-header_tsx_0e9tekx4jf7ng._.js.map +1 -1
  711. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js +1 -1
  712. package/web/.next/server/chunks/ssr/web_features_meeting_state_meeting-controls_tsx_12g4kzk2mbvvz._.js.map +1 -1
  713. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js +1 -1
  714. package/web/.next/server/chunks/ssr/web_features_outside-parties_ui_switch-card_tsx_1_xnu9bm4tc-_._.js.map +1 -1
  715. package/web/.next/server/chunks/ssr/web_features_outside-party_1-lre9nfakki7._.js +3 -0
  716. package/web/.next/server/chunks/ssr/web_features_outside-party_1-lre9nfakki7._.js.map +1 -0
  717. package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js +1 -1
  718. package/web/.next/server/chunks/ssr/web_features_outside-party_actions_ts_102ar5pdowf8s._.js.map +1 -1
  719. package/web/.next/server/chunks/ssr/web_features_overview_144fx4a-r9_wn._.js +3 -0
  720. package/web/.next/server/chunks/ssr/web_features_overview_144fx4a-r9_wn._.js.map +1 -0
  721. package/web/.next/server/chunks/ssr/web_features_overview_hooks_overview-actions_ts_0-wrat07d1y5g._.js +1 -1
  722. package/web/.next/server/chunks/ssr/web_features_overview_hooks_overview-actions_ts_0-wrat07d1y5g._.js.map +1 -1
  723. package/web/.next/server/chunks/ssr/web_features_overview_state_00l0wkgvv9y6j._.js +3 -0
  724. package/web/.next/server/chunks/ssr/web_features_overview_state_00l0wkgvv9y6j._.js.map +1 -0
  725. package/web/.next/server/chunks/ssr/web_features_overview_state_decision-panel_tsx_0kpd26ggtr6h_._.js +1 -1
  726. package/web/.next/server/chunks/ssr/web_features_overview_state_decision-panel_tsx_0kpd26ggtr6h_._.js.map +1 -1
  727. package/web/.next/server/chunks/ssr/web_features_parties_actions_ts_0r-tbfsig2ty-._.js +1 -1
  728. package/web/.next/server/chunks/ssr/web_features_slack_actions_ts_1l3yg9vl20_vu._.js +3 -0
  729. package/web/.next/server/chunks/ssr/web_features_slack_actions_ts_1l3yg9vl20_vu._.js.map +1 -0
  730. package/web/.next/server/chunks/web__next-internal_server_app_(console)_slack_link_route_actions_16zgisics858w.js +3 -0
  731. package/web/.next/server/chunks/web__next-internal_server_app_(console)_slack_link_route_actions_16zgisics858w.js.map +1 -0
  732. package/web/.next/server/chunks/web__next-internal_server_app_apple-icon_png_route_actions_1yyo-ix0n2rsy.js +3 -0
  733. package/web/.next/server/chunks/web__next-internal_server_app_apple-icon_png_route_actions_1yyo-ix0n2rsy.js.map +1 -0
  734. package/web/.next/server/chunks/web__next-internal_server_app_icon_svg_route_actions_0xhoz0ftyz5p3.js +3 -0
  735. package/web/.next/server/chunks/web__next-internal_server_app_icon_svg_route_actions_0xhoz0ftyz5p3.js.map +1 -0
  736. package/web/.next/server/middleware-build-manifest.js +51 -3
  737. package/web/.next/server/next-font-manifest.js +1 -1
  738. package/web/.next/server/next-font-manifest.json +16 -0
  739. package/web/.next/server/pages/500.html +1 -1
  740. package/web/.next/server/preview-props.json +3 -3
  741. package/web/.next/server/server-reference-manifest.js +1 -1
  742. package/web/.next/server/server-reference-manifest.json +264 -30
  743. package/web/.next/static/chunks/015ume9uk4hla.js +1 -0
  744. package/web/.next/static/chunks/0ji7rkz0ll9gh.js +1 -0
  745. package/web/.next/static/chunks/0nhopjmnw_dqt.js +1 -0
  746. package/web/.next/static/chunks/0psup8zn8e6k5.js +1 -0
  747. package/web/.next/static/chunks/0vlawcs6_kjs1.js +1 -0
  748. package/web/.next/static/chunks/0zbcy0_3jemrv.js +1 -0
  749. package/web/.next/static/chunks/1s8b8jpg4jai9.js +1 -0
  750. package/web/.next/static/chunks/20t1nmdiq805b.js +1 -0
  751. package/web/.next/static/chunks/26vlpatu47xtw.css +3 -0
  752. package/web/.next/static/chunks/2gghdkr64z9f9.js +1 -0
  753. package/web/.next/static/chunks/2s_dov6h7kus5.js +1 -0
  754. package/web/.next/static/chunks/{1jvae6c-4jwji.js → 2x86i673xcv4t.js} +1 -1
  755. package/web/.next/static/chunks/{1tgs1j0j-1qlh.js → 31-hltzmw_9fi.js} +1 -1
  756. package/web/.next/static/chunks/35bmc8wm29tr6.js +1 -0
  757. package/web/.next/static/chunks/3hvo3apdq-ckk.js +1 -0
  758. package/web/.next/static/chunks/3rxg2mdhxd6yt.js +1 -0
  759. package/web/.next/static/chunks/42cpzi5s1o44m.js +1 -0
  760. package/web/.next/static/media/apple-icon.3jccaq3p5-lh-.png +0 -0
  761. package/web/.next/static/media/icon.0h5hy2etdmq_n.svg +19 -0
  762. package/web/.next/trace +1 -1
  763. package/web/.next/trace-build +1 -1
  764. package/web/.next/types/routes.d.ts +7 -2
  765. package/web/.next/types/validator.ts +78 -0
  766. package/web/.next/server/chunks/[root-of-the-server]__0ykc8bq_c06a1._.js +0 -369
  767. package/web/.next/server/chunks/[root-of-the-server]__0ykc8bq_c06a1._.js.map +0 -1
  768. package/web/.next/server/chunks/ssr/[root-of-the-server]__00erqdm9cmhh7._.js +0 -3
  769. package/web/.next/server/chunks/ssr/[root-of-the-server]__00erqdm9cmhh7._.js.map +0 -1
  770. package/web/.next/server/chunks/ssr/[root-of-the-server]__00q22dte1g2ww._.js +0 -3
  771. package/web/.next/server/chunks/ssr/[root-of-the-server]__00q22dte1g2ww._.js.map +0 -1
  772. package/web/.next/server/chunks/ssr/[root-of-the-server]__07udzu2zwg_74._.js +0 -3
  773. package/web/.next/server/chunks/ssr/[root-of-the-server]__07udzu2zwg_74._.js.map +0 -1
  774. package/web/.next/server/chunks/ssr/[root-of-the-server]__0a68v9ynev4q6._.js +0 -3
  775. package/web/.next/server/chunks/ssr/[root-of-the-server]__0a68v9ynev4q6._.js.map +0 -1
  776. package/web/.next/server/chunks/ssr/[root-of-the-server]__0l2_dk9d4o01n._.js +0 -3
  777. package/web/.next/server/chunks/ssr/[root-of-the-server]__0l2_dk9d4o01n._.js.map +0 -1
  778. package/web/.next/server/chunks/ssr/[root-of-the-server]__0n2us07jk-78w._.js +0 -4
  779. package/web/.next/server/chunks/ssr/[root-of-the-server]__0n2us07jk-78w._.js.map +0 -1
  780. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rr5u24i9tjyc._.js +0 -3
  781. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rr5u24i9tjyc._.js.map +0 -1
  782. package/web/.next/server/chunks/ssr/[root-of-the-server]__1-c9wugbbwsp3._.js +0 -4
  783. package/web/.next/server/chunks/ssr/[root-of-the-server]__1-c9wugbbwsp3._.js.map +0 -1
  784. package/web/.next/server/chunks/ssr/[root-of-the-server]__10y66e1xx8xiq._.js +0 -3
  785. package/web/.next/server/chunks/ssr/[root-of-the-server]__10y66e1xx8xiq._.js.map +0 -1
  786. package/web/.next/server/chunks/ssr/[root-of-the-server]__14w0fxvc_of17._.js.map +0 -1
  787. package/web/.next/server/chunks/ssr/[root-of-the-server]__160zc0ja_jjnu._.js.map +0 -1
  788. package/web/.next/server/chunks/ssr/[root-of-the-server]__1dc6okf5os70a._.js +0 -3
  789. package/web/.next/server/chunks/ssr/[root-of-the-server]__1dc6okf5os70a._.js.map +0 -1
  790. package/web/.next/server/chunks/ssr/[root-of-the-server]__1dtyycvqa6uht._.js +0 -4
  791. package/web/.next/server/chunks/ssr/[root-of-the-server]__1dtyycvqa6uht._.js.map +0 -1
  792. package/web/.next/server/chunks/ssr/[root-of-the-server]__1n_sq_58wdluh._.js +0 -3
  793. package/web/.next/server/chunks/ssr/[root-of-the-server]__1n_sq_58wdluh._.js.map +0 -1
  794. package/web/.next/server/chunks/ssr/[root-of-the-server]__1w5swo8gmjyx6._.js.map +0 -1
  795. package/web/.next/server/chunks/ssr/_00dg5cvqofspn._.js +0 -3
  796. package/web/.next/server/chunks/ssr/_0_kakdt7lb6z-._.js +0 -3
  797. package/web/.next/server/chunks/ssr/_0_kakdt7lb6z-._.js.map +0 -1
  798. package/web/.next/server/chunks/ssr/_0w2ptjht34s6t._.js +0 -3
  799. package/web/.next/server/chunks/ssr/_1uuy6gkkhq6bx._.js +0 -3
  800. package/web/.next/server/chunks/ssr/_1uuy6gkkhq6bx._.js.map +0 -1
  801. package/web/.next/server/chunks/ssr/_1y1ovmdhl9_ml._.js +0 -3
  802. package/web/.next/server/chunks/ssr/_1y1ovmdhl9_ml._.js.map +0 -1
  803. package/web/.next/server/chunks/ssr/node_modules_07sxnbglqc5q9._.js +0 -3
  804. package/web/.next/server/chunks/ssr/node_modules_07sxnbglqc5q9._.js.map +0 -1
  805. package/web/.next/server/chunks/ssr/node_modules_0qlo87g8tugr4._.js +0 -3
  806. package/web/.next/server/chunks/ssr/node_modules_0qlo87g8tugr4._.js.map +0 -1
  807. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_06etuymo2azrg.js +0 -3
  808. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_06etuymo2azrg.js.map +0 -1
  809. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08lcy-jnk5o43.js +0 -3
  810. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08lcy-jnk5o43.js.map +0 -1
  811. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0bnypafopxsfl.js +0 -3
  812. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0bnypafopxsfl.js.map +0 -1
  813. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0e8cobt3o_8ur.js +0 -3
  814. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0e8cobt3o_8ur.js.map +0 -1
  815. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0gzed-epom5si.js +0 -3
  816. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0gzed-epom5si.js.map +0 -1
  817. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0k0-b63ptvbl5.js +0 -3
  818. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0k0-b63ptvbl5.js.map +0 -1
  819. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0pik0g65vv-wi.js +0 -3
  820. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0pik0g65vv-wi.js.map +0 -1
  821. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0xccr6d8xcb1p.js +0 -3
  822. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0xccr6d8xcb1p.js.map +0 -1
  823. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_13agc620bnznv.js +0 -3
  824. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_13agc620bnznv.js.map +0 -1
  825. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_184-gj4lz41i-.js +0 -3
  826. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_184-gj4lz41i-.js.map +0 -1
  827. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_18gq8l27vkevg.js +0 -3
  828. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_18gq8l27vkevg.js.map +0 -1
  829. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1bt2ioufqh6fl.js +0 -3
  830. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1bt2ioufqh6fl.js.map +0 -1
  831. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1d613l6zsee_e.js +0 -3
  832. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1d613l6zsee_e.js.map +0 -1
  833. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1o0-ipfysjmro.js +0 -3
  834. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1o0-ipfysjmro.js.map +0 -1
  835. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1s46s8vlfx01v.js +0 -3
  836. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1s46s8vlfx01v.js.map +0 -1
  837. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1x-0vplt44lez.js +0 -3
  838. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1x-0vplt44lez.js.map +0 -1
  839. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_20d8hq6wsqwh_.js +0 -3
  840. package/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_20d8hq6wsqwh_.js.map +0 -1
  841. package/web/.next/server/chunks/ssr/web_0-ufi2al5ubig._.js +0 -3
  842. package/web/.next/server/chunks/ssr/web_0-ufi2al5ubig._.js.map +0 -1
  843. package/web/.next/server/chunks/ssr/web_0_jk9eione6lx._.js +0 -3
  844. package/web/.next/server/chunks/ssr/web_1wcpaty_bz55q._.js +0 -3
  845. package/web/.next/server/chunks/ssr/web_1wcpaty_bz55q._.js.map +0 -1
  846. package/web/.next/server/chunks/ssr/web_features_085cv0gogrxxf._.js +0 -3
  847. package/web/.next/server/chunks/ssr/web_features_0xbnkk4hfgr9v._.js +0 -3
  848. package/web/.next/server/chunks/ssr/web_features_0xbnkk4hfgr9v._.js.map +0 -1
  849. package/web/.next/server/chunks/ssr/web_features_0xnlgtw8bfqaa._.js +0 -3
  850. package/web/.next/server/chunks/ssr/web_features_0xnlgtw8bfqaa._.js.map +0 -1
  851. package/web/.next/server/chunks/ssr/web_features_10xz3ojtvfi7h._.js +0 -3
  852. package/web/.next/server/chunks/ssr/web_features_10xz3ojtvfi7h._.js.map +0 -1
  853. package/web/.next/server/chunks/ssr/web_features_19v3mlx8c_h1-._.js +0 -3
  854. package/web/.next/server/chunks/ssr/web_features_1_2m6l73qk7qw._.js +0 -3
  855. package/web/.next/server/chunks/ssr/web_features_1_2m6l73qk7qw._.js.map +0 -1
  856. package/web/.next/server/chunks/ssr/web_features_forms_1u0akr22eh_x_._.js +0 -3
  857. package/web/.next/server/chunks/ssr/web_features_forms_1u0akr22eh_x_._.js.map +0 -1
  858. package/web/.next/server/chunks/ssr/web_features_outside-party_0_9c27knfvw7u._.js +0 -3
  859. package/web/.next/server/chunks/ssr/web_features_outside-party_0_9c27knfvw7u._.js.map +0 -1
  860. package/web/.next/server/chunks/ssr/web_features_overview_state_1wuk95dw2_whp._.js +0 -3
  861. package/web/.next/server/chunks/ssr/web_features_overview_state_1wuk95dw2_whp._.js.map +0 -1
  862. package/web/.next/static/chunks/0ke_2_la1glwa.js +0 -1
  863. package/web/.next/static/chunks/0ul9rtulfiph6.js +0 -1
  864. package/web/.next/static/chunks/19wvmglfgof0u.js +0 -1
  865. package/web/.next/static/chunks/1yj875esaesyh.css +0 -3
  866. package/web/.next/static/chunks/2d283cu3en9cy.js +0 -1
  867. package/web/.next/static/chunks/2hj3-kl1ggnu_.js +0 -1
  868. package/web/.next/static/chunks/2i3ydqqupow_x.js +0 -1
  869. package/web/.next/static/chunks/2n4bf_2r9lysd.js +0 -1
  870. package/web/.next/static/chunks/2ngyis59r3qta.js +0 -1
  871. package/web/.next/static/chunks/2riya89_i0je8.js +0 -1
  872. package/web/.next/static/chunks/3_pwm8b3mf4mf.js +0 -1
  873. package/web/.next/static/chunks/3bl-e3zhidrrz.js +0 -1
  874. package/web/.next/static/chunks/3x_8doukmdfpu.js +0 -1
  875. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__1gb-3dttuacyz._.js.map → [root-of-the-server]__0y0jwufd7xjsv._.js.map} +0 -0
  876. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__1m9atpy0vkbmj._.js.map → [root-of-the-server]__19ecatcacd6t9._.js.map} +0 -0
  877. /package/web/.next/server/chunks/ssr/{_0bhvvyz0q_0ja._.js.map → _1e2o809f0ekry._.js.map} +0 -0
  878. /package/web/.next/static/{tQFXrUWi6vEZq4Cp-U5tk → yf1Q3fTAV4eQiroxoYbih}/_buildManifest.js +0 -0
  879. /package/web/.next/static/{tQFXrUWi6vEZq4Cp-U5tk → yf1Q3fTAV4eQiroxoYbih}/_clientMiddlewareManifest.js +0 -0
  880. /package/web/.next/static/{tQFXrUWi6vEZq4Cp-U5tk → yf1Q3fTAV4eQiroxoYbih}/_ssgManifest.js +0 -0
@@ -0,0 +1,59 @@
1
+ import { ANSWER_CONTENT_TYPE, questionSchema } from '@aeolus-fleet/common';
2
+ import { err, ok } from '../shared/result.js';
3
+ import { isSignedBy } from './slack-request.js';
4
+ import { STORED_REACTION } from './send-slack-events.js';
5
+ /** The question's id in a delivery's payload; none when it is no question. */
6
+ function questionIdOf(payload) {
7
+ try {
8
+ const parsed = JSON.parse(payload);
9
+ return questionSchema.safeParse(parsed).data?.id;
10
+ }
11
+ catch {
12
+ return undefined;
13
+ }
14
+ }
15
+ /**
16
+ * Use case: the person presses an option's button under a question the
17
+ * gateway posted to them in Slack (gateway scopes 9.5 step 2). Signed as an
18
+ * event is, by the person the question was posted to, the press sends the
19
+ * answer as their person ship, to the question's sender in reply to it,
20
+ * keyed as an answer on the gateway's page is; then the delivery is handled
21
+ * and the question reacted to, as a message core stored is. Core's refusal
22
+ * is said in the question's thread. The press names the question's fleet
23
+ * message, as its button carries it, so a press that comes before the
24
+ * gateway kept the post's Slack message is answered too; the delivery not
25
+ * acknowledged yet, the press, the person's own act, acknowledges it.
26
+ */
27
+ export function createAnswerInSlack(deps) {
28
+ return async ({ appId, teamId, userId, channel, messageTs, messageId, option, body, timestamp, signature }) => {
29
+ const app = await deps.apps.findByAppId(appId);
30
+ if (!isSignedBy(app, { request: { body, timestamp, signature }, signatures: deps.signatures, clock: deps.clock })) {
31
+ return err({ kind: 'notSigned' });
32
+ }
33
+ const link = await deps.links.find(app.fleetId, { teamId, userId });
34
+ const kept = link?.stoppedAt === null ? await deps.posts.ofMessage(app.fleetId, { personShipId: link.personShipId, messageId }) : undefined;
35
+ const post = kept?.appId === appId && kept.channel === channel ? kept : undefined;
36
+ const crew = post === undefined ? undefined : await deps.crews.find(app.fleetId, post.personShipId);
37
+ if (post === undefined || post.deliveryId === null || post.senderShipId === null || crew === undefined || app.bot === null) {
38
+ return ok({ kind: 'ignored' });
39
+ }
40
+ if (post.ackedAt === null) {
41
+ // Core reads a delivery again only once acknowledged; a refusal leaves it unread, and the press ignored.
42
+ await deps.door.ack(crew.crewToken, post.deliveryId);
43
+ }
44
+ const delivery = await deps.door.delivery(crew.crewToken, post.deliveryId);
45
+ const questionId = delivery.isOk ? questionIdOf(delivery.value.payload) : undefined;
46
+ if (!delivery.isOk || questionId === undefined) {
47
+ return ok({ kind: 'ignored' });
48
+ }
49
+ const replied = await deps.door.reply(crew.crewToken, { to: post.senderShipId, inReplyTo: post.messageId, contentType: ANSWER_CONTENT_TYPE, payload: JSON.stringify({ questionId, option }), idempotencyKey: `answer-${post.deliveryId}` });
50
+ if (!replied.isOk) {
51
+ await deps.slack.postInThread(app.bot.token, { channel, threadTs: messageTs, text: `${delivery.value.senderName} did not take your answer: ${replied.error.message}` });
52
+ return ok({ kind: 'refused' });
53
+ }
54
+ await deps.door.handled(crew.crewToken, post.deliveryId);
55
+ await deps.slack.react(app.bot.token, { channel, ts: messageTs, name: STORED_REACTION });
56
+ return ok({ kind: 'answered' });
57
+ };
58
+ }
59
+ //# sourceMappingURL=answer-in-slack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answer-in-slack.js","sourceRoot":"","sources":["../../../src/core/slack/answer-in-slack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAkB,MAAM,sBAAsB,CAAC;AAI3F,OAAO,EAAE,GAAG,EAAE,EAAE,EAAe,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAsB,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD,8EAA8E;AAC9E,SAAS,YAAY,CAAC,OAAe;IACnC,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC5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AE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,cAAc,EAAE,UAAU,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC5O,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,UAAU,8BAA8B,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACxK,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QACjC,CAAC;QACD,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACzD,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;QACzF,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IAClC,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { FleetId } from '@aeolus-fleet/common';
2
+ import type { Clock } from '../shared/clock.js';
3
+ import { type DomainError } from '../shared/errors.js';
4
+ import { type Result } from '../shared/result.js';
5
+ import type { InstallStates, SlackApps, SlackTooling, SlackWorkspaces } from './ports.js';
6
+ export type CompleteInstallRefusal = DomainError<'INSTALL_REFUSED' | 'SLACK_NOT_CONNECTED' | 'OTHER_WORKSPACE' | 'SLACK_UNAVAILABLE'>;
7
+ export type CompleteInstall = (input: {
8
+ code: string;
9
+ state: string;
10
+ }) => Promise<Result<{
11
+ fleetId: FleetId;
12
+ }, CompleteInstallRefusal>>;
13
+ /**
14
+ * Use case: Slack's install screen sends the person back with a code and
15
+ * the state the gateway sealed (gateway scopes 9.1). Within its ten minutes,
16
+ * the code is turned into the app's bot token, kept in the vault, and the
17
+ * workspace's name kept as Slack says it. An install into another workspace
18
+ * than the fleet's keeps nothing.
19
+ */
20
+ export declare function createCompleteInstall(deps: {
21
+ slack: Pick<SlackTooling, 'completeInstall'>;
22
+ apps: Pick<SlackApps, 'find' | 'save'>;
23
+ workspaces: Pick<SlackWorkspaces, 'find' | 'change'>;
24
+ states: InstallStates;
25
+ clock: Clock;
26
+ installRedirectUrl: string;
27
+ }): CompleteInstall;
@@ -0,0 +1,36 @@
1
+ import { refuse } from '../shared/errors.js';
2
+ import { ok } from '../shared/result.js';
3
+ import { slackUnavailableMessage } from './take-access-token.js';
4
+ /**
5
+ * Use case: Slack's install screen sends the person back with a code and
6
+ * the state the gateway sealed (gateway scopes 9.1). Within its ten minutes,
7
+ * the code is turned into the app's bot token, kept in the vault, and the
8
+ * workspace's name kept as Slack says it. An install into another workspace
9
+ * than the fleet's keeps nothing.
10
+ */
11
+ export function createCompleteInstall(deps) {
12
+ return async ({ code, state }) => {
13
+ const opened = deps.states.open(state);
14
+ const app = opened !== undefined && opened.expiresAt > deps.clock.now() ? await deps.apps.find(opened.fleetId, opened.appId) : undefined;
15
+ if (opened === undefined || app === undefined) {
16
+ return refuse('INSTALL_REFUSED', 'This install did not start at the gateway, or took longer than ten minutes: press Install again');
17
+ }
18
+ const workspace = await deps.workspaces.find(opened.fleetId);
19
+ if (workspace === undefined) {
20
+ return refuse('SLACK_NOT_CONNECTED', 'The fleet is connected to no Slack workspace');
21
+ }
22
+ const installed = await deps.slack.completeInstall({ clientId: app.clientId, clientSecret: app.clientSecret, code, redirectUrl: deps.installRedirectUrl });
23
+ if (!installed.isOk) {
24
+ return installed.error.kind === 'refused' ? refuse('INSTALL_REFUSED', `Slack refused the install (${installed.error.error}): press Install again`) : refuse('SLACK_UNAVAILABLE', slackUnavailableMessage(installed.error));
25
+ }
26
+ const { teamId, teamName, botToken, botUserId } = installed.value;
27
+ if (teamId !== workspace.teamId) {
28
+ return refuse('OTHER_WORKSPACE', `The fleet is connected to ${workspace.teamName ?? workspace.teamId}: install into that workspace`);
29
+ }
30
+ await deps.apps.save({ ...app, bot: { token: botToken, userId: botUserId }, installStartedAt: null, removedInSlackAt: null });
31
+ // Held, so a configuration token rotated meanwhile is kept.
32
+ await deps.workspaces.change(opened.fleetId, (current) => Promise.resolve({ ...current, teamName }));
33
+ return ok({ fleetId: opened.fleetId });
34
+ };
35
+ }
36
+ //# sourceMappingURL=complete-install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"complete-install.js","sourceRoot":"","sources":["../../../src/core/slack/complete-install.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAe,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAMjE;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAOrC;IACC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,GAAG,GAAG,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACzI,IAAI,MAAM,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YAC9C,OAAO,MAAM,CAAC,iBAAiB,EAAE,i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AAC,CAAC;QAC9H,4DAA4D;QAC5D,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;QACrG,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { FleetId } from '@aeolus-fleet/common';
2
+ import type { AccountOfSignIn } from '../account-sign-in/account-of-sign-in.js';
3
+ import type { Clock } from '../shared/clock.js';
4
+ import { type DomainError } from '../shared/errors.js';
5
+ import { type Result } from '../shared/result.js';
6
+ import type { LinkStates, ShipNames, SlackApps, SlackLinks, SlackSignIn, SlackWorkspaces } from './ports.js';
7
+ /** Why no link was kept; a link refused for one kept already names the fleet, and the first link's account or Slack name. */
8
+ export type CompleteLinkRefusal = DomainError<'LINK_REFUSED' | 'SLACK_NOT_CONNECTED' | 'NO_SUCH_BOT' | 'OTHER_WORKSPACE' | 'SLACK_UNAVAILABLE'> | (DomainError<'SLACK_USER_LINKED' | 'ACCOUNT_LINKED'> & {
9
+ readonly fleetId: FleetId;
10
+ readonly name: string;
11
+ });
12
+ export type CompleteLink = (input: {
13
+ code: string;
14
+ state: string;
15
+ signIn: string | undefined;
16
+ }) => Promise<Result<{
17
+ fleetId: FleetId;
18
+ }, CompleteLinkRefusal>>;
19
+ /**
20
+ * Use case: Sign in with Slack sends the person back with a code and the
21
+ * link's state the gateway sealed (gateway scopes 9.3). Within its ten
22
+ * minutes, the code names the Slack workspace and user, and the link is kept
23
+ * by fleet, workspace and user, and person ship. One Slack user links to one
24
+ * account per fleet: a second link is refused, naming the first. An account
25
+ * keeps one link, so linking another Slack user waits until it is unlinked.
26
+ * The same user linking the same account again links it anew, as after a
27
+ * disabled account's link stopped. The link completes only in a browser
28
+ * whose shared sign-in names the account that started it, so a followed
29
+ * link never attaches the follower's Slack user to the starter's account.
30
+ */
31
+ export declare function createCompleteLink(deps: {
32
+ workspaces: Pick<SlackWorkspaces, 'find'>;
33
+ apps: Pick<SlackApps, 'gatewayBot'>;
34
+ links: SlackLinks;
35
+ signIn: Pick<SlackSignIn, 'complete'>;
36
+ states: LinkStates;
37
+ accountOf: (asked: Parameters<AccountOfSignIn>[0]) => ReturnType<AccountOfSignIn>;
38
+ shipNames: ShipNames;
39
+ clock: Clock;
40
+ linkRedirectUrl: string;
41
+ }): CompleteLink;
@@ -0,0 +1,64 @@
1
+ import { refuse } from '../shared/errors.js';
2
+ import { err, ok } from '../shared/result.js';
3
+ import { slackUnavailableMessage } from './take-access-token.js';
4
+ /**
5
+ * Use case: Sign in with Slack sends the person back with a code and the
6
+ * link's state the gateway sealed (gateway scopes 9.3). Within its ten
7
+ * minutes, the code names the Slack workspace and user, and the link is kept
8
+ * by fleet, workspace and user, and person ship. One Slack user links to one
9
+ * account per fleet: a second link is refused, naming the first. An account
10
+ * keeps one link, so linking another Slack user waits until it is unlinked.
11
+ * The same user linking the same account again links it anew, as after a
12
+ * disabled account's link stopped. The link completes only in a browser
13
+ * whose shared sign-in names the account that started it, so a followed
14
+ * link never attaches the follower's Slack user to the starter's account.
15
+ */
16
+ export function createCompleteLink(deps) {
17
+ return async ({ code, state, signIn }) => {
18
+ const now = deps.clock.now();
19
+ const opened = deps.states.open(state);
20
+ if (opened === undefined || opened.expiresAt <= now) {
21
+ return refuse('LINK_REFUSED', 'This link did not start at the gateway, or took longer than ten minutes: press Link Slack again');
22
+ }
23
+ const { fleetId, accountId, personShipId } = opened;
24
+ const signedIn = signIn === undefined ? undefined : await deps.accountOf({ signIn, fleetId });
25
+ if (signedIn === undefined || !signedIn.isOk || signedIn.value.accountId !== accountId) {
26
+ return refuse('LINK_REFUSED', 'This link was started by another account or browser: sign in and press Link Slack again');
27
+ }
28
+ const workspace = await deps.workspaces.find(fleetId);
29
+ if (workspace === undefined) {
30
+ return refuse('SLACK_NOT_CONNECTED', 'The fleet is connected to no Slack workspace');
31
+ }
32
+ const bot = await deps.apps.gatewayBot(fleetId);
33
+ if (bot === undefined) {
34
+ return refuse('NO_SUCH_BOT', "The fleet's own Slack bot is not made");
35
+ }
36
+ const slackSignIn = await deps.signIn.complete({ clientId: bot.clientId, clientSecret: bot.clientSecret, code, redirectUrl: deps.linkRedirectUrl });
37
+ if (!slackSignIn.isOk) {
38
+ return slackSignIn.error.kind === 'refused' ? refuse('LINK_REFUSED', `Slack refused the sign-in (${slackSignIn.error.error}): press Link Slack again`) : refuse('SLACK_UNAVAILABLE', slackUnavailableMessage(slackSignIn.error));
39
+ }
40
+ const { teamId, userId, name } = slackSignIn.value;
41
+ if (teamId !== workspace.teamId) {
42
+ return refuse('OTHER_WORKSPACE', `The fleet is connected to ${workspace.teamName ?? workspace.teamId}: sign in with Slack there`);
43
+ }
44
+ const first = await deps.links.find(fleetId, { teamId, userId });
45
+ if (first !== undefined && first.accountId !== accountId) {
46
+ const firstName = (await deps.shipNames.nameOf(fleetId, first.personShipId)) ?? 'another account';
47
+ return err({ kind: 'SLACK_USER_LINKED', message: `This Slack account is linked to ${firstName} in this fleet already`, fleetId, name: firstName });
48
+ }
49
+ const own = await deps.links.ofAccount(fleetId, accountId);
50
+ if (own !== undefined && own.slackUserId !== userId) {
51
+ return err({ kind: 'ACCOUNT_LINKED', message: `Your account is linked to Slack as @${own.slackName} already: unlink it on the Overview first`, fleetId, name: own.slackName });
52
+ }
53
+ if (own !== undefined) {
54
+ await deps.links.remove(fleetId, accountId);
55
+ }
56
+ const added = await deps.links.add({ fleetId, teamId, slackUserId: userId, slackName: name, accountId, personShipId, linkedAt: now, stoppedAt: null, isShowingAll: false });
57
+ if (added === 'taken') {
58
+ // Another link of the Slack user or the account was kept meanwhile.
59
+ return refuse('LINK_REFUSED', 'This Slack account or your account was linked meanwhile: reload the Overview');
60
+ }
61
+ return ok({ fleetId });
62
+ };
63
+ }
64
+ //# sourceMappingURL=complete-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"complete-link.js","sourceRoot":"","sources":["../../../src/core/slack/complete-link.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,EAAE,EAAe,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AASjE;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAUlC;IACC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;QACvC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvC,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,IAAI,GAAG,EAAE,CAAC;YACpD,OAAO,MAAM,CAAC,cAAc,EAAE,iGAAiG,CAAC,CAAC;QACnI,CAAC;QACD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QACpD,MAAM,QAAQ,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9F,IAAI,QAAQ,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YACvF,OAAO,MAAM,CAAC,cAAc,EAAE,yFAAyF,CAAC,CAAC;QAC3H,CAAC;QACD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,O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O,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IACzB,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { Actor } from '../actors/authenticate-actor.js';
2
+ import type { Clock } from '../shared/clock.js';
3
+ import { type DomainError } from '../shared/errors.js';
4
+ import { type Result } from '../shared/result.js';
5
+ import type { ShipNames, SlackApps, SlackTooling, SlackWorkspaces } from './ports.js';
6
+ import type { SlackAddresses } from './slack-app.js';
7
+ /** The scope that connects Slack and exposes ships as bots (gateway scopes B6). */
8
+ export declare const SLACK_SCOPE = "gateway:slack";
9
+ export type ConnectSlackRefusal = DomainError<'SLACK_SCOPE_NOT_HELD' | 'NOT_AN_ACCOUNT' | 'ALREADY_CONNECTED' | 'SLACK_TOKEN_REFUSED' | 'SLACK_UNAVAILABLE' | 'OTHER_WORKSPACE'>;
10
+ export type ConnectSlack = (input: {
11
+ actor: Actor;
12
+ refreshToken: string;
13
+ fleetName: string;
14
+ }) => Promise<Result<{
15
+ isGatewayBotMade: boolean;
16
+ }, ConnectSlackRefusal>>;
17
+ /**
18
+ * Use case: an actor holding gateway:slack connects the fleet to one Slack
19
+ * workspace by pasting an app configuration refresh token (gateway scopes
20
+ * 9.1), signed in with their account: the token is a Slack user's own.
21
+ * The token is rotated at once, which proves it and names the workspace,
22
+ * and the new pair kept. Then the gateway makes its own bot (B5); when Slack
23
+ * does not make it now, the fleet stays connected and Install makes it.
24
+ * After Slack refused the kept token, a new token of the same workspace
25
+ * connects again, keeping every app made.
26
+ */
27
+ export declare function createConnectSlack(deps: {
28
+ slack: Pick<SlackTooling, 'rotateConfigurationToken' | 'makeApp'>;
29
+ workspaces: Pick<SlackWorkspaces, 'find' | 'save'>;
30
+ apps: Pick<SlackApps, 'gatewayBot' | 'save'>;
31
+ shipNames: ShipNames;
32
+ clock: Clock;
33
+ addresses: SlackAddresses;
34
+ }): ConnectSlack;
@@ -0,0 +1,54 @@
1
+ import { refuse } from '../shared/errors.js';
2
+ import { ok } from '../shared/result.js';
3
+ import { gatewayBotOf } from './gateway-bot.js';
4
+ import { slackUnavailableMessage } from './take-access-token.js';
5
+ /** The scope that connects Slack and exposes ships as bots (gateway scopes B6). */
6
+ export const SLACK_SCOPE = 'gateway:slack';
7
+ /**
8
+ * Use case: an actor holding gateway:slack connects the fleet to one Slack
9
+ * workspace by pasting an app configuration refresh token (gateway scopes
10
+ * 9.1), signed in with their account: the token is a Slack user's own.
11
+ * The token is rotated at once, which proves it and names the workspace,
12
+ * and the new pair kept. Then the gateway makes its own bot (B5); when Slack
13
+ * does not make it now, the fleet stays connected and Install makes it.
14
+ * After Slack refused the kept token, a new token of the same workspace
15
+ * connects again, keeping every app made.
16
+ */
17
+ export function createConnectSlack(deps) {
18
+ return async ({ actor, refreshToken, fleetName }) => {
19
+ if (!actor.scopes.includes(SLACK_SCOPE)) {
20
+ return refuse('SLACK_SCOPE_NOT_HELD', `Connecting Slack needs ${SLACK_SCOPE}`);
21
+ }
22
+ if (actor.kind !== 'account' || actor.personShipId === null) {
23
+ return refuse('NOT_AN_ACCOUNT', "Connect Slack on the gateway's pages, signed in with your account: a configuration token is a Slack user's own");
24
+ }
25
+ const kept = await deps.workspaces.find(actor.fleetId);
26
+ if (kept !== undefined && !kept.isTokenRefused) {
27
+ return refuse('ALREADY_CONNECTED', 'The fleet is connected to a Slack workspace already');
28
+ }
29
+ const rotated = await deps.slack.rotateConfigurationToken(refreshToken);
30
+ if (!rotated.isOk) {
31
+ return rotated.error.kind === 'refused'
32
+ ? refuse('SLACK_TOKEN_REFUSED', `Slack refused the configuration token (${rotated.error.error}): copy a new one from your Slack app management page`)
33
+ : refuse('SLACK_UNAVAILABLE', slackUnavailableMessage(rotated.error));
34
+ }
35
+ const { token, teamId } = rotated.value;
36
+ if (kept !== undefined && kept.teamId !== teamId) {
37
+ return refuse('OTHER_WORKSPACE', `The fleet is connected to ${kept.teamName ?? kept.teamId}: connect with a configuration token of that workspace`);
38
+ }
39
+ const now = deps.clock.now();
40
+ const name = (await deps.shipNames.nameOf(actor.fleetId, actor.personShipId)) ?? actor.personShipId;
41
+ await deps.workspaces.save({
42
+ fleetId: actor.fleetId,
43
+ teamId,
44
+ teamName: kept?.teamName ?? null,
45
+ connectedBy: { shipId: actor.personShipId, name },
46
+ connectedAt: now,
47
+ token,
48
+ isTokenRefused: false,
49
+ });
50
+ const bot = await gatewayBotOf(deps, { fleetId: actor.fleetId, fleetName, accessToken: token.accessToken });
51
+ return ok({ isGatewayBotMade: bot.isOk });
52
+ };
53
+ }
54
+ //# sourceMappingURL=connect-slack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connect-slack.js","sourceRoot":"","sources":["../../../src/core/slack/connect-slack.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAe,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,mFAAmF;AACnF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAM3C;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAOlC;IACC,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE;QAClD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACxC,OAAO,MAAM,CAAC,sBAAsB,EAAE,0BAA0B,WAAW,EAAE,CAAC,CAAC;QACjF,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;YAC5D,OAAO,MAAM,CAAC,gBAAgB,EAAE,gHAAgH,CAAC,CAAC;QACpJ,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,U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AAI;YAChC,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE;YACjD,WAAW,EAAE,GAAG;YAChB,KAAK;YACL,cAAc,EAAE,KAAK;SACtB,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;QAC5G,OAAO,EAAE,CAAC,EAAE,gBAAgB,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAC5C,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Actor } from '../actors/authenticate-actor.js';
2
+ import { type DomainError } from '../shared/errors.js';
3
+ import { type Result } from '../shared/result.js';
4
+ import type { SlackApps, SlackTooling, SlackWorkspaces } from './ports.js';
5
+ import { type TakeAccessToken } from './take-access-token.js';
6
+ export type DisconnectSlack = (input: {
7
+ actor: Actor;
8
+ }) => Promise<Result<undefined, DomainError<'SLACK_SCOPE_NOT_HELD' | 'SLACK_NOT_CONNECTED' | 'SLACK_TOKEN_REFUSED' | 'SLACK_UNAVAILABLE'>>>;
9
+ /**
10
+ * Use case: an actor holding gateway:slack disconnects the fleet's
11
+ * workspace (gateway scopes 9.1, after the page's confirm): every bot the
12
+ * gateway made is removed in Slack, then the workspace and its apps are
13
+ * forgotten. An app Slack refuses to remove is one it no longer knows. When
14
+ * Slack does not answer, everything is kept, to disconnect again.
15
+ */
16
+ export declare function createDisconnectSlack(deps: {
17
+ slack: Pick<SlackTooling, 'removeApp'>;
18
+ workspaces: Pick<SlackWorkspaces, 'remove'>;
19
+ apps: Pick<SlackApps, 'all'>;
20
+ takeAccessToken: TakeAccessToken;
21
+ }): DisconnectSlack;
@@ -0,0 +1,31 @@
1
+ import { refuse } from '../shared/errors.js';
2
+ import { ok } from '../shared/result.js';
3
+ import { SLACK_SCOPE } from './connect-slack.js';
4
+ import { slackUnavailableMessage } from './take-access-token.js';
5
+ /**
6
+ * Use case: an actor holding gateway:slack disconnects the fleet's
7
+ * workspace (gateway scopes 9.1, after the page's confirm): every bot the
8
+ * gateway made is removed in Slack, then the workspace and its apps are
9
+ * forgotten. An app Slack refuses to remove is one it no longer knows. When
10
+ * Slack does not answer, everything is kept, to disconnect again.
11
+ */
12
+ export function createDisconnectSlack(deps) {
13
+ return async ({ actor }) => {
14
+ if (!actor.scopes.includes(SLACK_SCOPE)) {
15
+ return refuse('SLACK_SCOPE_NOT_HELD', `Disconnecting Slack needs ${SLACK_SCOPE}`);
16
+ }
17
+ const accessToken = await deps.takeAccessToken(actor.fleetId);
18
+ if (!accessToken.isOk) {
19
+ return accessToken;
20
+ }
21
+ for (const app of await deps.apps.all(actor.fleetId)) {
22
+ const removed = await deps.slack.removeApp(accessToken.value, app.appId);
23
+ if (!removed.isOk && removed.error.kind !== 'refused') {
24
+ return refuse('SLACK_UNAVAILABLE', slackUnavailableMessage(removed.error));
25
+ }
26
+ }
27
+ await deps.workspaces.remove(actor.fleetId);
28
+ return ok(undefined);
29
+ };
30
+ }
31
+ //# sourceMappingURL=disconnect-slack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disconnect-slack.js","sourceRoot":"","sources":["../../../src/core/slack/disconnect-slack.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAe,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,uBAAuB,EAAwB,MAAM,wBAAwB,CAAC;AAIvF;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAA6J;IACjM,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QACzB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACxC,OAAO,MAAM,CAAC,sBAAsB,EAAE,6BAA6B,WAAW,EAAE,CAAC,CAAC;QACpF,CAAC;QACD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;YACtB,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,KAAK,MAAM,GAAG,IAAI,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YACrD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;YACzE,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBACtD,OAAO,MAAM,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;YAC7E,CAAC;QACH,CAAC;QACD,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { ShipId } from '@aeolus-fleet/common';
2
+ import type { Actor } from '../actors/authenticate-actor.js';
3
+ import type { ActorCredential, CredentialOf } from '../actors/credential-of.js';
4
+ import type { Clock } from '../shared/clock.js';
5
+ import { type DomainError } from '../shared/errors.js';
6
+ import { type Result } from '../shared/result.js';
7
+ import type { ProxyShipKinds, SlackApps, SlackShips, SlackTooling } from './ports.js';
8
+ import { type SlackAddresses } from './slack-app.js';
9
+ import { type TakeAccessToken } from './take-access-token.js';
10
+ export type ExposeShipRefusal = DomainError<'SLACK_SCOPE_NOT_HELD' | 'SLACK_NOT_CONNECTED' | 'SLACK_TOKEN_REFUSED' | 'SLACK_UNAVAILABLE' | 'CONFLICT' | 'NOT_EXPOSABLE' | 'NOT_REACHABLE' | 'FLEET_UNAVAILABLE'>;
11
+ export type ExposeShip = (input: {
12
+ actor: Actor;
13
+ as: ActorCredential;
14
+ shipId: ShipId;
15
+ }) => Promise<Result<{
16
+ appId: string;
17
+ }, ExposeShipRefusal>>;
18
+ /**
19
+ * Use case: an actor holding gateway:slack, within manage reach of the ship
20
+ * (B6), exposes it as a Slack bot (gateway scopes 9.2): an agent ship or an
21
+ * outside A2A agent's proxy ship, which take a message and answer (P-B3).
22
+ * The gateway makes the ship's app from a manifest, named after the ship,
23
+ * its statement's summary as the description, and keeps it by the ship's
24
+ * id, never its name (L20). Install follows.
25
+ */
26
+ export declare function createExposeShip(deps: {
27
+ slack: Pick<SlackTooling, 'makeApp'>;
28
+ apps: Pick<SlackApps, 'ofShip' | 'save'>;
29
+ ships: SlackShips;
30
+ proxyShips: ProxyShipKinds;
31
+ takeAccessToken: TakeAccessToken;
32
+ credentialOf: CredentialOf;
33
+ clock: Clock;
34
+ addresses: SlackAddresses;
35
+ }): ExposeShip;
@@ -0,0 +1,59 @@
1
+ import { refuse } from '../shared/errors.js';
2
+ import { ok } from '../shared/result.js';
3
+ import { SLACK_SCOPE } from './connect-slack.js';
4
+ import { shipBotDescription } from './slack-app.js';
5
+ import { slackUnavailableMessage } from './take-access-token.js';
6
+ /**
7
+ * Use case: an actor holding gateway:slack, within manage reach of the ship
8
+ * (B6), exposes it as a Slack bot (gateway scopes 9.2): an agent ship or an
9
+ * outside A2A agent's proxy ship, which take a message and answer (P-B3).
10
+ * The gateway makes the ship's app from a manifest, named after the ship,
11
+ * its statement's summary as the description, and keeps it by the ship's
12
+ * id, never its name (L20). Install follows.
13
+ */
14
+ export function createExposeShip(deps) {
15
+ return async ({ actor, as, shipId }) => {
16
+ if (!actor.scopes.includes(SLACK_SCOPE)) {
17
+ return refuse('SLACK_SCOPE_NOT_HELD', `Exposing a ship as a Slack bot needs ${SLACK_SCOPE}`);
18
+ }
19
+ const { fleetId } = actor;
20
+ const ship = await deps.ships.read(fleetId, shipId);
21
+ if (!ship.isOk) {
22
+ return ship.error.code === 'UNAVAILABLE' ? refuse('FLEET_UNAVAILABLE', `The fleet did not answer: ${ship.error.message}`) : refuse('NOT_EXPOSABLE', `The fleet has no ship ${shipId}`);
23
+ }
24
+ const { name } = ship.value;
25
+ if ((await deps.apps.ofShip(fleetId, shipId)) !== undefined) {
26
+ return refuse('CONFLICT', `${name} is a Slack bot already`);
27
+ }
28
+ if (ship.value.status === 'retired') {
29
+ return refuse('NOT_EXPOSABLE', `${name} was retired`);
30
+ }
31
+ const proxyKind = await deps.proxyShips.kindOf(fleetId, shipId);
32
+ if (proxyKind === 'mcpServer') {
33
+ return refuse('NOT_EXPOSABLE', `${name} is an outside MCP server's proxy ship: it takes tool calls, not a person's words. Expose an agent ship that uses its tools`);
34
+ }
35
+ if (ship.value.kind !== 'agent' && proxyKind !== 'a2aAgent') {
36
+ return refuse('NOT_EXPOSABLE', `${name} is no agent ship nor an outside A2A agent's proxy ship`);
37
+ }
38
+ const credential = await deps.credentialOf(actor, as);
39
+ if (!credential.isOk) {
40
+ return credential;
41
+ }
42
+ const managed = await deps.ships.checkManage(credential.value, shipId);
43
+ if (!managed.isOk) {
44
+ return managed.error.code === 'UNAVAILABLE' ? refuse('FLEET_UNAVAILABLE', `The fleet did not say whether you manage ${name}: ${managed.error.message}`) : refuse('NOT_REACHABLE', managed.error.message);
45
+ }
46
+ const accessToken = await deps.takeAccessToken(fleetId);
47
+ if (!accessToken.isOk) {
48
+ return accessToken;
49
+ }
50
+ const description = shipBotDescription(ship.value, deps.addresses);
51
+ const made = await deps.slack.makeApp(accessToken.value, description);
52
+ if (!made.isOk) {
53
+ return refuse('SLACK_UNAVAILABLE', made.error.kind === 'refused' ? `Slack did not make ${name}'s bot (${made.error.error})` : slackUnavailableMessage(made.error));
54
+ }
55
+ await deps.apps.save({ fleetId, shipId, ...made.value, name: description.name, madeAt: deps.clock.now(), installStartedAt: null, bot: null, removedInSlackAt: null });
56
+ return ok({ appId: made.value.appId });
57
+ };
58
+ }
59
+ //# sourceMappingURL=expose-ship.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expose-ship.js","sourceRoot":"","sources":["../../../src/core/slack/expose-ship.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAe,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAuB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAwB,MAAM,wBAAwB,CAAC;AAQvF;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAShC;IACC,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QACrC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACxC,OAAO,MAAM,CAAC,sBAAsB,EAAE,wCAAwC,WAAW,EAAE,CAAC,CAAC;QAC/F,CAAC;QACD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;QAC1B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,EAAE,6BAA6B,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,yBAAyB,MAAM,EAAE,CAAC,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SlackApps, SlackShips, SlackTooling, SlackWorkspaces } from './ports.js';
2
+ import { type SlackAddresses } from './slack-app.js';
3
+ import type { TakeAccessToken } from './take-access-token.js';
4
+ export type FollowExposedShips = () => Promise<void>;
5
+ /**
6
+ * Use case: one pass of the gateway reading each exposed ship by its id
7
+ * (gateway scopes 9.2, L20), in every fleet whose configuration token Slack
8
+ * has not refused. A renamed ship's bot is given its whole manifest anew,
9
+ * the new name kept once Slack took it; a retired ship's bot is deleted in
10
+ * Slack and forgotten. What the fleet or Slack does not answer now is
11
+ * followed at the next pass.
12
+ */
13
+ export declare function createFollowExposedShips(deps: {
14
+ workspaces: Pick<SlackWorkspaces, 'rotatable'>;
15
+ apps: Pick<SlackApps, 'all' | 'save' | 'remove'>;
16
+ ships: Pick<SlackShips, 'read'>;
17
+ slack: Pick<SlackTooling, 'renameApp' | 'removeApp'>;
18
+ takeAccessToken: TakeAccessToken;
19
+ addresses: SlackAddresses;
20
+ }): FollowExposedShips;
@@ -0,0 +1,43 @@
1
+ import { shipBotDescription } from './slack-app.js';
2
+ /**
3
+ * Use case: one pass of the gateway reading each exposed ship by its id
4
+ * (gateway scopes 9.2, L20), in every fleet whose configuration token Slack
5
+ * has not refused. A renamed ship's bot is given its whole manifest anew,
6
+ * the new name kept once Slack took it; a retired ship's bot is deleted in
7
+ * Slack and forgotten. What the fleet or Slack does not answer now is
8
+ * followed at the next pass.
9
+ */
10
+ export function createFollowExposedShips(deps) {
11
+ return async () => {
12
+ for (const fleetId of await deps.workspaces.rotatable()) {
13
+ for (const app of await deps.apps.all(fleetId)) {
14
+ if (app.shipId === null) {
15
+ continue;
16
+ }
17
+ const ship = await deps.ships.read(fleetId, app.shipId);
18
+ if (!ship.isOk) {
19
+ continue;
20
+ }
21
+ const description = shipBotDescription(ship.value, deps.addresses);
22
+ const isRetired = ship.value.status === 'retired';
23
+ if (!isRetired && description.name === app.name) {
24
+ continue;
25
+ }
26
+ const accessToken = await deps.takeAccessToken(fleetId);
27
+ if (!accessToken.isOk) {
28
+ break;
29
+ }
30
+ if (isRetired) {
31
+ const removed = await deps.slack.removeApp(accessToken.value, app.appId);
32
+ if (removed.isOk || removed.error.kind === 'refused') {
33
+ await deps.apps.remove(fleetId, app.appId);
34
+ }
35
+ }
36
+ else if ((await deps.slack.renameApp(accessToken.value, { appId: app.appId, description })).isOk) {
37
+ await deps.apps.save({ ...app, name: description.name });
38
+ }
39
+ }
40
+ }
41
+ };
42
+ }
43
+ //# sourceMappingURL=follow-exposed-ships.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"follow-exposed-ships.js","sourceRoot":"","sources":["../../../src/core/slack/follow-exposed-ships.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAuB,MAAM,gBAAgB,CAAC;AAKzE;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAOxC;IACC,OAAO,KAAK,IAAI,EAAE;QAChB,KAAK,MAAM,OAAO,IAAI,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC;YACxD,KAAK,MAAM,GAAG,IAAI,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC/C,IAAI,GAAG,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;oBACxB,SAAS;gBACX,CAAC;gBACD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;gBACxD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;oBACf,SAAS;gBACX,CAAC;gBACD,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;gBACnE,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC;gBAClD,IAAI,CAAC,SAAS,IAAI,WAAW,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC;oBAChD,SAAS;gBACX,CAAC;gBACD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;gBACxD,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;oBACtB,MAAM;gBACR,CAAC;gBACD,IAAI,SAAS,EAAE,CAAC;oBACd,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;oBACzE,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;wBACrD,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;oBAC7C,CAAC;gBACH,CAAC;qBAAM,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;oBACnG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { FleetId } from '@aeolus-fleet/common';
2
+ import type { Clock } from '../shared/clock.js';
3
+ import { type Result } from '../shared/result.js';
4
+ import type { SlackApps, SlackRefusal, SlackTooling } from './ports.js';
5
+ import { type SlackAddresses, type SlackApp } from './slack-app.js';
6
+ /**
7
+ * The fleet's own bot (B5): the one kept, or made now from its manifest and
8
+ * kept, with the configuration access token given. Slack's refusal is
9
+ * answered as is, and nothing is kept.
10
+ */
11
+ export declare function gatewayBotOf(deps: {
12
+ slack: Pick<SlackTooling, 'makeApp'>;
13
+ apps: Pick<SlackApps, 'gatewayBot' | 'save'>;
14
+ clock: Clock;
15
+ addresses: SlackAddresses;
16
+ }, made: {
17
+ fleetId: FleetId;
18
+ fleetName: string;
19
+ accessToken: string;
20
+ }): Promise<Result<SlackApp, SlackRefusal>>;