@crvouga/mockingbird-service-slack 3.11.0 → 3.12.1

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,19 @@
1
1
  # Changelog — @crvouga/mockingbird-service-slack
2
2
 
3
- ## 3.11.0 (2026-11-11)
3
+ ## 3.12.1 (2026-11-12)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - serve vendor brand data from each emulator instead of the docs site ([0c72a69](https://github.com/crvouga/mockingbird/commit/0c72a693fc76e612936150598faef9787ad1c824))
8
+ - take SIGINT/SIGTERM before readiness is published ([d5a98a0](https://github.com/crvouga/mockingbird/commit/d5a98a09a344e12818c5c94cbea03621b528f841))
9
+
10
+ ## 3.12.0 (2026-11-11)
11
+
12
+ ### Features
13
+
14
+ - one dashboard for every admin UI and notification view ([d9fdf4d](https://github.com/crvouga/mockingbird/commit/d9fdf4dc1faeaa5c385f34bd5516323e49284b4d))
15
+
16
+ ## 3.11.0 (2026-11-10)
4
17
 
5
18
  ### Features
6
19
 
package/DISCOVERY.md CHANGED
@@ -4,6 +4,35 @@ This is the installed-package index for coding agents and tooling. All relative
4
4
  inside `node_modules/@crvouga/mockingbird-service-slack/`; no repository checkout is needed to discover the emulator's
5
5
  supported surface or documented behavior.
6
6
 
7
+ ## Run it in a fleet
8
+
9
+ The recommended way to run this emulator is in a fleet, next to the other emulators the
10
+ application calls: one `mockingbird.json`, one process, each emulator on its own port.
11
+
12
+ ```sh
13
+ npm install -D @crvouga/mockingbird-fleet @crvouga/mockingbird-service-slack
14
+ ```
15
+
16
+ `mockingbird.json` (add one entry per installed emulator; `"port": 0` picks a free port):
17
+
18
+ ```json
19
+ {
20
+ "services": {
21
+ "slack": { "port": 0 }
22
+ }
23
+ }
24
+ ```
25
+
26
+ ```sh
27
+ npx mockingbird-fleet serve --config mockingbird.json --dashboard --ready-file ready.json
28
+ ```
29
+
30
+ Read this emulator's URL from `services.<name>.url` in `ready.json` and point the client at it.
31
+ `adminBase` in the same file is the fleet controller, which resets, snapshots and restores every
32
+ emulator in one call, and `dashboard` is one page with every HTTP emulator's admin UI and the
33
+ notifications the application sent. The guide: <https://mockingbird.chrisvouga.dev/docs/fleets>. The README covers running this
34
+ emulator alone or in-process.
35
+
7
36
  ## Capability and behavior sources
8
37
 
9
38
  | Question | Authoritative file | What it contains |
@@ -1,3 +1,6 @@
1
+ // <define:__MOCKINGBIRD_ADMIN_BRAND__>
2
+ var define_MOCKINGBIRD_ADMIN_BRAND_default = { vendor: "Slack", website: "https://slack.com", docs: "https://docs.slack.dev/reference/methods", guide: "https://mockingbird.chrisvouga.dev/services/slack", logo: "data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjNEExNTRCIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+U2xhY2s8L3RpdGxlPjxwYXRoIGQ9Ik01LjA0MiAxNS4xNjVhMi41MjggMi41MjggMCAwIDEtMi41MiAyLjUyM0EyLjUyOCAyLjUyOCAwIDAgMSAwIDE1LjE2NWEyLjUyNyAyLjUyNyAwIDAgMSAyLjUyMi0yLjUyaDIuNTJ2Mi41MnpNNi4zMTMgMTUuMTY1YTIuNTI3IDIuNTI3IDAgMCAxIDIuNTIxLTIuNTIgMi41MjcgMi41MjcgMCAwIDEgMi41MjEgMi41MnY2LjMxM0EyLjUyOCAyLjUyOCAwIDAgMSA4LjgzNCAyNGEyLjUyOCAyLjUyOCAwIDAgMS0yLjUyMS0yLjUyMnYtNi4zMTN6TTguODM0IDUuMDQyYTIuNTI4IDIuNTI4IDAgMCAxLTIuNTIxLTIuNTJBMi41MjggMi41MjggMCAwIDEgOC44MzQgMGEyLjUyOCAyLjUyOCAwIDAgMSAyLjUyMSAyLjUyMnYyLjUySDguODM0ek04LjgzNCA2LjMxM2EyLjUyOCAyLjUyOCAwIDAgMSAyLjUyMSAyLjUyMSAyLjUyOCAyLjUyOCAwIDAgMS0yLjUyMSAyLjUyMUgyLjUyMkEyLjUyOCAyLjUyOCAwIDAgMSAwIDguODM0YTIuNTI4IDIuNTI4IDAgMCAxIDIuNTIyLTIuNTIxaDYuMzEyek0xOC45NTYgOC44MzRhMi41MjggMi41MjggMCAwIDEgMi41MjItMi41MjFBMi41MjggMi41MjggMCAwIDEgMjQgOC44MzRhMi41MjggMi41MjggMCAwIDEtMi41MjIgMi41MjFoLTIuNTIyVjguODM0ek0xNy42ODggOC44MzRhMi41MjggMi41MjggMCAwIDEtMi41MjMgMi41MjEgMi41MjcgMi41MjcgMCAwIDEtMi41Mi0yLjUyMVYyLjUyMkEyLjUyNyAyLjUyNyAwIDAgMSAxNS4xNjUgMGEyLjUyOCAyLjUyOCAwIDAgMSAyLjUyMyAyLjUyMnY2LjMxMnpNMTUuMTY1IDE4Ljk1NmEyLjUyOCAyLjUyOCAwIDAgMSAyLjUyMyAyLjUyMkEyLjUyOCAyLjUyOCAwIDAgMSAxNS4xNjUgMjRhMi41MjcgMi41MjcgMCAwIDEtMi41Mi0yLjUyMnYtMi41MjJoMi41MnpNMTUuMTY1IDE3LjY4OGEyLjUyNyAyLjUyNyAwIDAgMS0yLjUyLTIuNTIzIDIuNTI2IDIuNTI2IDAgMCAxIDIuNTItMi41Mmg2LjMxM0EyLjUyNyAyLjUyNyAwIDAgMSAyNCAxNS4xNjVhMi41MjggMi41MjggMCAwIDEtMi41MjIgMi41MjNoLTYuMzEzeiIvPjwvc3ZnPg==", color: "#4A154B", description: "Boost productivity and save time with Slack \u2014 the AI work platform for managing projects, automating workflows, and connecting teams securely. Start working smarter today." };
3
+
1
4
  // ../../http/provider/dist/vendor/core/crypto.js
2
5
  import { hmac } from "@noble/hashes/hmac.js";
3
6
  import { sha1 } from "@noble/hashes/legacy.js";
@@ -85,6 +88,7 @@ function timingSafeEqual(a, b) {
85
88
  }
86
89
 
87
90
  export {
91
+ define_MOCKINGBIRD_ADMIN_BRAND_default,
88
92
  createHash,
89
93
  createHmac,
90
94
  useRandom,
@@ -94,4 +98,4 @@ export {
94
98
  randomUUID,
95
99
  timingSafeEqual
96
100
  };
97
- //# sourceMappingURL=chunk-6Z2MR3PO.js.map
101
+ //# sourceMappingURL=chunk-3IUSFYOG.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["<define:__MOCKINGBIRD_ADMIN_BRAND__>", "../../../http/provider/src/vendor/core/crypto.ts"],
4
+ "sourcesContent": ["{\"vendor\":\"Slack\",\"website\":\"https://slack.com\",\"docs\":\"https://docs.slack.dev/reference/methods\",\"guide\":\"https://mockingbird.chrisvouga.dev/services/slack\",\"logo\":\"data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjNEExNTRCIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+U2xhY2s8L3RpdGxlPjxwYXRoIGQ9Ik01LjA0MiAxNS4xNjVhMi41MjggMi41MjggMCAwIDEtMi41MiAyLjUyM0EyLjUyOCAyLjUyOCAwIDAgMSAwIDE1LjE2NWEyLjUyNyAyLjUyNyAwIDAgMSAyLjUyMi0yLjUyaDIuNTJ2Mi41MnpNNi4zMTMgMTUuMTY1YTIuNTI3IDIuNTI3IDAgMCAxIDIuNTIxLTIuNTIgMi41MjcgMi41MjcgMCAwIDEgMi41MjEgMi41MnY2LjMxM0EyLjUyOCAyLjUyOCAwIDAgMSA4LjgzNCAyNGEyLjUyOCAyLjUyOCAwIDAgMS0yLjUyMS0yLjUyMnYtNi4zMTN6TTguODM0IDUuMDQyYTIuNTI4IDIuNTI4IDAgMCAxLTIuNTIxLTIuNTJBMi41MjggMi41MjggMCAwIDEgOC44MzQgMGEyLjUyOCAyLjUyOCAwIDAgMSAyLjUyMSAyLjUyMnYyLjUySDguODM0ek04LjgzNCA2LjMxM2EyLjUyOCAyLjUyOCAwIDAgMSAyLjUyMSAyLjUyMSAyLjUyOCAyLjUyOCAwIDAgMS0yLjUyMSAyLjUyMUgyLjUyMkEyLjUyOCAyLjUyOCAwIDAgMSAwIDguODM0YTIuNTI4IDIuNTI4IDAgMCAxIDIuNTIyLTIuNTIxaDYuMzEyek0xOC45NTYgOC44MzRhMi41MjggMi41MjggMCAwIDEgMi41MjItMi41MjFBMi41MjggMi41MjggMCAwIDEgMjQgOC44MzRhMi41MjggMi41MjggMCAwIDEtMi41MjIgMi41MjFoLTIuNTIyVjguODM0ek0xNy42ODggOC44MzRhMi41MjggMi41MjggMCAwIDEtMi41MjMgMi41MjEgMi41MjcgMi41MjcgMCAwIDEtMi41Mi0yLjUyMVYyLjUyMkEyLjUyNyAyLjUyNyAwIDAgMSAxNS4xNjUgMGEyLjUyOCAyLjUyOCAwIDAgMSAyLjUyMyAyLjUyMnY2LjMxMnpNMTUuMTY1IDE4Ljk1NmEyLjUyOCAyLjUyOCAwIDAgMSAyLjUyMyAyLjUyMkEyLjUyOCAyLjUyOCAwIDAgMSAxNS4xNjUgMjRhMi41MjcgMi41MjcgMCAwIDEtMi41Mi0yLjUyMnYtMi41MjJoMi41MnpNMTUuMTY1IDE3LjY4OGEyLjUyNyAyLjUyNyAwIDAgMS0yLjUyLTIuNTIzIDIuNTI2IDIuNTI2IDAgMCAxIDIuNTItMi41Mmg2LjMxM0EyLjUyNyAyLjUyNyAwIDAgMSAyNCAxNS4xNjVhMi41MjggMi41MjggMCAwIDEtMi41MjIgMi41MjNoLTYuMzEzeiIvPjwvc3ZnPg==\",\"color\":\"#4A154B\",\"description\":\"Boost productivity and save time with Slack \u2014 the AI work platform for managing projects, automating workflows, and connecting teams securely. Start working smarter today.\"}", "import { hmac } from \"@noble/hashes/hmac.js\"\nimport { sha1 } from \"@noble/hashes/legacy.js\"\nimport { md5 } from \"@noble/hashes/legacy.js\"\nimport { sha256 } from \"@noble/hashes/sha2.js\"\nimport { Buffer } from \"buffer\"\n\nconst digest = (algorithm: string) => {\n if (algorithm === \"sha256\") return sha256\n if (algorithm === \"sha1\") return sha1\n if (algorithm === \"md5\") return md5\n throw new Error(`Unsupported digest ${algorithm}`)\n}\nconst bytes = (input: string | Uint8Array) => typeof input === \"string\" ? new TextEncoder().encode(input) : input\ninterface Hash {\n update(input: string | Uint8Array): Hash\n digest(): Buffer\n digest(encoding: string): string\n}\nexport function createHash(algorithm: string): Hash {\n const parts: Uint8Array[] = []\n const hash = {\n update(input: string | Uint8Array) { parts.push(bytes(input)); return hash },\n digest(encoding?: string): Buffer | string {\n const result = Buffer.from(digest(algorithm)(Buffer.concat(parts)))\n return encoding === \"base64url\" ? result.toString(\"base64\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\") : encoding ? result.toString(encoding as BufferEncoding) : result\n },\n }\n return hash as Hash\n}\nexport function createHmac(algorithm: string, key: string | Uint8Array): Hash {\n const parts: Uint8Array[] = []\n const hash = {\n update(input: string | Uint8Array) { parts.push(bytes(input)); return hash },\n digest(encoding?: string): Buffer | string {\n const result = Buffer.from(hmac(digest(algorithm), bytes(key), Buffer.concat(parts)))\n return encoding === \"base64url\" ? result.toString(\"base64\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/, \"\") : encoding ? result.toString(encoding as BufferEncoding) : result\n },\n }\n return hash as Hash\n}\n/**\n * Mockingbird: where ids and tokens come from. With a seeded stream in place, everything the\n * vendor code mints replays from the seed; without one it is the platform's own randomness.\n */\nlet source: (() => number) | undefined\n/** Mint from `next` (a seeded stream of `[0, 1)`) until told otherwise. */\nexport function useRandom(next: (() => number) | undefined): void { source = next }\n/** Mint from `next` for one synchronous section, then put the previous source back. */\nexport function withRandom<T>(next: (() => number) | undefined, run: () => T): T {\n const previous = source\n source = next\n try { return run() } finally { source = previous }\n}\n/** `Math.random`, from the seeded stream when one is in place. */\nexport function random(): number { return source ? source() : Math.random() }\nexport function randomBytes(length: number): Buffer {\n if (!source) return Buffer.from(crypto.getRandomValues(new Uint8Array(length)))\n const out = new Uint8Array(length)\n for (let i = 0; i < length; i++) out[i] = Math.floor(source() * 256)\n return Buffer.from(out)\n}\nexport function randomUUID(): string {\n if (!source) return crypto.randomUUID()\n const b = randomBytes(16)\n b[6] = (b[6] & 0x0f) | 0x40\n b[8] = (b[8] & 0x3f) | 0x80\n const hex = b.toString(\"hex\")\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`\n}\nexport function timingSafeEqual(a: Uint8Array, b: Uint8Array): boolean {\n if (a.length !== b.length) throw new Error(\"Buffers must have equal lengths\")\n let difference = 0\n for (let i = 0; i < a.length; i++) difference |= a[i] ^ b[i]\n return difference === 0\n}\n"],
5
+ "mappings": ";AAAA,+CAAC,QAAS,SAAQ,SAAU,qBAAoB,MAAO,4CAA2C,OAAQ,qDAAoD,MAAO,8gDAA6gD,OAAQ,WAAU,aAAc,mLAA6K;;;ACA/3D,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,cAAc;AACvB,SAAS,cAAc;AAEvB,IAAM,SAAS,CAAC,cAAqB;AACnC,MAAI,cAAc;AAAU,WAAO;AACnC,MAAI,cAAc;AAAQ,WAAO;AACjC,MAAI,cAAc;AAAO,WAAO;AAChC,QAAM,IAAI,MAAM,sBAAsB,SAAS,EAAE;AACnD;AACA,IAAM,QAAQ,CAAC,UAA+B,OAAO,UAAU,WAAW,IAAI,YAAW,EAAG,OAAO,KAAK,IAAI;AAMtG,SAAU,WAAW,WAAiB;AAC1C,QAAM,QAAsB,CAAA;AAC5B,QAAM,OAAO;IACX,OAAO,OAA0B;AAAI,YAAM,KAAK,MAAM,KAAK,CAAC;AAAG,aAAO;IAAK;IAC3E,OAAO,UAAiB;AACtB,YAAM,SAAS,OAAO,KAAK,OAAO,SAAS,EAAE,OAAO,OAAO,KAAK,CAAC,CAAC;AAClE,aAAO,aAAa,cAAc,OAAO,S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