summary
support multi-tenant BYOK chat bots where each customer can bring their own platform credentials while the app runs through one stable Chat SDK runtime
today, some adapters have adapter-specific multi-tenant paths, like Slack multi-workspace installs, Linear OAuth installs, and GitHub App installations. However, Chat SDK does not yet have a unified connection model for BYOK bots across adapters
that means apps that want every customer to bring their own bot credentials still need adapter-specific glue or userland wrappers to resolve credentials, bind outbound clients, namespace state, and keep proactive sends tied to the right customer connection
goal
add a first-class connection model that lets adapters resolve credentials per customer connection during webhook handling and outbound work
proposed shape
const slack = createSlackAdapter({
connections: {
async resolve({ request }) {
const connectionId = new URL(request.url).searchParams.get("connection")
return db.slackConnections.get(connectionId)
},
async get(connectionId) {
return db.slackConnections.get(connectionId)
},
},
})
const bot = new Chat({
adapters: { slack },
state,
})
scope
- add connection metadata to messages, threads, events, and serialized payloads
- make dedupe, locks, queues, subscriptions, and history connection-safe
- add adapter-level connection providers for webhook credential resolution
- add proactive APIs like
withConnection
- support webhook-mode BYOK across existing chat adapters
- document adapter-specific caveats for long-lived modes like Slack Socket Mode, Discord Gateway, and Telegram polling
notes
some platforms require the correct customer secret before the payload can be trusted, so this should be adapter-level rather than a generic parse-first core hook
summary
support multi-tenant BYOK chat bots where each customer can bring their own platform credentials while the app runs through one stable Chat SDK runtime
today, some adapters have adapter-specific multi-tenant paths, like Slack multi-workspace installs, Linear OAuth installs, and GitHub App installations. However, Chat SDK does not yet have a unified connection model for BYOK bots across adapters
that means apps that want every customer to bring their own bot credentials still need adapter-specific glue or userland wrappers to resolve credentials, bind outbound clients, namespace state, and keep proactive sends tied to the right customer connection
goal
add a first-class connection model that lets adapters resolve credentials per customer connection during webhook handling and outbound work
proposed shape
scope
withConnectionnotes
some platforms require the correct customer secret before the payload can be trusted, so this should be adapter-level rather than a generic parse-first core hook