@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,14 @@
1
+ /**
2
+ * Use case: one pass of the gateway keeping each fleet's configuration
3
+ * token alive (gateway scopes 9.1): every token Slack has not refused is
4
+ * taken, which rotates it within its last hour. Run often enough that no
5
+ * token's 12 hours end between two passes.
6
+ */
7
+ export function createRotateConfigurationTokens(deps) {
8
+ return async () => {
9
+ for (const fleetId of await deps.workspaces.rotatable()) {
10
+ await deps.takeAccessToken(fleetId);
11
+ }
12
+ };
13
+ }
14
+ //# sourceMappingURL=rotate-configuration-tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rotate-configuration-tokens.js","sourceRoot":"","sources":["../../../src/core/slack/rotate-configuration-tokens.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,UAAU,+BAA+B,CAAC,IAA0F;IACxI,OAAO,KAAK,IAAI,EAAE;QAChB,KAAK,MAAM,OAAO,IAAI,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC;YACxD,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { CallSender } from '../mcp-in/ports.js';
2
+ import type { PersonCrews, PersonShipDoor } from '../people/ports.js';
3
+ import type { Clock } from '../shared/clock.js';
4
+ import type { SlackApps, SlackEvents, SlackMessages, SlackPosts } from './ports.js';
5
+ /** The reaction that tells the person their message reached the fleet. */
6
+ export declare const STORED_REACTION = "white_check_mark";
7
+ export declare const NOT_REACHED_TEXT = "This message did not reach the fleet; send it again";
8
+ export type SendSlackEvents = () => Promise<void>;
9
+ /**
10
+ * Use case: a round of the gateway's sends from Slack into the fleet
11
+ * (gateway scopes 9.4 steps 5 to 7, P-B2). Each kept event goes as the
12
+ * person ship, which the gateway crews, to the bot's ship by its id, as
13
+ * Markdown, keyed by Slack's event id so a send tried again is the same
14
+ * send. One in a thread kept unmatched is matched to the delivery the
15
+ * thread is under now: it waits while a delivery in that conversation is
16
+ * not yet in Slack, and through the gateway's own bot, answering none, it
17
+ * is not sent. Core stored it: the gateway reacts to the person's Slack message.
18
+ * Core refused it: the reason goes in its thread. Core did not answer: it
19
+ * goes again next round. Nothing builds up: a taken event's id goes an
20
+ * hour after core took it, and an event core has not taken in 24 hours
21
+ * goes, the person told in its thread.
22
+ */
23
+ export declare function createSendSlackEvents(deps: {
24
+ events: SlackEvents;
25
+ apps: Pick<SlackApps, 'findByAppId'>;
26
+ crews: Pick<PersonCrews, 'find'>;
27
+ sender: Pick<CallSender, 'send'>;
28
+ door: Pick<PersonShipDoor, 'ack' | 'handled'>;
29
+ posts: Pick<SlackPosts, 'save' | 'lastInThread' | 'unfinished'>;
30
+ slack: Pick<SlackMessages, 'postInThread' | 'react'>;
31
+ clock: Clock;
32
+ }): SendSlackEvents;
@@ -0,0 +1,106 @@
1
+ import { TAKEN_KEPT_MS, UNTAKEN_KEPT_MS } from './kept-slack-event.js';
2
+ import { isAwaitingSlackIn } from './slack-post.js';
3
+ /** How many kept events a round sends at most. */
4
+ const ROUND_LIMIT = 50;
5
+ /** The reaction that tells the person their message reached the fleet. */
6
+ export const STORED_REACTION = 'white_check_mark';
7
+ /** The fleet's codes for a send it did not answer, or could not start: nothing was stored, so the same send goes again. */
8
+ const NOT_ANSWERED = new Set(['UNAVAILABLE', 'SERVICE_UNAVAILABLE', 'INTERNAL_SERVER_ERROR', 'TIMEOUT']);
9
+ /** The fleet's codes for a crew token that no longer works: the person ship is crewed again at their next visit, and the send goes then. */
10
+ const ENDED_CREW = new Set(['LEASE_ENDED', 'UNAUTHORIZED']);
11
+ export const NOT_REACHED_TEXT = 'This message did not reach the fleet; send it again';
12
+ /** What the person reads in the thread when core refused their message, plainly. */
13
+ function refusalText(ship, refusal) {
14
+ switch (refusal.code) {
15
+ case 'NOT_REACHABLE':
16
+ return `You may not message ${ship}`;
17
+ case 'UNRESOLVABLE_SELECTOR':
18
+ return `${ship} was retired`;
19
+ default:
20
+ return `${ship} did not take your message: ${refusal.message}`;
21
+ }
22
+ }
23
+ /**
24
+ * Use case: a round of the gateway's sends from Slack into the fleet
25
+ * (gateway scopes 9.4 steps 5 to 7, P-B2). Each kept event goes as the
26
+ * person ship, which the gateway crews, to the bot's ship by its id, as
27
+ * Markdown, keyed by Slack's event id so a send tried again is the same
28
+ * send. One in a thread kept unmatched is matched to the delivery the
29
+ * thread is under now: it waits while a delivery in that conversation is
30
+ * not yet in Slack, and through the gateway's own bot, answering none, it
31
+ * is not sent. Core stored it: the gateway reacts to the person's Slack message.
32
+ * Core refused it: the reason goes in its thread. Core did not answer: it
33
+ * goes again next round. Nothing builds up: a taken event's id goes an
34
+ * hour after core took it, and an event core has not taken in 24 hours
35
+ * goes, the person told in its thread.
36
+ */
37
+ export function createSendSlackEvents(deps) {
38
+ /** The event as it goes now: one in a thread kept unmatched answers the delivery the thread is under, if any; none while it may still be under one not yet in Slack. */
39
+ const matched = async (event) => {
40
+ const { fleetId, personShipId, appId, channel, threadTs } = event;
41
+ if (threadTs === null || event.inReplyTo !== null) {
42
+ return event;
43
+ }
44
+ // Awaiting is read before the thread: a post Slack answers between the two reads is then found in the thread, never missed by both.
45
+ const isAwaiting = (await deps.posts.unfinished(fleetId, personShipId)).some((post) => isAwaitingSlackIn(post, { appId, channel }));
46
+ const answered = await deps.posts.lastInThread(fleetId, { personShipId, appId, channel, threadTs });
47
+ if (answered !== undefined) {
48
+ return { ...event, shipId: answered.senderShipId ?? event.shipId, inReplyTo: answered.messageId, deliveryId: answered.deliveryId };
49
+ }
50
+ return isAwaiting ? undefined : event;
51
+ };
52
+ const send = async (kept) => {
53
+ const app = await deps.apps.findByAppId(kept.appId);
54
+ const crew = await deps.crews.find(kept.fleetId, kept.personShipId);
55
+ if (app === undefined || app.bot === null || crew === undefined) {
56
+ // No bot to answer with, or no crew to send as: the event waits, and goes after 24 hours told as not reached.
57
+ return 'later';
58
+ }
59
+ const event = await matched(kept);
60
+ if (event === undefined) {
61
+ return 'later';
62
+ }
63
+ if (event.shipId === null) {
64
+ // Through the gateway's own bot only an answer goes, as a message there that answers none is not kept.
65
+ return 'taken';
66
+ }
67
+ const where = { channel: event.channel, threadTs: event.threadTs ?? event.ts };
68
+ const message = { to: event.shipId, contentType: 'text/markdown', payload: event.markdown, idempotencyKey: `slack:${event.eventId}` };
69
+ const sent = await deps.sender.send(crew.crewToken, event.inReplyTo === null ? message : { ...message, inReplyTo: event.inReplyTo });
70
+ if (sent.isOk) {
71
+ const { fleetId, personShipId, appId, channel, ts, threadTs } = event;
72
+ await deps.posts.save({ fleetId, personShipId, messageId: sent.value.messageId, deliveryId: null, senderShipId: null, appId, channel, ts, threadTs, isLinkOnly: false, ackedAt: null });
73
+ if (event.deliveryId !== null) {
74
+ // Answered before the gateway acknowledged it, the person's answer acknowledges it, as core takes handled only then.
75
+ // A refusal leaves the delivery acknowledged, as an answer on the gateway's page does when handled is refused.
76
+ await deps.door.ack(crew.crewToken, event.deliveryId);
77
+ await deps.door.handled(crew.crewToken, event.deliveryId);
78
+ }
79
+ // Without the reaction the person sees no sign and sends again: the event goes again, the same send by its key.
80
+ const reacted = await deps.slack.react(app.bot.token, { channel, ts, name: STORED_REACTION });
81
+ return reacted.isOk ? 'taken' : 'later';
82
+ }
83
+ if (NOT_ANSWERED.has(sent.error.code) || ENDED_CREW.has(sent.error.code)) {
84
+ return 'later';
85
+ }
86
+ // A refusal is dropped only once the person was told it.
87
+ const told = await deps.slack.postInThread(app.bot.token, { ...where, text: refusalText(app.name, sent.error) });
88
+ return told.isOk ? 'taken' : 'later';
89
+ };
90
+ const tellNotReached = async (event) => {
91
+ const app = await deps.apps.findByAppId(event.appId);
92
+ if (app !== undefined && app.bot !== null) {
93
+ await deps.slack.postInThread(app.bot.token, { channel: event.channel, threadTs: event.threadTs ?? event.ts, text: NOT_REACHED_TEXT });
94
+ }
95
+ await deps.events.remove(event.fleetId, event.eventId);
96
+ };
97
+ return async () => {
98
+ const now = deps.clock.now();
99
+ await deps.events.forgetTaken(new Date(now.getTime() - TAKEN_KEPT_MS));
100
+ for (const event of await deps.events.untakenSince(new Date(now.getTime() - UNTAKEN_KEPT_MS))) {
101
+ await tellNotReached(event);
102
+ }
103
+ await deps.events.sendDue(send, { limit: ROUND_LIMIT, at: now });
104
+ };
105
+ }
106
+ //# sourceMappingURL=send-slack-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-slack-events.js","sourceRoot":"","sources":["../../../src/core/slack/send-slack-events.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAuB,MAAM,uBAAuB,CAAC;AAE5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,kDAAkD;AAClD,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB,0EAA0E;AAC1E,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAElD,2HAA2H;AAC3H,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,SAAS,CAAC,CAAC,CAAC;AAEzG,4IAA4I;AAC5I,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,qDAAqD,CAAC;AAItF,oFAAoF;AACpF,SAAS,WAAW,CAAC,IAAY,EAAE,OAA0C;IAC3E,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,eAAe;YAClB,OAAO,uBAAuB,IAAI,EAAE,CAAC;QACvC,KAAK,uBAAuB;YAC1B,OAAO,GAAG,IAAI,cAAc,CAAC;QAC/B;YACE,OAAO,GAAG,IAAI,+BAA+B,OAAO,CAAC,OAAO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,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACnE,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { Actor } from '../actors/authenticate-actor.js';
2
+ import type { ActorCredential, CredentialOf } from '../actors/credential-of.js';
3
+ import { type DomainError } from '../shared/errors.js';
4
+ import { type Result } from '../shared/result.js';
5
+ import type { SlackApps, SlackShips } from './ports.js';
6
+ import type { SlackApp } from './slack-app.js';
7
+ export type ShipBotRefusal = DomainError<'NO_SUCH_BOT' | 'NOT_REACHABLE' | 'FLEET_UNAVAILABLE'>;
8
+ /**
9
+ * A ship's bot in the actor's fleet, once the fleet, asked as the actor,
10
+ * answers that the actor manages the ship (B6). The gateway's own bot is no
11
+ * ship's.
12
+ */
13
+ export declare function managedShipBot(deps: {
14
+ apps: Pick<SlackApps, 'find'>;
15
+ ships: Pick<SlackShips, 'read' | 'checkManage'>;
16
+ credentialOf: CredentialOf;
17
+ }, asked: {
18
+ actor: Actor;
19
+ as: ActorCredential;
20
+ appId: string;
21
+ }): Promise<Result<SlackApp & {
22
+ shipName: string;
23
+ }, ShipBotRefusal>>;
@@ -0,0 +1,25 @@
1
+ import { refuse } from '../shared/errors.js';
2
+ import { ok } from '../shared/result.js';
3
+ /**
4
+ * A ship's bot in the actor's fleet, once the fleet, asked as the actor,
5
+ * answers that the actor manages the ship (B6). The gateway's own bot is no
6
+ * ship's.
7
+ */
8
+ export async function managedShipBot(deps, asked) {
9
+ const app = await deps.apps.find(asked.actor.fleetId, asked.appId);
10
+ if (app?.shipId === undefined || app.shipId === null) {
11
+ return refuse('NO_SUCH_BOT', `The gateway made no ship's bot ${asked.appId} in this fleet`);
12
+ }
13
+ const ship = await deps.ships.read(app.fleetId, app.shipId);
14
+ const shipName = ship.isOk ? ship.value.name : app.name;
15
+ const credential = await deps.credentialOf(asked.actor, asked.as);
16
+ if (!credential.isOk) {
17
+ return credential;
18
+ }
19
+ const managed = await deps.ships.checkManage(credential.value, app.shipId);
20
+ if (!managed.isOk) {
21
+ return managed.error.code === 'UNAVAILABLE' ? refuse('FLEET_UNAVAILABLE', `The fleet did not say whether you manage ${shipName}: ${managed.error.message}`) : refuse('NOT_REACHABLE', managed.error.message);
22
+ }
23
+ return ok({ ...app, shipName });
24
+ }
25
+ //# sourceMappingURL=ship-bot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ship-bot.js","sourceRoot":"","sources":["../../../src/core/slack/ship-bot.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAe,MAAM,qBAAqB,CAAC;AAMtD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,IAAoH,EACpH,KAA2D;IAE3D,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACnE,IAAI,GAAG,EAAE,MAAM,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QACrD,OAAO,MAAM,CAAC,aAAa,EAAE,kCAAkC,KAAK,CAAC,KAAK,gBAAgB,CAAC,CAAC;IAC9F,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;IACxD,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IAClE,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACrB,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3E,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAClB,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,EAAE,4CAA4C,QAAQ,KAAK,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC/M,CAAC;IACD,OAAO,EAAE,CAAC,EAAE,GAAG,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,16 @@
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 { SlackLinks } from './ports.js';
5
+ export type ShowAllInSlack = (input: {
6
+ actor: Actor;
7
+ isOn: boolean;
8
+ }) => Promise<Result<undefined, DomainError<'NOT_LINKED'>>>;
9
+ /**
10
+ * Use case: the person turns Show everything that waits in Slack on or off
11
+ * (gateway scopes 9.6, B5): with it on, messages from ships that are not
12
+ * bots show through the gateway's own bot too. Off until turned on (W8).
13
+ */
14
+ export declare function createShowAllInSlack(deps: {
15
+ links: Pick<SlackLinks, 'ofAccount' | 'showAll'>;
16
+ }): ShowAllInSlack;
@@ -0,0 +1,18 @@
1
+ import { refuse } from '../shared/errors.js';
2
+ import { ok } from '../shared/result.js';
3
+ /**
4
+ * Use case: the person turns Show everything that waits in Slack on or off
5
+ * (gateway scopes 9.6, B5): with it on, messages from ships that are not
6
+ * bots show through the gateway's own bot too. Off until turned on (W8).
7
+ */
8
+ export function createShowAllInSlack(deps) {
9
+ return async ({ actor, isOn }) => {
10
+ const link = actor.kind === 'account' ? await deps.links.ofAccount(actor.fleetId, actor.accountId) : undefined;
11
+ if (link === undefined) {
12
+ return refuse('NOT_LINKED', 'Link your Slack account first');
13
+ }
14
+ await deps.links.showAll(link.fleetId, { accountId: link.accountId, isOn });
15
+ return ok(undefined);
16
+ };
17
+ }
18
+ //# sourceMappingURL=show-all-in-slack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show-all-in-slack.js","sourceRoot":"","sources":["../../../src/core/slack/show-all-in-slack.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAe,MAAM,qBAAqB,CAAC;AAKtD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAA0D;IAC7F,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;QAC/B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC/G,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,MAAM,CAAC,YAAY,EAAE,+BAA+B,CAAC,CAAC;QAC/D,CAAC;QACD,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5E,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { FleetId } from '@aeolus-fleet/common';
2
+ import type { FleetRefusal } from '../connection/ports.js';
3
+ import type { Sleep } from '../mcp-out/run-party.js';
4
+ import type { PersonShip, PersonShipDoor, PushedPersonDelivery, ShownThere } from '../people/ports.js';
5
+ import type { Clock } from '../shared/clock.js';
6
+ import { type Result } from '../shared/result.js';
7
+ import type { SlackApps, SlackLinks, SlackMessages, SlackPosts } from './ports.js';
8
+ export type ShowInSlack = (ship: PersonShip, wake: {
9
+ crewToken: string;
10
+ fresh: readonly PushedPersonDelivery[];
11
+ }) => Promise<Result<ShownThere, FleetRefusal>>;
12
+ /**
13
+ * Use case: shows what waits for a linked person's person ship in Slack
14
+ * (gateway scopes 9.5), as the gateway wakes them. A reply to a message
15
+ * from Slack goes into that conversation or thread; a bot ship's message
16
+ * into that bot's direct messages with the person (P-B1); anything else
17
+ * through the gateway's own bot, headed by the sender, once the person
18
+ * turned Slack on (B5). A bot removed in Slack falls back to the gateway's
19
+ * bot, with Slack on. Each delivery is kept as a post, handed with channel
20
+ * slack, posted, given its Slack message, then acknowledged (B4); a link for
21
+ * what Slack does not show in full is handed only, as a wake. Slack rate
22
+ * limited: the post waits Retry-After and goes again with the same hand-over.
23
+ * Slack refused the post: nothing is kept, and web push and email wake as
24
+ * before. A post the gateway did not finish (it stopped, or core refused
25
+ * the acknowledgement) is finished first, at every wake, never posted twice
26
+ * once in Slack. It answers the deliveries Slack showed, which no other
27
+ * channel wakes for, and whether a post is left unfinished.
28
+ */
29
+ export declare function createShowInSlack(deps: {
30
+ links: Pick<SlackLinks, 'ofPersonShip'>;
31
+ apps: Pick<SlackApps, 'find' | 'ofShip' | 'gatewayBot'>;
32
+ posts: SlackPosts;
33
+ slack: Pick<SlackMessages, 'post'>;
34
+ door: Pick<PersonShipDoor, 'pushReceive' | 'handed' | 'ack'>;
35
+ sleep: Sleep;
36
+ clock: Clock;
37
+ overviewUrlOf: (fleetId: FleetId) => string;
38
+ }): ShowInSlack;
@@ -0,0 +1,154 @@
1
+ import { ok } from '../shared/result.js';
2
+ import { slackPostOf } from './slack-post-of.js';
3
+ /** How often a post Slack rate limits is asked again within one wake. */
4
+ const RATE_LIMITED_TRIES = 3;
5
+ const SECOND_MS = 1000;
6
+ /** The number a delivery is handed with: the first hand-over, made again with the same number counts nothing (0040). */
7
+ const FIRST_HAND_OVER = 1;
8
+ function isInSlack(app) {
9
+ return app !== undefined && app.bot !== null && app.removedInSlackAt === null;
10
+ }
11
+ /**
12
+ * Use case: shows what waits for a linked person's person ship in Slack
13
+ * (gateway scopes 9.5), as the gateway wakes them. A reply to a message
14
+ * from Slack goes into that conversation or thread; a bot ship's message
15
+ * into that bot's direct messages with the person (P-B1); anything else
16
+ * through the gateway's own bot, headed by the sender, once the person
17
+ * turned Slack on (B5). A bot removed in Slack falls back to the gateway's
18
+ * bot, with Slack on. Each delivery is kept as a post, handed with channel
19
+ * slack, posted, given its Slack message, then acknowledged (B4); a link for
20
+ * what Slack does not show in full is handed only, as a wake. Slack rate
21
+ * limited: the post waits Retry-After and goes again with the same hand-over.
22
+ * Slack refused the post: nothing is kept, and web push and email wake as
23
+ * before. A post the gateway did not finish (it stopped, or core refused
24
+ * the acknowledgement) is finished first, at every wake, never posted twice
25
+ * once in Slack. It answers the deliveries Slack showed, which no other
26
+ * channel wakes for, and whether a post is left unfinished.
27
+ */
28
+ export function createShowInSlack(deps) {
29
+ const whereOf = async (link, delivery) => {
30
+ const { fleetId, personShipId, slackUserId, isShowingAll } = link;
31
+ const repliedTo = delivery.inReplyTo === null ? undefined : await deps.posts.ofMessage(fleetId, { personShipId, messageId: delivery.inReplyTo });
32
+ if (repliedTo !== undefined) {
33
+ const app = await deps.apps.find(fleetId, repliedTo.appId);
34
+ if (isInSlack(app)) {
35
+ return { app, channel: repliedTo.channel, threadTs: repliedTo.threadTs ?? repliedTo.ts };
36
+ }
37
+ }
38
+ const bot = await deps.apps.ofShip(fleetId, delivery.senderShipId);
39
+ if (isInSlack(bot)) {
40
+ return { app: bot, channel: slackUserId, threadTs: null };
41
+ }
42
+ const gatewayBot = isShowingAll ? await deps.apps.gatewayBot(fleetId) : undefined;
43
+ return isInSlack(gatewayBot) ? { app: gatewayBot, channel: slackUserId, threadTs: null } : undefined;
44
+ };
45
+ /** Posts it, waiting out Slack's rate limits: the Slack message, or none when Slack refused it. */
46
+ const posted = async (where, shown) => {
47
+ for (let tried = 1;; tried += 1) {
48
+ const answered = await deps.slack.post(where.app.bot.token, { messageId: shown.messageId, channel: where.channel, threadTs: where.threadTs, text: shown.text, buttons: shown.buttons });
49
+ if (answered.isOk) {
50
+ return answered.value.ts;
51
+ }
52
+ if (answered.error.kind !== 'rateLimited' || tried >= RATE_LIMITED_TRIES) {
53
+ return undefined;
54
+ }
55
+ await deps.sleep(answered.error.retryAfterSeconds * SECOND_MS, new AbortController().signal);
56
+ }
57
+ };
58
+ /**
59
+ * Posts a kept post not yet in Slack, then acknowledges it unless a link.
60
+ * A post not yet in Slack whose delivery the read did not hold is handed
61
+ * again with the same number, which counts nothing: still handed, it
62
+ * waits for a later read; acknowledged meanwhile, or undeliverable, it is
63
+ * forgotten. A post in Slack is acknowledged by core's ack alone, which
64
+ * takes a delivery acknowledged meanwhile as OK.
65
+ */
66
+ const finish = async ({ crewToken, post, delivery }) => {
67
+ let current = post;
68
+ if (current.ts === null) {
69
+ if (delivery === undefined) {
70
+ const handed = await deps.door.handed(crewToken, { deliveryId: post.deliveryId, handOverNumber: FIRST_HAND_OVER, channel: 'slack' });
71
+ if (!handed.isOk || handed.value === 'handed') {
72
+ return 'waiting';
73
+ }
74
+ await deps.posts.remove(post.fleetId, post);
75
+ return 'notShown';
76
+ }
77
+ const app = await deps.apps.find(post.fleetId, post.appId);
78
+ const shown = slackPostOf(delivery, { overviewUrl: deps.overviewUrlOf(post.fleetId), isHeadedBySender: app?.shipId === null });
79
+ const ts = isInSlack(app) ? await posted({ app, channel: post.channel, threadTs: post.threadTs }, { messageId: post.messageId, text: shown.text, buttons: shown.kind === 'shown' ? shown.buttons : [] }) : undefined;
80
+ if (ts === undefined) {
81
+ await deps.posts.remove(post.fleetId, post);
82
+ return 'notShown';
83
+ }
84
+ current = { ...current, ts };
85
+ await deps.posts.save(current);
86
+ }
87
+ if (current.isLinkOnly || current.ackedAt !== null) {
88
+ return 'shown';
89
+ }
90
+ const acked = await deps.door.ack(crewToken, post.deliveryId);
91
+ if (!acked.isOk) {
92
+ return 'unacknowledged';
93
+ }
94
+ await deps.posts.save({ ...current, ackedAt: deps.clock.now() });
95
+ return 'shown';
96
+ };
97
+ return async (ship, { crewToken, fresh }) => {
98
+ const link = await deps.links.ofPersonShip(ship.fleetId, ship.shipId);
99
+ const shownIds = new Set();
100
+ let isAnyUnfinished = false;
101
+ if (link?.stoppedAt !== null) {
102
+ return ok({ shown: shownIds, isAnyUnfinished });
103
+ }
104
+ const unfinished = await deps.posts.unfinished(ship.fleetId, ship.shipId);
105
+ if (unfinished.length > 0) {
106
+ // A post not yet in Slack needs its delivery, handed already: read with the held ones again.
107
+ const held = await deps.door.pushReceive(crewToken, { max: unfinished.length + fresh.length });
108
+ if (!held.isOk) {
109
+ return held;
110
+ }
111
+ for (const post of unfinished) {
112
+ const { deliveryId } = post;
113
+ if (deliveryId !== null) {
114
+ const finished = await finish({ crewToken, post: { ...post, deliveryId }, delivery: held.value.find((each) => each.deliveryId === deliveryId) });
115
+ isAnyUnfinished ||= finished === 'unacknowledged' || finished === 'waiting';
116
+ }
117
+ }
118
+ }
119
+ for (const delivery of fresh) {
120
+ const where = await whereOf(link, delivery);
121
+ if (where === undefined) {
122
+ continue;
123
+ }
124
+ const shown = slackPostOf(delivery, { overviewUrl: deps.overviewUrlOf(ship.fleetId), isHeadedBySender: where.app.shipId === null });
125
+ const post = {
126
+ fleetId: ship.fleetId,
127
+ personShipId: ship.shipId,
128
+ messageId: delivery.messageId,
129
+ deliveryId: delivery.deliveryId,
130
+ senderShipId: delivery.senderShipId,
131
+ appId: where.app.appId,
132
+ channel: where.channel,
133
+ ts: null,
134
+ threadTs: where.threadTs,
135
+ isLinkOnly: shown.kind === 'link',
136
+ ackedAt: null,
137
+ };
138
+ // Kept before it is handed: a gateway that stops in between finishes it at the next wake.
139
+ await deps.posts.save(post);
140
+ const handed = await deps.door.handed(crewToken, { deliveryId: delivery.deliveryId, handOverNumber: FIRST_HAND_OVER, channel: 'slack' });
141
+ if (!handed.isOk || handed.value !== 'handed') {
142
+ await deps.posts.remove(ship.fleetId, post);
143
+ continue;
144
+ }
145
+ const finished = await finish({ crewToken, post: { ...post, deliveryId: delivery.deliveryId }, delivery });
146
+ if (finished === 'shown' || finished === 'unacknowledged') {
147
+ shownIds.add(delivery.deliveryId);
148
+ }
149
+ isAnyUnfinished ||= finished === 'unacknowledged';
150
+ }
151
+ return ok({ shown: shownIds, isAnyUnfinished });
152
+ };
153
+ }
154
+ //# sourceMappingURL=show-in-slack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show-in-slack.js","sourceRoot":"","sources":["../../../src/core/slack/show-in-slack.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,EAAE,EAAe,MAAM,qBAAqB,CAAC;AAItD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,yEAAyE;AACzE,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAE7B,MAAM,SAAS,GAAG,IAAI,CAAC;AAEvB,wHAAwH;AACxH,MAAM,eAAe,GAAG,CAAC,CAAC;AAkB1B,SAAS,SAAS,CAAC,GAAyB;IAC1C,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,GAAG,KAAK,IAAI,IAAI,GAAG,CAAC,gBAAgB,KAAK,IAAI,CAAC;AAChF,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,iBAAiB,CAAC,IASjC;IACC,MAAM,OAAO,GAAG,KAAK,EAAE,IAAe,EAAE,QAAwB,EAA8B,EAAE;QAC9F,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;QAClE,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC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
+ * with what Slack gave for it: its client credentials and signing secret
5
+ * when made, its bot token once installed. The gateway's own bot is the
6
+ * fleet's first (B5).
7
+ */
8
+ export interface SlackApp {
9
+ readonly fleetId: FleetId;
10
+ readonly appId: string;
11
+ /** The ship the app is the bot of; null for the gateway's own bot. */
12
+ readonly shipId: ShipId | null;
13
+ readonly clientId: string;
14
+ readonly clientSecret: string;
15
+ readonly signingSecret: string;
16
+ /** Slack's install screen for the app. */
17
+ readonly installUrl: string;
18
+ /** The bot's name in Slack, as the gateway last made or renamed it: the ship's name then, or the fleet's for its own bot. */
19
+ readonly name: string;
20
+ readonly madeAt: Date;
21
+ /** When someone last opened Slack's install screen for it from the gateway, while no install came back. */
22
+ readonly installStartedAt: Date | null;
23
+ readonly bot: {
24
+ readonly token: string;
25
+ readonly userId: string;
26
+ } | null;
27
+ /** When Slack said the app was uninstalled or its tokens revoked (app_uninstalled, tokens_revoked). */
28
+ readonly removedInSlackAt: Date | null;
29
+ }
30
+ /** A bot's state on the Slack page (gateway scopes 9.2). */
31
+ export type BotState = 'made' | 'waitingForInstall' | 'inSlack' | 'removedInSlack';
32
+ export declare function botStateOf(app: SlackApp): BotState;
33
+ /** What the gateway asks Slack to make: the app's name and description, its bot's scopes, the user scopes Sign in with Slack asks, where Slack sends an install or a sign-in back, the events it sends the gateway and where, and where a press of a button goes. */
34
+ export interface SlackAppDescription {
35
+ readonly name: string;
36
+ readonly description: string;
37
+ readonly botScopes: readonly string[];
38
+ readonly userScopes: readonly string[];
39
+ /** Where Slack sends an install back first, then any other address Slack may send the person back to. */
40
+ readonly redirectUrls: readonly string[];
41
+ readonly events: {
42
+ readonly url: string;
43
+ readonly botEvents: readonly string[];
44
+ };
45
+ readonly actionsUrl: string;
46
+ }
47
+ /** The gateway's addresses Slack calls: where an install comes back, where events and presses of buttons go, and where Sign in with Slack comes back to link. */
48
+ export interface SlackAddresses {
49
+ readonly installRedirectUrl: string;
50
+ readonly eventsUrl: string;
51
+ readonly actionsUrl: string;
52
+ readonly linkRedirectUrl: string;
53
+ }
54
+ /** Sign in with Slack's user scopes (OpenID Connect): who signed in, in which workspace, and their name. */
55
+ export declare const SIGN_IN_SCOPES: string[];
56
+ /** Slack's longest app name. */
57
+ export declare const APP_NAME_MAX_LENGTH = 35;
58
+ /** Slack's longest app description. */
59
+ export declare const APP_DESCRIPTION_MAX_LENGTH = 140;
60
+ /**
61
+ * The gateway's own bot (B5), named after the fleet: it shows a person what
62
+ * waits for their person ship, in a direct message, where they answer in
63
+ * its thread or by a button (9.5). A person links their Slack account
64
+ * through its Sign in with Slack (gateway scopes 9.3).
65
+ */
66
+ export declare function gatewayBotDescription(fleetName: string, addresses: SlackAddresses): SlackAppDescription;
67
+ /**
68
+ * A ship's own bot (gateway scopes 9.2): the ship's name, its statement's
69
+ * summary as the description (0047), a direct messages tab, the events of a
70
+ * direct message and a mention, and the bot scopes to read them, post and
71
+ * react. Slack sends its uninstall and revoked tokens too, and a press of a
72
+ * button under a question it posted (9.5).
73
+ */
74
+ export declare function shipBotDescription(ship: {
75
+ name: string;
76
+ summary: string | null;
77
+ }, addresses: SlackAddresses): SlackAppDescription;
@@ -0,0 +1,53 @@
1
+ export function botStateOf(app) {
2
+ if (app.removedInSlackAt !== null) {
3
+ return 'removedInSlack';
4
+ }
5
+ if (app.bot !== null) {
6
+ return 'inSlack';
7
+ }
8
+ return app.installStartedAt === null ? 'made' : 'waitingForInstall';
9
+ }
10
+ /** The events every bot sends the gateway: its uninstall and revoked tokens (gateway scopes 9.2). */
11
+ const REMOVAL_EVENTS = ['app_uninstalled', 'tokens_revoked'];
12
+ /** Sign in with Slack's user scopes (OpenID Connect): who signed in, in which workspace, and their name. */
13
+ export const SIGN_IN_SCOPES = ['openid', 'profile'];
14
+ /** Slack's longest app name. */
15
+ export const APP_NAME_MAX_LENGTH = 35;
16
+ /** Slack's longest app description. */
17
+ export const APP_DESCRIPTION_MAX_LENGTH = 140;
18
+ /**
19
+ * The gateway's own bot (B5), named after the fleet: it shows a person what
20
+ * waits for their person ship, in a direct message, where they answer in
21
+ * its thread or by a button (9.5). A person links their Slack account
22
+ * through its Sign in with Slack (gateway scopes 9.3).
23
+ */
24
+ export function gatewayBotDescription(fleetName, addresses) {
25
+ return {
26
+ name: fleetName.slice(0, APP_NAME_MAX_LENGTH),
27
+ description: `What waits for you in the ${fleetName} fleet of Aeolus`.slice(0, APP_DESCRIPTION_MAX_LENGTH),
28
+ botScopes: ['chat:write', 'im:history', 'im:write'],
29
+ userScopes: SIGN_IN_SCOPES,
30
+ redirectUrls: [addresses.installRedirectUrl, addresses.linkRedirectUrl],
31
+ events: { url: addresses.eventsUrl, botEvents: ['message.im', ...REMOVAL_EVENTS] },
32
+ actionsUrl: addresses.actionsUrl,
33
+ };
34
+ }
35
+ /**
36
+ * A ship's own bot (gateway scopes 9.2): the ship's name, its statement's
37
+ * summary as the description (0047), a direct messages tab, the events of a
38
+ * direct message and a mention, and the bot scopes to read them, post and
39
+ * react. Slack sends its uninstall and revoked tokens too, and a press of a
40
+ * button under a question it posted (9.5).
41
+ */
42
+ export function shipBotDescription(ship, addresses) {
43
+ return {
44
+ name: ship.name.slice(0, APP_NAME_MAX_LENGTH),
45
+ description: (ship.summary ?? `The ${ship.name} ship of Aeolus`).slice(0, APP_DESCRIPTION_MAX_LENGTH),
46
+ botScopes: ['chat:write', 'im:history', 'app_mentions:read', 'reactions:write'],
47
+ userScopes: [],
48
+ redirectUrls: [addresses.installRedirectUrl],
49
+ events: { url: addresses.eventsUrl, botEvents: ['message.im', 'app_mention', ...REMOVAL_EVENTS] },
50
+ actionsUrl: addresses.actionsUrl,
51
+ };
52
+ }
53
+ //# sourceMappingURL=slack-app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slack-app.js","sourceRoot":"","sources":["../../../src/core/slack/slack-app.ts"],"names":[],"mappings":"AA+BA,MAAM,UAAU,UAAU,CAAC,GAAa;IACtC,IAAI,GAAG,CAAC,gBAAgB,KAAK,IAAI,EAAE,CAAC;QAClC,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