Minor Changes
-
e7a396a: Add two shared behavioral test contracts for adapter authors:
threadIdContract— verifies an adapter's thread-id codec round-trips (decode(encode(x))), prefixes ids with the adapter name, matches any pinned encoded strings, and (optionally) distinguishes DM from non-DM threads.selfMessageContract— verifies an adapter dispatches inbound messages from other users (toprocessMessageby default) but ignores messages the bot authored itself, so it never replies to itself. Requires the matchers to be registered viasetupFiles: ["@chat-adapter/tests/setup"].
-
a7fb1bc: Add
connectWebhookContract, a shared Vitest suite for verifying an adapter's Vercel Connect webhook verification. Given a small per-adapter descriptor (how to build the adapter in Connect mode and craft an inbound webhook), it asserts the behavior every Connect-capable adapter shares: awebhookVerifierreplaces the native signature/secret check and gates inbound requests — accept (200) on a truthy result, reject (401) on a thrown error or falsy result — and is invoked with the request and raw body. Connect-capable adapters can opt in with ~10 lines.