feat(chat-sdk-bridge): add channelType override + webhook routingPath#2617
Open
mmahmed wants to merge 1 commit into
Open
feat(chat-sdk-bridge): add channelType override + webhook routingPath#2617mmahmed wants to merge 1 commit into
mmahmed wants to merge 1 commit into
Conversation
- Chat SDK-bridge channels can't run two bridges of the same adapter type today: registry key and webhook route both derive from adapter.name - Optional channelType on the bridge and routingPath on registerWebhookAdapter remove the coupling so channel modules can register N instances; defaults preserve existing behavior Refs nanocoai#1804.
mmahmed
added a commit
to mmahmed/nanoclaw
that referenced
this pull request
May 25, 2026
- Records what's stacked on top of origin/main (PRs nanocoai#2591, nanocoai#2617, multi-bot Teams, bootstrap) - Documents how to refresh when upstream consumes a PR, how to add a new carry, how to bump deps - Captures the non-standard remote convention (origin = upstream, fork = our fork)
mmahmed
added a commit
to mmahmed/nanoclaw
that referenced
this pull request
May 25, 2026
- Records what's stacked on top of origin/main (PRs nanocoai#2591, nanocoai#2617, multi-bot Teams, bootstrap) - Documents how to refresh when upstream consumes a PR, how to add a new carry, how to bump deps - Captures the non-standard remote convention (origin = upstream, fork = our fork)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
.claude/skills/<name>/, no source changes)Description
What
Two additive optional config knobs that remove the implicit coupling between webhook route, Chat SDK adapter name, and registry channelType:
ChatSdkBridgeConfig.channelType?: string— when set, overrides the bridge's effective.name,.channelType, and webhook route. Defaults toadapter.name(current behavior).registerWebhookAdapter(chat, adapterName, routingPath?)— optional 3rd parameter. When set, the route URL becomes/webhook/<routingPath>;chat.webhooks[adapterName]lookup is unchanged.Why
channel-registry.tskeys live adapters byadapter.channelType;chat-sdk-bridge.tshardcodes the webhook route toadapter.name. Two bridges sharing the same Chat SDK adapter type silently collide on both — the second registration overwrites the first in the registry, and both registrations target the same/webhook/<adapter.name>URL.Removing the coupling unblocks any channel module that needs N bridges of the same Chat SDK adapter type on one host. #1804 documents the gap for multi-workspace Slack; the same primitive applies to multi-bot Teams and any future channel with the same shape.
How
Both fields default to current behavior. The only call site of
registerWebhookAdapteris insidechat-sdk-bridge.ts; all existing channel consumers ofcreateChatSdkBridgecontinue to work identically. No semantic changes for single-instance channels.Shape matches the prototype proposed on #1804 at davekim917@33274a9 — adopting it verbatim so a single primitive landing unblocks Slack, Teams, and any other channel adopting the same pattern.
How it was tested
pnpm test— 339/339 pass, including 7 new tests:src/channels/chat-sdk-bridge.test.ts— default behavior, override behavior, two bridges with distinct overrides.src/webhook-server.test.ts— default routing, override routing with handler-lookup invariant, collision avoidance between bridges sharing anadapterNameunder distinctroutingPaths, 404 for unregistered routes.pnpm run typecheck— clean.pnpm run lint— no new errors or warnings introduced (the pre-existing errors/warnings onmainare unchanged).For Skills
Refs #1804.