@effect/chat-slack 0.0.0 → 4.1.6

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 (182) hide show
  1. package/AGENTS.md +434 -0
  2. package/CLAUDE.md +434 -0
  3. package/LICENSE +21 -0
  4. package/README.md +47 -0
  5. package/ai-docs/README.md +44 -0
  6. package/ai-docs/package.json +36 -0
  7. package/ai-docs/src/01_effect/01_basics/01_effect-gen.ts +30 -0
  8. package/ai-docs/src/01_effect/01_basics/02_effect-fn.ts +52 -0
  9. package/ai-docs/src/01_effect/01_basics/10_creating-effects.ts +74 -0
  10. package/ai-docs/src/01_effect/01_basics/index.md +7 -0
  11. package/ai-docs/src/01_effect/02_schema/10_schema-basics.ts +43 -0
  12. package/ai-docs/src/01_effect/02_schema/index.md +7 -0
  13. package/ai-docs/src/01_effect/03_services/01_service.ts +45 -0
  14. package/ai-docs/src/01_effect/03_services/10_reference.ts +10 -0
  15. package/ai-docs/src/01_effect/03_services/20_layer-composition.ts +70 -0
  16. package/ai-docs/src/01_effect/03_services/20_layer-unwrap.ts +66 -0
  17. package/ai-docs/src/01_effect/03_services/index.md +5 -0
  18. package/ai-docs/src/01_effect/04_errors/01_error-handling.ts +30 -0
  19. package/ai-docs/src/01_effect/04_errors/10_catch-tags.ts +24 -0
  20. package/ai-docs/src/01_effect/04_errors/20_reason-errors.ts +64 -0
  21. package/ai-docs/src/01_effect/04_errors/index.md +1 -0
  22. package/ai-docs/src/01_effect/05_resources/10_acquire-release.ts +105 -0
  23. package/ai-docs/src/01_effect/05_resources/20_layer-side-effects.ts +31 -0
  24. package/ai-docs/src/01_effect/05_resources/30_layer-map.ts +86 -0
  25. package/ai-docs/src/01_effect/05_resources/index.md +3 -0
  26. package/ai-docs/src/01_effect/06_running/10_run-main.ts +30 -0
  27. package/ai-docs/src/01_effect/06_running/20_layer-launch.ts +27 -0
  28. package/ai-docs/src/01_effect/06_running/index.md +1 -0
  29. package/ai-docs/src/01_effect/07_pubsub/10_pubsub.ts +56 -0
  30. package/ai-docs/src/01_effect/07_pubsub/index.md +3 -0
  31. package/ai-docs/src/03_stream/10_creating-streams.ts +103 -0
  32. package/ai-docs/src/03_stream/20_consuming-streams.ts +137 -0
  33. package/ai-docs/src/03_stream/30_encoding.ts +163 -0
  34. package/ai-docs/src/03_stream/index.md +4 -0
  35. package/ai-docs/src/04_integration/10_managed-runtime.ts +129 -0
  36. package/ai-docs/src/04_integration/index.md +5 -0
  37. package/ai-docs/src/05_batching/10_request-resolver.ts +89 -0
  38. package/ai-docs/src/05_batching/index.md +3 -0
  39. package/ai-docs/src/06_schedule/10_schedules.ts +111 -0
  40. package/ai-docs/src/06_schedule/index.md +3 -0
  41. package/ai-docs/src/07_datetime/10_creating-and-formatting.ts +30 -0
  42. package/ai-docs/src/07_datetime/20_time-zones.ts +44 -0
  43. package/ai-docs/src/07_datetime/index.md +5 -0
  44. package/ai-docs/src/08_observability/10_logging.ts +66 -0
  45. package/ai-docs/src/08_observability/20_otlp-tracing.ts +95 -0
  46. package/ai-docs/src/08_observability/index.md +7 -0
  47. package/ai-docs/src/09_testing/10_effect-tests.ts +55 -0
  48. package/ai-docs/src/09_testing/20_layer-tests.ts +138 -0
  49. package/ai-docs/src/09_testing/index.md +1 -0
  50. package/ai-docs/src/10_predicate/01_basics.ts +14 -0
  51. package/ai-docs/src/10_predicate/index.md +9 -0
  52. package/ai-docs/src/40_sql/10_basics.ts +175 -0
  53. package/ai-docs/src/40_sql/index.md +6 -0
  54. package/ai-docs/src/50_http-client/10_basics.ts +102 -0
  55. package/ai-docs/src/50_http-client/index.md +3 -0
  56. package/ai-docs/src/51_http-server/10_basics.ts +118 -0
  57. package/ai-docs/src/51_http-server/20_testing.ts +100 -0
  58. package/ai-docs/src/51_http-server/fixtures/api/Api.ts +14 -0
  59. package/ai-docs/src/51_http-server/fixtures/api/Authorization.ts +36 -0
  60. package/ai-docs/src/51_http-server/fixtures/api/System.ts +10 -0
  61. package/ai-docs/src/51_http-server/fixtures/api/Users.ts +107 -0
  62. package/ai-docs/src/51_http-server/fixtures/domain/User.ts +21 -0
  63. package/ai-docs/src/51_http-server/fixtures/domain/UserErrors.ts +22 -0
  64. package/ai-docs/src/51_http-server/fixtures/server/Authorization.ts +37 -0
  65. package/ai-docs/src/51_http-server/fixtures/server/Users/http.ts +80 -0
  66. package/ai-docs/src/51_http-server/fixtures/server/Users.ts +183 -0
  67. package/ai-docs/src/51_http-server/index.md +3 -0
  68. package/ai-docs/src/52_graphql/10_basics.ts +117 -0
  69. package/ai-docs/src/52_graphql/20_testing.ts +45 -0
  70. package/ai-docs/src/52_graphql/30_batching.ts +118 -0
  71. package/ai-docs/src/52_graphql/40_aliased-batching.ts +124 -0
  72. package/ai-docs/src/52_graphql/50_errors-and-retries.ts +74 -0
  73. package/ai-docs/src/52_graphql/index.md +6 -0
  74. package/ai-docs/src/60_child-process/10_working-with-child-processes.ts +117 -0
  75. package/ai-docs/src/60_child-process/index.md +3 -0
  76. package/ai-docs/src/70_cli/10_basics.ts +162 -0
  77. package/ai-docs/src/70_cli/index.md +5 -0
  78. package/ai-docs/src/71_ai/10_language-model.ts +156 -0
  79. package/ai-docs/src/71_ai/20_tools.ts +226 -0
  80. package/ai-docs/src/71_ai/30_chat.ts +158 -0
  81. package/ai-docs/src/71_ai/fixtures/domain/LaunchPlan.ts +9 -0
  82. package/ai-docs/src/71_ai/index.md +5 -0
  83. package/ai-docs/src/80_cluster/10_entities.ts +97 -0
  84. package/ai-docs/src/80_cluster/index.md +4 -0
  85. package/ai-docs/src/index.md +10 -0
  86. package/ai-docs/tsconfig.json +28 -0
  87. package/dist/SlackChat.d.ts +500 -0
  88. package/dist/SlackChat.d.ts.map +1 -0
  89. package/dist/SlackChat.js +512 -0
  90. package/dist/SlackChat.js.map +1 -0
  91. package/dist/SlackWebApi.d.ts +74 -0
  92. package/dist/SlackWebApi.d.ts.map +1 -0
  93. package/dist/SlackWebApi.js +96 -0
  94. package/dist/SlackWebApi.js.map +1 -0
  95. package/dist/index.d.ts +15 -0
  96. package/dist/index.d.ts.map +1 -0
  97. package/dist/index.js +16 -0
  98. package/dist/index.js.map +1 -0
  99. package/dist/internal/actions.d.ts +2 -0
  100. package/dist/internal/actions.d.ts.map +1 -0
  101. package/dist/internal/actions.js +169 -0
  102. package/dist/internal/actions.js.map +1 -0
  103. package/dist/internal/adapter.d.ts +2 -0
  104. package/dist/internal/adapter.d.ts.map +1 -0
  105. package/dist/internal/adapter.js +836 -0
  106. package/dist/internal/adapter.js.map +1 -0
  107. package/dist/internal/address.d.ts +2 -0
  108. package/dist/internal/address.d.ts.map +1 -0
  109. package/dist/internal/address.js +36 -0
  110. package/dist/internal/address.js.map +1 -0
  111. package/dist/internal/emoji.d.ts +2 -0
  112. package/dist/internal/emoji.d.ts.map +1 -0
  113. package/dist/internal/emoji.js +207 -0
  114. package/dist/internal/emoji.js.map +1 -0
  115. package/dist/internal/emojiData.d.ts +54 -0
  116. package/dist/internal/emojiData.d.ts.map +1 -0
  117. package/dist/internal/emojiData.js +1965 -0
  118. package/dist/internal/emojiData.js.map +1 -0
  119. package/dist/internal/errors.d.ts +2 -0
  120. package/dist/internal/errors.d.ts.map +1 -0
  121. package/dist/internal/errors.js +190 -0
  122. package/dist/internal/errors.js.map +1 -0
  123. package/dist/internal/escape.d.ts +14 -0
  124. package/dist/internal/escape.d.ts.map +1 -0
  125. package/dist/internal/escape.js +413 -0
  126. package/dist/internal/escape.js.map +1 -0
  127. package/dist/internal/interactions.d.ts +2 -0
  128. package/dist/internal/interactions.d.ts.map +1 -0
  129. package/dist/internal/interactions.js +389 -0
  130. package/dist/internal/interactions.js.map +1 -0
  131. package/dist/internal/json.d.ts +2 -0
  132. package/dist/internal/json.d.ts.map +1 -0
  133. package/dist/internal/json.js +30 -0
  134. package/dist/internal/json.js.map +1 -0
  135. package/dist/internal/length.d.ts +2 -0
  136. package/dist/internal/length.d.ts.map +1 -0
  137. package/dist/internal/length.js +33 -0
  138. package/dist/internal/length.js.map +1 -0
  139. package/dist/internal/mentions.d.ts +2 -0
  140. package/dist/internal/mentions.d.ts.map +1 -0
  141. package/dist/internal/mentions.js +229 -0
  142. package/dist/internal/mentions.js.map +1 -0
  143. package/dist/internal/normalize.d.ts +2 -0
  144. package/dist/internal/normalize.d.ts.map +1 -0
  145. package/dist/internal/normalize.js +211 -0
  146. package/dist/internal/normalize.js.map +1 -0
  147. package/dist/internal/options.d.ts +2 -0
  148. package/dist/internal/options.d.ts.map +1 -0
  149. package/dist/internal/options.js +6 -0
  150. package/dist/internal/options.js.map +1 -0
  151. package/dist/internal/richText.d.ts +2 -0
  152. package/dist/internal/richText.d.ts.map +1 -0
  153. package/dist/internal/richText.js +346 -0
  154. package/dist/internal/richText.js.map +1 -0
  155. package/dist/internal/text.d.ts +2 -0
  156. package/dist/internal/text.d.ts.map +1 -0
  157. package/dist/internal/text.js +239 -0
  158. package/dist/internal/text.js.map +1 -0
  159. package/dist/internal/webhook.d.ts +2 -0
  160. package/dist/internal/webhook.d.ts.map +1 -0
  161. package/dist/internal/webhook.js +142 -0
  162. package/dist/internal/webhook.js.map +1 -0
  163. package/package.json +62 -1
  164. package/src/SlackChat.ts +640 -0
  165. package/src/SlackWebApi.ts +135 -0
  166. package/src/index.ts +18 -0
  167. package/src/internal/actions.ts +203 -0
  168. package/src/internal/adapter.ts +961 -0
  169. package/src/internal/address.ts +50 -0
  170. package/src/internal/emoji.ts +223 -0
  171. package/src/internal/emojiData.ts +1965 -0
  172. package/src/internal/errors.ts +192 -0
  173. package/src/internal/escape.ts +428 -0
  174. package/src/internal/interactions.ts +391 -0
  175. package/src/internal/json.ts +35 -0
  176. package/src/internal/length.ts +41 -0
  177. package/src/internal/mentions.ts +224 -0
  178. package/src/internal/normalize.ts +221 -0
  179. package/src/internal/options.ts +22 -0
  180. package/src/internal/richText.ts +367 -0
  181. package/src/internal/text.ts +252 -0
  182. package/src/internal/webhook.ts +199 -0
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "../tsconfig.base.json",
4
+ "include": ["src/**/*.ts", "src/**/*.tsx"],
5
+ "compilerOptions": {
6
+ "rootDir": ".",
7
+ "noEmit": true,
8
+ "declaration": false,
9
+ "declarationMap": false,
10
+ "composite": false,
11
+ "incremental": false,
12
+ "types": ["node"],
13
+ "plugins": [
14
+ {
15
+ "name": "@effect/language-service",
16
+ "effectFn": ["untraced"],
17
+ "namespaceImportPackages": [],
18
+ "diagnosticSeverity": {
19
+ "floatingEffect": "off",
20
+ "globalJson": "off",
21
+ "globalJsonInEffect": "off",
22
+ "unstableApiUsage": "off",
23
+ "effectFnOpportunity": "error"
24
+ }
25
+ }
26
+ ]
27
+ }
28
+ }
@@ -0,0 +1,500 @@
1
+ import { Registry } from "effect/chat/ChatAdapter";
2
+ import { type ChatError } from "effect/chat/ChatError";
3
+ import type { ChatEvent } from "effect/chat/ChatEvent";
4
+ import { ChatHandler } from "effect/chat/ChatHandler";
5
+ import * as ChatInteraction from "effect/chat/ChatInteraction";
6
+ import type { ParseMention } from "effect/chat/ChatTest";
7
+ import { ChatThread } from "effect/chat/ChatThread";
8
+ import * as Context from "effect/Context";
9
+ import type * as Mac from "effect/crypto/Mac";
10
+ import * as Duration from "effect/Duration";
11
+ import * as Effect from "effect/Effect";
12
+ import * as HttpClient from "effect/http/HttpClient";
13
+ import * as HttpRouter from "effect/http/HttpRouter";
14
+ import * as Layer from "effect/Layer";
15
+ import * as Option from "effect/Option";
16
+ import type * as Redacted from "effect/Redacted";
17
+ import * as Schema from "effect/Schema";
18
+ import { SlackWebApi } from "./SlackWebApi.ts";
19
+ /**
20
+ * A Slack user from `users.info`, with guest and Slack Connect status.
21
+ *
22
+ * @stability unstable
23
+ * @category models
24
+ * @since 4.1.5
25
+ */
26
+ export interface SlackUser {
27
+ readonly id: string;
28
+ readonly teamId: string;
29
+ readonly name: string;
30
+ readonly isBot: boolean;
31
+ readonly isRestricted: boolean;
32
+ readonly isUltraRestricted: boolean;
33
+ /** A Slack Connect user from another organisation. */
34
+ readonly isStranger: boolean;
35
+ readonly deleted: boolean;
36
+ readonly raw: Schema.Json;
37
+ }
38
+ declare const SlackChat_base: Context.ServiceClass<SlackChat, "@effect/chat-slack/SlackChat", {
39
+ readonly teamId: string;
40
+ readonly botUserId: Effect.Effect<string, ChatError>;
41
+ readonly user: (id: string) => Effect.Effect<SlackUser, ChatError>;
42
+ readonly interaction: (payload: unknown, options?: {
43
+ /** The handler's share of Slack's 3 seconds. Default 2.5 seconds. */
44
+ readonly deadline?: Duration.Duration | undefined;
45
+ }) => Effect.Effect<Schema.Json | undefined | ChatInteraction.Late, never, ChatInteraction.Handler>;
46
+ }>;
47
+ /**
48
+ * The Slack side of the adapter, for what the core has no op for.
49
+ *
50
+ * **Details**
51
+ *
52
+ * - `botUserId` comes from `auth.test`, read once. A failed read is tried
53
+ * again next time.
54
+ * - `user` calls `users.info` each time. Nothing is cached.
55
+ * - `interaction` is the entry for a decoded Interactivity `payload`
56
+ * (`block_actions` or `view_submission`), as `DiscordChat.interaction`
57
+ * is for Discord, and for a slash command: the form fields of its
58
+ * request, or the `payload` of a `slash_commands` envelope, as one
59
+ * object. It normalises with `normalizeInteraction`, calls the
60
+ * handler through `ChatInteraction.handle` inside `deadline` (2.5
61
+ * seconds by default, the handler's share of Slack's 3), opens a modal
62
+ * with `views.open` and calls `Handler.refused` when it can't.
63
+ * - A modal's title is held to 24 code points, each input label to 2,000 and
64
+ * the modal's id to 255. These are not on the descriptor. A modal past one
65
+ * of them is not opened: `Handler.refused` gets `TooLarge`, and the click
66
+ * is still acked. A portable modal keeps its title to 24.
67
+ * - Slack needs a submit button on a modal with inputs, so a modal with no
68
+ * `submitLabel` gets the English "Submit". Pass `submitLabel` to localise
69
+ * it.
70
+ * - It succeeds with the body to answer Slack with: the JSON of the 200 on
71
+ * the Request URL, or the `payload` of the envelope ack on Socket Mode.
72
+ * For a command answered with `respond` that body is the message, with
73
+ * `response_type` `ephemeral` or `in_channel`, after the checks of a
74
+ * `post`; one that fails them goes to `Handler.refused`. A command's
75
+ * answer, `respond` or `followUp`, mentions nobody: `withPostOptions`
76
+ * does not reach it, so `<@U…>` goes out escaped and shows as text, as a
77
+ * `post` without `withPostOptions` does. There is no way to allow a
78
+ * mention in it.
79
+ * `undefined` is an empty answer: an ack, a close, a late click, a
80
+ * deferred command, a command that opened a modal, a command nobody
81
+ * handles, or a payload that is not from an element this adapter built.
82
+ * - `Late` is a submit or a command whose handler ran past the deadline
83
+ * and was interrupted. It is not an answer, since an empty one would close
84
+ * the modal, or tell the user the command worked: `layerInteractivity`
85
+ * answers 503 for it, and a caller on Socket Mode sends no ack. For a
86
+ * command, Slack's desktop client then shows its own private failure
87
+ * notice and keeps the text; its iOS client shows nothing. `Late` is
88
+ * itself a JSON value, so test for it with `Schema.is(ChatInteraction.Late)`
89
+ * before treating the result as a body.
90
+ * - `Chat.followUp` on a deferred command posts once to the command's
91
+ * `response_url`, which must be on a Slack host, through the layer's
92
+ * `HttpClient`. It is a write and is not retried. Slack takes five posts
93
+ * to one `response_url` within 30 minutes, each a new message. A spent
94
+ * or expired one answers 404 `used_url` or `expired_url`, which is
95
+ * `NotFound` with detail `interaction_expired`. A 410 or a JSON `error`
96
+ * with either string is mapped the same, from the docs: neither was seen.
97
+ * - A click on a private answer has no `message`. Its `messageId` is the
98
+ * answer's `container.message_ts`, which tells which answer was clicked
99
+ * and which no Web API method reaches: `chat.update` on it answers
100
+ * `message_not_found`, so `edit` fails `NotFound`. `raw` has
101
+ * `container.is_ephemeral`. A public answer reads back as a
102
+ * `bot_message` whose `bot_id` is not the app's own, so it is not
103
+ * `isSelf`.
104
+ * - `interaction` checks no signature and no app id: that is the
105
+ * transport's job. It needs `ChatInteraction.Handler` where it is
106
+ * called, so the layer does not need it.
107
+ *
108
+ * @stability unstable
109
+ * @category services
110
+ * @since 4.1.5
111
+ */
112
+ export declare class SlackChat extends SlackChat_base {
113
+ }
114
+ /**
115
+ * Registers the Slack adapter in the `Registry`, for one workspace.
116
+ *
117
+ * **Details**
118
+ *
119
+ * - `post` and `edit` send the Markdown as one `markdown` block, in which
120
+ * a `<` outside inline and fenced code goes as `&lt;`, plus a `text` the
121
+ * adapter builds, in which every `<`, `>` and `&` goes as an entity.
122
+ * Slack decides who a message mentions from `text`, so no token notifies
123
+ * unless `withPostOptions({ notify })` allows it. Allowed tokens stay
124
+ * intact in both.
125
+ * - That `text` is cut to 16,000 code points on a post and 3,800 UTF-8
126
+ * bytes on an edit, on a grapheme cluster boundary, ending in `…` with
127
+ * the allowed tokens the cut left out appended. The cut never fails.
128
+ * - Stream appends go as `markdown_text`, which has no `text` beside it.
129
+ * A stream decodes the character references for `<`, `@` and `!`, so
130
+ * the adapter finds token shapes (`<@`, and `<!` followed by a letter)
131
+ * with those references decoded, in prose and in code alike, and puts a
132
+ * zero-width space (U+200B) straight after whatever spells the `<`.
133
+ * Allowed tokens are sent as they are. An append holds back an unclosed
134
+ * `<`, a trailing character reference that is not finished and a
135
+ * trailing high surrogate, and reports them as `held`. The start and a
136
+ * `flush` hold nothing, so a shape that the next write completes gets
137
+ * its zero-width space at the start of that write.
138
+ * - Once a stream is stopped, by `stop` or by a user, a message whose appends differ from what
139
+ * `post` would send gets one `chat.update` as blocks plus `text`,
140
+ * which takes the zero-width spaces out. It is skipped, leaving them, when
141
+ * the block would pass 12,000 code points, when the edit fails, and when
142
+ * an append to the message was left unconfirmed, since `ChatMarkdown`
143
+ * then rewrites the message itself. A skip fails nothing and sets the
144
+ * span attribute `slack.stream.cleanup`. A cleanup that is interrupted
145
+ * runs again on the next `stop` for that message.
146
+ * - `post`, `edit` and stream writes fail with `TooLarge` before calling
147
+ * Slack when the text as sent passes 12,000 code points. Slack's second
148
+ * limit, 13,200 with every emoji counted as its shortcode, is left to
149
+ * Slack, whose refusal is also `TooLarge` and posts nothing.
150
+ * `descriptor.measure` keeps a part under both.
151
+ * - A post with files uploads them with no channel, posts the message, then
152
+ * attaches them with `chat.update` and `file_ids`. Both calls send the
153
+ * same blocks and `text`, so the `text` of a post with files is cut to the
154
+ * update budget of 3,800 bytes. A post with files and no Markdown carries
155
+ * the file names, joined by ", ", as its text, and keeps them.
156
+ * - A post with files is all-or-nothing. A file Slack refuses at upload,
157
+ * one past `limits`, or an attach Slack refuses fails the post `denied`
158
+ * with detail `file_refused`: a refused attach first deletes the message
159
+ * and then the files, best effort. A timed out attach is retried, for up
160
+ * to a minute in all, waits after a 429 included; past that it is rolled
161
+ * back the same way. When the message can't be deleted, the post fails
162
+ * `Unknown` with detail `attach_failed_message_left` and a
163
+ * `SlackAttachFailed` as its cause. From the post on, the route can't be
164
+ * interrupted, and each call has a timeout.
165
+ * - `edit` keeps a message's files, and `delete` removes the message and
166
+ * not its files: a user may have shared them on. Read the file ids with
167
+ * `fetchMessage` before deleting to remove them too.
168
+ * - A mention in a post with files can notify for a message that a refused
169
+ * attach then deletes.
170
+ * - A post with files in a Slack Connect channel is untested.
171
+ * - `replyTo` is not supported.
172
+ * - A message from another app or an incoming webhook (`bot_message`) has
173
+ * the `bot_id` as its author id. `getUser` on that id fails `NotFound`.
174
+ * - `getUser`'s `raw` is the user from `users.info`, with its `team_id`.
175
+ * `SlackChat.user` is the same call with the team, guest and Slack
176
+ * Connect status as typed fields.
177
+ * - The layer provides the `SlackChat` and `SlackWebApi` services as well
178
+ * as registering the adapter. A consumer that needs more of Slack than
179
+ * `Chat` has reads either from context beside `Chat`.
180
+ * - A thread root whose subtype is not a message, such as an agent-view
181
+ * chat's `assistant_app_thread` root, is treated as deleted: `opener`
182
+ * gives `None` and history starts at the first reply.
183
+ * - Edits to one message are at least 3 seconds apart.
184
+ * - After a 429 on a stream append or an edit, the next write to that
185
+ * message waits for the retry-after, and later writes to it wait twice
186
+ * the interval, for the rest of the reply. A stream started with
187
+ * `continues` keeps the pace of the part it continues.
188
+ * - The native stream needs a thread and a recipient, and rotates before
189
+ * Slack's ten minute cap. A reply that ends after a click on the stop
190
+ * button moves the agent session off `processing`.
191
+ * - A message's buttons, link buttons and selects go in one `actions` block
192
+ * after the `markdown` block, on `post` and on `edit`. A button's id is
193
+ * its `action_id` and its value its `value`. A message with elements and
194
+ * no Markdown has no `markdown` block, and its `text` is the button
195
+ * labels joined by a space. A streamed reply gets its buttons by `edit`
196
+ * after the stream stops.
197
+ * - Elements are refused before the call past 25 in a message, for an id
198
+ * longer than 255 or holding U+241F, and for an id plus a value longer
199
+ * than 2,000, all in code points.
200
+ * - Text and elements share Slack's 13,200 budget, so
201
+ * `descriptor.measure(markdown, actions)` counts the `actions` block as
202
+ * Slack stores it, with every non-ASCII unit at 6. A `value` near 2,000
203
+ * uses up the budget by itself. A `post` whose elements push it past the
204
+ * cap fails `TooLarge` with `msg_blocks_too_long`, and nothing is posted.
205
+ * The adapter never falls back to posting the text and adding the elements
206
+ * by `edit`. A caller can: `chat.update` had no 13,200 cap when tested,
207
+ * which Slack does not document.
208
+ *
209
+ * @stability unstable
210
+ * @category layers
211
+ * @since 4.1.5
212
+ */
213
+ export declare const layer: (options: {
214
+ readonly botToken: Redacted.Redacted;
215
+ readonly teamId: string;
216
+ }) => Layer.Layer<SlackChat | SlackWebApi, never, HttpClient.HttpClient | Registry>;
217
+ declare const SlackAttachFailed_base: Schema.Class<SlackAttachFailed, Schema.TaggedStruct<"SlackAttachFailed", {
218
+ readonly thread: Schema.Struct<{
219
+ readonly platform: Schema.String;
220
+ readonly id: Schema.String;
221
+ }>;
222
+ readonly messageId: Schema.String;
223
+ readonly fileIds: Schema.$Array<Schema.String>;
224
+ readonly reason: Schema.Union<[typeof import("effect/chat/ChatError").RateLimited, typeof import("effect/chat/ChatError").Unsupported, typeof import("effect/chat/ChatError").Transport, typeof import("effect/chat/ChatError").PlatformUnavailable, typeof import("effect/chat/ChatError").NoAdapter, typeof import("effect/chat/ChatError").Unauthenticated, typeof import("effect/chat/ChatError").Forbidden, typeof import("effect/chat/ChatError").NotFound, typeof import("effect/chat/ChatError").TooLarge, typeof import("effect/chat/ChatError").InvalidRequest, typeof import("effect/chat/ChatError").InvalidResponse, typeof import("effect/chat/ChatError").Unknown]>;
225
+ }>, import("effect/Cause").YieldableError>;
226
+ /**
227
+ * The `cause` of a `post` with files that failed `uncertain` with detail
228
+ * `attach_failed_message_left`.
229
+ *
230
+ * **Details**
231
+ *
232
+ * - The attach failed and the message could not be deleted. The message may
233
+ * still exist, with or without its files: an attach that timed out may
234
+ * have landed, and a delete that timed out may have too. `messageId` is
235
+ * that message and `fileIds` are its files, which are kept. `reason` is
236
+ * the attach's own.
237
+ * - Its `message` leaves the ids out.
238
+ *
239
+ * @stability unstable
240
+ * @category errors
241
+ * @since 4.1.5
242
+ */
243
+ export declare class SlackAttachFailed extends SlackAttachFailed_base {
244
+ get message(): string;
245
+ }
246
+ /**
247
+ * The address of a Slack channel, direct conversation or thread:
248
+ * `{team}/{channel}`, or `{team}/{channel}/{threadTs}` for a thread.
249
+ *
250
+ * @stability unstable
251
+ * @category constructors
252
+ * @since 4.1.5
253
+ */
254
+ export declare const thread: (parts: {
255
+ readonly team: string;
256
+ readonly channel: string;
257
+ readonly threadTs?: string | undefined;
258
+ }) => ChatThread;
259
+ /**
260
+ * The parts of a Slack address, or `None` for another platform's or a
261
+ * malformed one.
262
+ *
263
+ * @stability unstable
264
+ * @category destructors
265
+ * @since 4.1.5
266
+ */
267
+ export declare const parts: (thread: ChatThread) => Option.Option<{
268
+ readonly team: string;
269
+ readonly channel: string;
270
+ readonly threadTs?: string | undefined;
271
+ }>;
272
+ /**
273
+ * `POST {path}`: the Events API webhook.
274
+ *
275
+ * **Details**
276
+ *
277
+ * - Checks the `v0` signature with the signing secret and a five minute
278
+ * window, then answers `url_verification`.
279
+ * - An envelope for another app, another workspace or of another type is
280
+ * answered 200 and dropped.
281
+ * - The events go through `normalize` to the `ChatHandler`, one at a time.
282
+ * - Answers 503, so Slack retries, when the handler fails `NotAccepted`,
283
+ * when the bot user can't be read, or when the request, from reading its
284
+ * body to the handler's return, takes longer than `deadline` (2.5 seconds
285
+ * by default). Each of the three is logged with its own message, the
286
+ * unreadable bot user as an error with its `ChatError` and the other two
287
+ * as warnings.
288
+ * - Answers 413 past `maxBodyBytes` (1 MiB by default), and for a body that
289
+ * can't be read, before the signature is checked. `maxBodyBytes` must be
290
+ * a non-negative safe integer; another value is a defect when the layer is
291
+ * built.
292
+ * - Slack redelivers on a timeout or an error, so an event can arrive twice.
293
+ * `ChatEvent.dedupeKey` gives the two deliveries equal keys.
294
+ *
295
+ * Signature checks use the required `Mac` service. Provide
296
+ * `NodeCrypto.layerMac`, `BunCrypto.layerMac`, `DenoCrypto.layerMac`,
297
+ * `BrowserCrypto.layerMac`, or `Mac.layerWebCrypto` with
298
+ * `SecureRandom.layerWebCrypto` for other runtimes such as Workers.
299
+ * Key construction failures are configuration defects; verification errors
300
+ * fail the signature check (401).
301
+ *
302
+ * @stability unstable
303
+ * @category layers
304
+ * @since 4.1.5
305
+ */
306
+ export declare const layerWebhook: (options: {
307
+ readonly path: `/${string}`;
308
+ readonly signingSecret: Redacted.Redacted;
309
+ readonly appId: string;
310
+ readonly deadline?: Duration.Duration | undefined;
311
+ readonly maxBodyBytes?: number | undefined;
312
+ }) => Layer.Layer<never, never, HttpRouter.HttpRouter | SlackChat | ChatHandler | Mac.Mac>;
313
+ /**
314
+ * `POST {path}`: the Interactivity Request URL, which Slack posts
315
+ * form-encoded and separately from the Events API.
316
+ *
317
+ * **Details**
318
+ *
319
+ * - Checks the `v0` signature as `layerWebhook` does, decodes the form's
320
+ * `payload` and drops one for another app with a 200.
321
+ * - It is also the Request URL of a slash command. A command's form has no
322
+ * `payload` field and has a `command` field, which is how the route tells
323
+ * the two apart. Its fields go to `SlackChat.interaction` as one object,
324
+ * after the same signature and app checks.
325
+ * - Hands the payload to `SlackChat.interaction` with `deadline` (2.5
326
+ * seconds by default). Its body is the response, and `Late` is answered
327
+ * with a 503, so the modal stays open with Slack's own error.
328
+ * - Answers 413 past `maxBodyBytes`, as `layerWebhook` does.
329
+ * - Slack never redelivers an interaction, so a click or submit that is not
330
+ * answered in time is lost. A user can submit again, as a new request.
331
+ *
332
+ * Signature checks use the required `Mac` service. Provide
333
+ * `NodeCrypto.layerMac`, `BunCrypto.layerMac`, `DenoCrypto.layerMac`,
334
+ * `BrowserCrypto.layerMac`, or `Mac.layerWebCrypto` with
335
+ * `SecureRandom.layerWebCrypto` for other runtimes such as Workers.
336
+ * Key construction failures are configuration defects; verification errors
337
+ * fail the signature check (401).
338
+ *
339
+ * @stability unstable
340
+ * @category layers
341
+ * @since 4.1.5
342
+ */
343
+ export declare const layerInteractivity: (options: {
344
+ readonly path: `/${string}`;
345
+ readonly signingSecret: Redacted.Redacted;
346
+ readonly appId: string;
347
+ readonly deadline?: Duration.Duration | undefined;
348
+ readonly maxBodyBytes?: number | undefined;
349
+ }) => Layer.Layer<never, never, HttpRouter.HttpRouter | SlackChat | ChatInteraction.Handler | Mac.Mac>;
350
+ /**
351
+ * The normaliser behind `SlackChat.interaction`.
352
+ *
353
+ * **Details**
354
+ *
355
+ * - Pure: takes the decoded `payload` of a `block_actions` or
356
+ * `view_submission` request, or the fields of a slash command.
357
+ * - None for any other payload, and for one that is not from an element
358
+ * this adapter built: a block of the consumer's own, a link button, or a
359
+ * view the adapter did not open.
360
+ * - Every command gives a `CommandInvoked`, known or not: the registry
361
+ * decides that later. `id` is `command` less its slash, `text` is `text`
362
+ * or the empty string, and the thread is the channel's.
363
+ * - A submit's thread and message are those of the click that opened the
364
+ * modal, which the adapter packed into `private_metadata` beside the
365
+ * consumer's metadata. A modal a command opened has no message, so its
366
+ * submit has no `messageId`.
367
+ * - The team in an address is `context.teamId`. `raw` is the payload
368
+ * without its verification `token`. A command's holds its `response_url`,
369
+ * so it is a credential for 30 minutes.
370
+ *
371
+ * @stability unstable
372
+ * @category normalization
373
+ * @since 4.1.5
374
+ */
375
+ export declare const normalizeInteraction: (payload: unknown, context: {
376
+ readonly teamId: string;
377
+ }) => Option.Option<ChatInteraction.Interaction>;
378
+ /**
379
+ * The normaliser, for Socket Mode or a consumer's own transport.
380
+ *
381
+ * **Details**
382
+ *
383
+ * - Pure: takes an `event_callback` envelope, gives zero or more events.
384
+ * - An envelope for another workspace gives none. The team in an address is
385
+ * the workspace, from the envelope's `team_id` or `authorizations`.
386
+ * - `message` and `app_mention` for one message give equal events. An
387
+ * `app_mention` that carries `edited` gives none.
388
+ * - A message subtype other than `file_share`, `thread_broadcast`,
389
+ * `bot_message` and `me_message` gives none.
390
+ * - Mentions come from the message's `rich_text` block when it has one,
391
+ * and only for elements whose token is in `text`, since Slack decides a
392
+ * mention from `text`. Without a `rich_text` block they come from `text`
393
+ * outside code.
394
+ * - The bot's own messages with a `rich_text` block read back with `text`
395
+ * rendered from the blocks as Markdown, whole and with its newlines, as
396
+ * the stored `text` the adapter sent may be cut. Everyone else's `text`
397
+ * is Slack's field as stored.
398
+ * - `agent_session_stopped` gives a `StopRequested`.
399
+ * - `raw` is the envelope without its verification `token`.
400
+ *
401
+ * @stability unstable
402
+ * @category normalization
403
+ * @since 4.1.5
404
+ */
405
+ export declare const normalize: (envelope: unknown, context: {
406
+ readonly teamId: string;
407
+ readonly botUserId: string;
408
+ }) => ReadonlyArray<ChatEvent>;
409
+ /**
410
+ * Slack options for every write inside an effect.
411
+ *
412
+ * @stability unstable
413
+ * @category models
414
+ * @since 4.1.5
415
+ */
416
+ export interface SlackPostOptions {
417
+ /** Which mention tokens may notify. Default: none. */
418
+ readonly notify?: {
419
+ readonly users?: ReadonlyArray<string> | undefined;
420
+ readonly groups?: ReadonlyArray<string> | undefined;
421
+ readonly broadcast?: boolean | undefined;
422
+ } | undefined;
423
+ /**
424
+ * Link and media previews. Default false, which sends `unfurl_links` and
425
+ * `unfurl_media` both false; true sends both true.
426
+ *
427
+ * **Details**
428
+ *
429
+ * - It applies to `post` only: `chat.update` has no unfurl parameter.
430
+ * An edit that adds a link gets no preview either way, which a live
431
+ * check confirmed, so a post-then-edit stream never unfurls.
432
+ * - Slack disables unfurling in streaming messages, so it does nothing on
433
+ * a native stream.
434
+ */
435
+ readonly unfurl?: boolean | undefined;
436
+ /** Default true where the workspace supports it. */
437
+ readonly nativeStream?: boolean | undefined;
438
+ /** For a Connect channel, where the recipient is on another team. */
439
+ readonly recipientTeamId?: string | undefined;
440
+ /** The agent session status at a normal end of a native stream. Default `active`. */
441
+ readonly sessionStatusAtEnd?: "active" | "processing" | "suspended" | "closed" | undefined;
442
+ }
443
+ /**
444
+ * Scoped Slack options for every write inside `effect`. Nested calls merge,
445
+ * the inner one winning field by field.
446
+ *
447
+ * @stability unstable
448
+ * @category combinators
449
+ * @since 4.1.5
450
+ */
451
+ export declare const withPostOptions: {
452
+ /**
453
+ * Scoped Slack options for every write inside `effect`. Nested calls merge,
454
+ * the inner one winning field by field.
455
+ *
456
+ * @stability unstable
457
+ * @category combinators
458
+ * @since 4.1.5
459
+ */
460
+ (options: SlackPostOptions): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
461
+ /**
462
+ * Scoped Slack options for every write inside `effect`. Nested calls merge,
463
+ * the inner one winning field by field.
464
+ *
465
+ * @stability unstable
466
+ * @category combinators
467
+ * @since 4.1.5
468
+ */
469
+ <A, E, R>(effect: Effect.Effect<A, E, R>, options: SlackPostOptions): Effect.Effect<A, E, R>;
470
+ };
471
+ /**
472
+ * A Slack emoji name, with or without colons and with at most one skin tone
473
+ * suffix (`+1::skin-tone-4`), as Unicode. `None` for a name the table
474
+ * doesn't know, such as a custom emoji, and for a name with two tones.
475
+ *
476
+ * @stability unstable
477
+ * @category emoji
478
+ * @since 4.1.5
479
+ */
480
+ export declare const emojiFromName: (name: string) => Option.Option<string>;
481
+ /**
482
+ * An emoji as its Slack name, without colons.
483
+ *
484
+ * @stability unstable
485
+ * @category emoji
486
+ * @since 4.1.5
487
+ */
488
+ export declare const emojiToName: (emoji: string) => Option.Option<string>;
489
+ /**
490
+ * Reads one Slack mention token, such as `<@U123>`, `<!subteam^S123|@team>`,
491
+ * `<#C123|name>` or `<!here>`, for `ChatTest.checkMessage`,
492
+ * `ChatTest.checkEvent` and `ChatTest.conformance`.
493
+ *
494
+ * @stability unstable
495
+ * @category testing
496
+ * @since 4.1.5
497
+ */
498
+ export declare const parseMention: ParseMention;
499
+ export {};
500
+ //# sourceMappingURL=SlackChat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlackChat.d.ts","sourceRoot":"","sources":["../src/SlackChat.ts"],"names":[],"mappings":"AA8CA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,uBAAuB,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,KAAK,eAAe,MAAM,6BAA6B,CAAA;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,KAAK,GAAG,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAWvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAA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