Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
fe9ac32
Add effect/chat with ChatTest and the conformance suite
tim-smart Nov 12, 2026
69626fd
Check listed capabilities in unsupported rules and stop neverUncertai…
tim-smart Nov 12, 2026
fce9e4c
Reject any Unsupported from a listed capability's probe
tim-smart Nov 12, 2026
6b02135
Add ChatMarkdown for long and streamed Markdown
tim-smart Nov 12, 2026
d227850
Fix ChatMarkdown review findings
tim-smart Nov 12, 2026
6e956b6
Fix ChatMarkdown interruption findings and TooLarge file fallback
tim-smart Nov 12, 2026
fb9c548
Start the finish timeout when the upstream fails during a write
tim-smart Nov 12, 2026
f6826f1
Send a failed reply's pending stop when the upstream fails
tim-smart Nov 12, 2026
cdc70d2
Add StopRequested to ChatEvent
tim-smart Nov 12, 2026
b7e482a
Add @effect/chat-slack
tim-smart Nov 12, 2026
9eeed74
Pace a Slack message's writes after a 429
tim-smart Nov 12, 2026
ceabd05
Fix @effect/chat-slack review findings
tim-smart Nov 12, 2026
4255e1a
Scope Slack's 429 backoff to a reply and fix mention alignment
tim-smart Nov 12, 2026
88001f7
Add captured Slack Events API deliveries as fixtures
tim-smart Nov 12, 2026
e8e2a1b
Add captured Slack deliveries for a person's messages and stops
tim-smart Nov 12, 2026
e0a1827
add @effect/chat-discord
tim-smart Nov 13, 2026
15d5d5a
chat-discord: record Tim's typed mention and DM to the bot
tim-smart Nov 13, 2026
242597b
chat-discord: skip an unreadable opener and reject invalid timestamps
tim-smart Nov 13, 2026
7e659bc
Fix Deno type checking of Discord live test responses
tim-smart Nov 13, 2026
74c6a35
Fix chat file refusal fallback and add conformance coverage
tim-smart Nov 13, 2026
f6efe9e
Tighten refused-file conformance checks and cleanup
tim-smart Nov 13, 2026
0c40597
Send Slack posts and updates as a markdown block plus an escaped text
tim-smart Nov 13, 2026
8ca8086
Escape literal Markdown in Slack read-backs and restore the one-tone …
tim-smart Nov 13, 2026
5290e19
Carry files on a Slack post by post-then-attach
tim-smart Nov 13, 2026
497faf5
Bound the whole Slack attach, retries and 429 waits included
tim-smart Nov 13, 2026
3b2bdc1
Add buttons and modals to effect/chat and ChatTest
tim-smart Nov 13, 2026
9f9d133
Fix late submit deadline, action placement and grapheme cuts in effec…
tim-smart Nov 13, 2026
fce4eac
Post actions after an unattached note that has no room for them
tim-smart Nov 13, 2026
9b07bbe
Add buttons, selects and modals to @effect/chat-discord, and mark ref…
tim-smart Nov 13, 2026
fd78d0e
Keep a Discord modal input whose id is __proto__, and say what the li…
tim-smart Nov 13, 2026
e78c86b
Fix Slack text truncation on Bun
tim-smart Nov 13, 2026
8948788
Record Discord's answers to action rows, custom_id lengths, unknown i…
tim-smart Nov 13, 2026
81a0a1a
Describe the Discord upload limit as a conservative bound in the reco…
tim-smart Nov 13, 2026
72b8b52
Stream Slack token shapes with a zero-width space and clean them up a…
tim-smart Nov 13, 2026
bbe8e42
Close the Slack stream escape's boundary, long-reference and label ga…
tim-smart Nov 13, 2026
2c3b82f
Set the Slack agent session status when an append finds the stream st…
tim-smart Nov 13, 2026
f36224f
Let the live Slack stream case run without a user token
tim-smart Nov 13, 2026
aab5fff
Keep the Slack session status pending until it is set
tim-smart Nov 13, 2026
469bec7
chat-slack: buttons, selects and modals
tim-smart Nov 13, 2026
1d73255
chat-slack: document the modal title, label and submit label rules
tim-smart Nov 13, 2026
ddda583
Hold trailing graphemes in ChatMarkdown stream releases
tim-smart Nov 13, 2026
c69fedc
Keep preceding grapheme when a stream delta splits a surrogate
tim-smart Nov 13, 2026
c6b05eb
Preserve refused overflow text and bound Slack webhook requests
tim-smart Nov 13, 2026
0417a85
Close the effect/chat gaps found by the Janitor dogfood
tim-smart Nov 13, 2026
d950f2d
Document download bytes, getUser raw and the adapter services
tim-smart Nov 13, 2026
f4152d1
Add slash commands, private replies and followUp to effect/chat
tim-smart Nov 14, 2026
e75284f
chat-slack: slash commands, private replies and followUp
tim-smart Nov 14, 2026
25a4584
chat-discord: slash commands, private replies, followUp and commandRe…
tim-smart Nov 14, 2026
fde906a
chat: recorded slash command fixtures, and docs from the EFF-3802 cap…
tim-smart Nov 14, 2026
d72dafa
chat: apply the decisions on the EFF-3802 captures
tim-smart Nov 14, 2026
1943966
chat-discord: send followUp once, without the shared retry
tim-smart Nov 14, 2026
705e6e1
chat-discord: send followUp over the plain HttpClient, so dfx does no…
tim-smart Nov 14, 2026
f3e4350
Fix Slack command assertion under Deno types
tim-smart Nov 14, 2026
a2d9bb9
Consolidate chat release notes into one changeset
tim-smart Nov 15, 2026
e121c5b
Reduce effect/chat tests to the distinct contracts and regressions
tim-smart Nov 15, 2026
2f2a526
Trim repetitive chat implementation comments
tim-smart Nov 15, 2026
cfcdec3
Restore unsigned webhook, select-origin modal and message lookup boun…
tim-smart Nov 15, 2026
d901645
Apply suggestion from @tim-smart
tim-smart Nov 15, 2026
f8da888
Check the channel of Slack's single-message lookup
tim-smart Nov 15, 2026
a4bf326
Use the Mac service for Slack signature verification
tim-smart Nov 15, 2026
2ec59f0
Post each streamed part once on an adapter without edit
tim-smart Nov 15, 2026
5569669
Use a short label for the conformance length button
tim-smart Nov 15, 2026
a7b574d
Add the WhatsApp Cloud API adapter
tim-smart Nov 15, 2026
b2ecdb3
Add the Microsoft Teams adapter
tim-smart Nov 15, 2026
5aa5694
Fix the WhatsApp review findings
tim-smart Nov 15, 2026
153e2c4
Fix the second round of WhatsApp review findings
tim-smart Nov 15, 2026
95ed7dd
Protect chat interaction startup from caller cancellation
tim-smart Nov 15, 2026
d18a86c
Fix the Teams review findings
tim-smart Nov 15, 2026
b9f5b3a
Keep a tab's leftover columns when matching a nested fence's closer
tim-smart Nov 15, 2026
c474fd0
Keep indented code inside quotes and list items as typed
tim-smart Nov 15, 2026
7965713
Count the whole signed dialog token against the Teams modal cap
tim-smart Nov 15, 2026
a81ad78
Add the Telegram Bot API adapter
tim-smart Nov 15, 2026
cfacbdf
Narrow Teams webhook test JSON for Deno
tim-smart Nov 15, 2026
81c7cbb
Set an explicit heap budget for the full Node CI suite
tim-smart Nov 15, 2026
92929b6
Fix Telegram renderer bypasses and cover durable acceptance
tim-smart Nov 15, 2026
360e36e
chat-telegram: conservative escaping for ambiguous Markdown, deadline…
tim-smart Nov 15, 2026
3df85a1
chat-telegram: treat only space and tab lines as blank in the renderer
tim-smart Nov 15, 2026
9a101a1
test(chat-slack): isolate modal refusal from wall-clock deadline
tim-smart Nov 15, 2026
329de2f
Reconcile the WhatsApp adapter with the live API checks
tim-smart Nov 15, 2026
a52fcf6
Scope the WhatsApp counting and messaging account docs to what was ch…
tim-smart Nov 16, 2026
9a5da60
chat-telegram: fix what the production live checks found
tim-smart Nov 16, 2026
754c1b6
chat-telegram: record live checks 8 and 9
tim-smart Nov 16, 2026
7ec491b
chat-telegram: make the package publishable
tim-smart Nov 16, 2026
418065f
chat-telegram: keep a destination only behind an unambiguous label
tim-smart Nov 16, 2026
1c7e7e6
chat-telegram: record live checks 6 and 12
tim-smart Nov 16, 2026
1e2ab2f
chat-telegram: record the forged click check
tim-smart Nov 16, 2026
173358c
chat-telegram: keep a definition only where its label and destination…
tim-smart Nov 16, 2026
f6fafdf
chat-telegram: bound a kept label's rendered length and a destination…
tim-smart Nov 16, 2026
7ad4fee
Cut effect/chat and adapter tests to distinct contracts, boundaries a…
tim-smart Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"@effect/ai-openai-compat",
"@effect/ai-openrouter",
"@effect/atom-react",
"@effect/chat-slack",
"@effect/chat-whatsapp",
"@effect/chat-discord",
"@effect/chat-telegram",
"@effect/atom-solid",
"@effect/atom-vue",
"@effect/docgen",
Expand Down
13 changes: 13 additions & 0 deletions .changeset/effect-chat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"effect": patch
"@effect/chat-slack": patch
"@effect/chat-discord": patch
"@effect/chat-whatsapp": patch
"@effect/chat-telegram": patch
---

Add unstable `effect/chat` APIs and Slack, Discord, WhatsApp and Telegram adapters for chat bots, with grapheme-safe Markdown streaming, buttons, selects, modals, slash commands, private/deferred command replies, and adapter conformance testing.

Slack webhook and interactivity layers, and the WhatsApp webhook layer, require a `Mac` service. Provide a runtime layer such as `NodeCrypto.layerMac`, or `Mac.layerWebCrypto` with `SecureRandom.layerWebCrypto`.

`Jwks.makeRemote` accepts a `filter` option that drops raw keys before they are decoded.
3 changes: 2 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ jobs:
node: ""
deno: ""
bun: ""
command: pnpm test --max-concurrency=10
# The full suite exceeds Node's default ~2 GiB heap on this runner.
command: NODE_OPTIONS=--max-old-space-size=4096 pnpm test --max-concurrency=10
# Node 25 and older handle upgrade request bodies differently.
- runtime: Node 24 (platform-node)
node: 24
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
run: pnpm build
- name: Create snapshot
id: snapshot
run: pnpm exec pkg-pr-new publish --pnpm --comment=off ./packages/* ./packages/atom/* ./packages/ai/* ./packages/platform/* ./packages/sql/* ./packages/tools/*
run: pnpm exec pkg-pr-new publish --pnpm --comment=off ./packages/* ./packages/atom/* ./packages/ai/* ./packages/chat/* ./packages/platform/* ./packages/sql/* ./packages/tools/*
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ This monorepo contains the core `effect` package alongside integration packages
| [`@effect/ai-typesafe`](packages/ai/typesafe) | TypeSafe decision provider for the Effect AI modules | [docs](https://effect.website/docs/v4/api/ai-typesafe) |
| [`@effect/ai-openai-compat`](packages/ai/openai-compat) | OpenAI-compatible API provider for the Effect AI modules | [docs](https://effect.website/docs/v4/api/ai-openai-compat) |
| [`@effect/ai-openrouter`](packages/ai/openrouter) | OpenRouter provider for the Effect AI modules | [docs](https://effect.website/docs/v4/api/ai-openrouter) |
| [`@effect/chat-slack`](packages/chat/slack) | Slack adapter for `effect/chat` | [docs](https://effect.website/docs/v4/api/chat-slack) |
| [`@effect/chat-whatsapp`](packages/chat/whatsapp) | WhatsApp Cloud API adapter for `effect/chat` | [docs](https://effect.website/docs/v4/api/chat-whatsapp) |
| [`@effect/chat-discord`](packages/chat/discord) | Discord adapter for `effect/chat` | [docs](https://effect.website/docs/v4/api/chat-discord) |
| [`@effect/chat-telegram`](packages/chat/telegram) | Telegram Bot API adapter for `effect/chat` | [docs](https://effect.website/docs/v4/api/chat-telegram) |
| [`@effect/atom-react`](packages/atom/react) | React bindings for Effect Atom | [docs](https://effect.website/docs/v4/api/atom-react) |
| [`@effect/atom-solid`](packages/atom/solid) | SolidJS bindings for Effect Atom | [docs](https://effect.website/docs/v4/api/atom-solid) |
| [`@effect/atom-vue`](packages/atom/vue) | Vue bindings for Effect Atom | [docs](https://effect.website/docs/v4/api/atom-vue) |
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/denoland/deno/refs/heads/main/cli/schemas/config-file.v1.json",
"nodeModulesDir": "manual",
"unstable": ["bare-node-builtins", "node-globals", "net"],
"workspace": ["./packages/*", "./packages/platform/*"],
"workspace": ["./packages/*", "./packages/chat/*", "./packages/platform/*"],
"exclude": [
"**/*.mjs",
"**/*.cjs",
Expand Down
27 changes: 27 additions & 0 deletions packages/chat/discord/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# @effect/chat-discord

A [Discord](https://discord.com) adapter for `effect/chat`, built on [dfx](https://github.com/tim-smart/dfx). Includes structural entries for gateway dispatches and interactions, pure normalisers, default gateway layers, buttons, selects and modals, and every adapter op over dfx's REST client.

The adapter reads message text, so the application needs the privileged **Message Content** intent, switched on in Discord's developer portal and requested in your dfx gateway config. Without it, message text is empty unless the message mentions the bot, and attachments are missing.

## Installation

```sh
npm install effect dfx @effect/chat-discord
```

## Links

- [Website](https://effect.website): documentation, guides, and news.
- [Reference](https://effect.website/docs/v4/api/chat-discord): API documentation for this package.
- [Discord](https://discord.gg/effect-ts): ask questions, share what you're building, and talk to the core team.
- [Community](https://effect.website/community-hub): meetups and events, or bring Effect to your own.
- [Issues](https://github.com/Effect-TS/effect/issues): bug reports and feature requests.

## Let's talk

Whether your team is considering Effect, rolling it out, or already running it in production, we'd love to hear from you: what you're building, what works, and what you need from Effect next.

- **Talk to the maintainers.** Introduce your team on [Discord](https://discord.gg/effect-ts) or email [contact@effectful.co](mailto:contact@effectful.co). We're happy to connect privately on Slack or Discord for feedback and help with adoption.
- **Production support.** We're exploring how to better support teams running Effect in production. If your organization has specific support needs, let's discuss them.
- **Adoption help.** Our [adoption partners](https://effect.website/adoption-partners) offer implementation, consulting, team extension, training, and commercial support.
71 changes: 71 additions & 0 deletions packages/chat/discord/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "@effect/chat-discord",
"version": "4.1.4",
"type": "module",
"license": "MIT",
"description": "The Discord adapter for effect/chat",
"homepage": "https://effect.website",
"repository": {
"type": "git",
"url": "https://github.com/Effect-TS/effect.git",
"directory": "packages/chat/discord"
},
"bugs": {
"url": "https://github.com/Effect-TS/effect/issues"
},
"tags": [
"typescript",
"chat",
"discord"
],
"keywords": [
"typescript",
"chat",
"discord"
],
"sideEffects": [],
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts",
"./*": "./src/*.ts",
"./internal/*": null,
"./index": null,
"./*/index": null
},
"files": [
"src/**/*.ts",
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map",
"AGENTS.md",
"CLAUDE.md",
"ai-docs/**/*"
],
"publishConfig": {
"access": "public",
"provenance": true,
"exports": {
"./package.json": "./package.json",
".": "./dist/index.js",
"./*": "./dist/*.js",
"./internal/*": null,
"./index": null,
"./*/index": null
}
},
"scripts": {
"codegen": "effect-utils codegen",
"build": "tsc -b tsconfig.json && pnpm babel",
"babel": "babel dist --plugins annotate-pure-calls --out-dir dist --source-maps",
"check": "tsc -b tsconfig.json"
},
"devDependencies": {
"dfx": "^1.1.1",
"effect": "workspace:^"
},
"peerDependencies": {
"dfx": "^1.1.1",
"effect": "workspace:^"
}
}
Loading
Loading