@crvouga/mockingbird-service-slack 3.7.0 → 3.8.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Changelog — @crvouga/mockingbird-service-slack
2
2
 
3
- ## 3.7.0 (2026-10-19)
3
+ ## 3.8.0 (2026-10-21)
4
+
5
+ ### Features
6
+
7
+ - raise the serve and fleet body limit to the S3 maximum ([86b9e2b](https://github.com/crvouga/mockingbird/commit/86b9e2b80bcaaaef57f52edbac50b27da0b42f33))
8
+ - validate block limits, filter nutrients, list block children ([2acb823](https://github.com/crvouga/mockingbird/commit/2acb823ba66b30f3d03221996e015c127b0f72c6))
9
+
10
+ ## 3.7.0 (2026-10-18)
4
11
 
5
12
  ### Features
6
13
 
package/README.md CHANGED
@@ -64,7 +64,7 @@ await server.close()
64
64
 
65
65
  | Route | Behaviour |
66
66
  | --- | --- |
67
- | `POST /services/{T}/{B}/{X}` | Incoming webhook. JSON `{text, blocks?, attachments?, thread_ts?}` (or form `payload=<json>`) → `200 ok` (text/plain). `400 invalid_payload` (not a JSON object), `400 no_text` (no text, blocks or attachments), `400 invalid_blocks`, `400 too_many_attachments`, `404 no_service` (unregistered hook, once any hook is registered), `404 channel_not_found`, `410 channel_is_archived`. |
67
+ | `POST /services/{T}/{B}/{X}` | Incoming webhook. JSON `{text, blocks?, attachments?, thread_ts?}` (or form `payload=<json>`) → `200 ok` (text/plain). `400 invalid_payload` (not a JSON object), `400 no_text` (no text, blocks or attachments), `400 invalid_blocks` (structure and Block Kit limits, also inside `attachments[].blocks`; see below), `400 too_many_attachments`, `404 no_service` (unregistered hook, once any hook is registered), `404 channel_not_found`, `410 channel_is_archived`. |
68
68
  | `POST /api/chat.postMessage` | `{channel, text?, blocks?, attachments?, thread_ts?, unfurl_links?}` → `{ok, channel, ts, message}`. `channel` is an id or `#name`; unknown channels are created on first use unless `strictChannels`. The outbox keeps `text`, `blocks`, `unfurl_links`, `thread_ts`, and `workspace` (the team id). Errors: `channel_not_found`, `no_text`, `invalid_blocks`, `invalid_blocks_format`, `msg_too_long`, `is_archived`. |
69
69
  | `POST /api/chat.update` | `{channel, ts, text?, blocks?}` → `{ok, channel, ts, text, message}` with `edited`; `message_not_found`, `cant_update_message` (webhook posts). Omitted blocks are kept. |
70
70
  | `POST /api/chat.postEphemeral` | `{channel, user, text}` → `{ok, message_ts}`; `user_not_found`. Recorded in the outbox with `ephemeral: true`. |
@@ -132,6 +132,20 @@ maps a bot token or a webhook's `T/B/X` path to a namespace.
132
132
  trigger-id expiry for `views.open`.
133
133
  - Message formatting (mrkdwn parsing, link unfurling, mention resolution): text and blocks are
134
134
  stored verbatim.
135
+ - Block Kit limits are a **best guess, not oracle-verified** (from the per-block pages on
136
+ docs.slack.dev; the exact status and message Slack returns for each rule was never observed
137
+ live). `blocks` and each `attachments[].blocks` are rejected as `invalid_blocks` (webhook: `400
138
+ invalid_blocks`; `chat.postMessage`, `chat.update`, `chat.postEphemeral`: `200 {ok: false, error:
139
+ "invalid_blocks", response_metadata: {messages}}`, the messages being the emulator's own wording)
140
+ when: there are more than 50 blocks (in each array; whether Slack applies 50 inside attachments is
141
+ unconfirmed); a block's `type` is not a Block Kit block type; a `section` `text` is over 3000
142
+ characters or its `fields` are over 10 items or 2000 characters each; a `header` `text` is not
143
+ `plain_text` or is over 150 characters; `context` has over 10 `elements` or `actions` over 25; a
144
+ `block_id` is over 255 characters; a text object is empty. Exactly-at-limit values are accepted
145
+ and stored verbatim, and a rejected message stores nothing (an update leaves the original
146
+ untouched). Required-field rules (a `section` with neither `text` nor `fields`, an `image`
147
+ without `alt_text`), element-level validation inside `actions` / `context` / `input` / `rich_text`,
148
+ and the other attachment fields are not modelled.
135
149
 
136
150
  ## API
137
151
 
@@ -14,7 +14,7 @@ import {
14
14
  resolveAdminPrefix,
15
15
  restoreClock,
16
16
  unbindSocketTransport
17
- } from "./chunk-WBNF7Q2J.js";
17
+ } from "./chunk-LQUZASGQ.js";
18
18
 
19
19
  // ../../adapters/node/dist/cli.js
20
20
  import { readFile as readFile5 } from "node:fs/promises";
@@ -3062,7 +3062,7 @@ async function preflightFleet(config, options) {
3062
3062
  break;
3063
3063
  }
3064
3064
  }
3065
- targets.set(name, { ...target, packageVersion: packageVersion ?? "3.7.0" });
3065
+ targets.set(name, { ...target, packageVersion: packageVersion ?? "3.8.0" });
3066
3066
  } catch (error) {
3067
3067
  throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
3068
3068
  }
@@ -3288,7 +3288,11 @@ var serve = async (api, options = {}) => {
3288
3288
  // ../../adapters/node/dist/listen.js
3289
3289
  var listen = async (api, options = {}) => {
3290
3290
  const host = options.host ?? "127.0.0.1";
3291
- const server = await serve(api, { port: options.port ?? 0, host });
3291
+ const server = await serve(api, {
3292
+ port: options.port ?? 0,
3293
+ host,
3294
+ ...options.maxBodyBytes !== void 0 ? { maxBodyBytes: options.maxBodyBytes } : {}
3295
+ });
3292
3296
  const address = server.address();
3293
3297
  const port = typeof address === "object" && address !== null ? address.port : options.port ?? 0;
3294
3298
  const shown = host.includes(":") ? `[${host}]` : host;
@@ -3487,7 +3491,8 @@ var httpChild = async (target, entry, options, admission, generation, privateAcc
3487
3491
  try {
3488
3492
  server = await listen(api, {
3489
3493
  port: entry.port ?? target.defaultPort,
3490
- host: entry.host ?? "127.0.0.1"
3494
+ host: entry.host ?? "127.0.0.1",
3495
+ ...target.maxBodyBytes !== void 0 ? { maxBodyBytes: target.maxBodyBytes } : {}
3491
3496
  });
3492
3497
  target.listening?.(server);
3493
3498
  } catch (error) {
@@ -4878,7 +4883,11 @@ var start = async (target, values, config) => {
4878
4883
  });
4879
4884
  if (config.idBase !== void 0)
4880
4885
  runtime.setIdBase?.(config.idBase);
4881
- const listening = await listen(runtime, { port: config.port, host: config.host });
4886
+ const listening = await listen(runtime, {
4887
+ port: config.port,
4888
+ host: config.host,
4889
+ ...target.maxBodyBytes !== void 0 ? { maxBodyBytes: target.maxBodyBytes } : {}
4890
+ });
4882
4891
  target.listening?.(listening);
4883
4892
  console.log(`${target.name} emulator listening on ${listening.url}`);
4884
4893
  console.log(`${target.name} health: GET ${listening.url}${adminPrefix}/health`);
@@ -5374,4 +5383,4 @@ export {
5374
5383
  createServer2 as createServer,
5375
5384
  serveTarget
5376
5385
  };
5377
- //# sourceMappingURL=chunk-OIN4LUJA.js.map
5386
+ //# sourceMappingURL=chunk-H3RHERS3.js.map