Skip to content

Cherry-pick batch: Discord adapter (1/2) (50 commits)#1962

Merged
alexey-pelykh merged 62 commits intomainfrom
staging/cherry-pick-1873
Mar 24, 2026
Merged

Cherry-pick batch: Discord adapter (1/2) (50 commits)#1962
alexey-pelykh merged 62 commits intomainfrom
staging/cherry-pick-1873

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Cherry-pick batch from upstream

Issue: #1873
Commits: 38 cherry-picked, 12 skipped (empty after conflict resolution — fork structure differs)

Key changes

  • Plugin SDK channel surface tightening
  • Discord channel implementation additions in extensions/
  • Monitor runtime helper extraction
  • Channel pairing refactoring (createChannelPairingChallengeIssuer)
  • Startup performance improvements
  • Plugin runtime overhead reduction
  • Test coverage improvements

Adaptation notes

  • Added src/plugin-sdk/channel-pairing.ts as prerequisite module
  • Removed duplicate extension files that conflict with fork's src/discord/ layout
  • Removed upstream runtime bridge files (runtime-*.ts) incompatible with fork structure
  • Restored files inadvertently modified by upstream restructuring commits

See issue for full commit list.

Closes #1873

🤖 Generated with Claude Code

alexey-pelykh and others added 30 commits March 24, 2026 05:54
* perf(inbound): trim cold startup import graph

* chore(reply): drop redundant inline action type import

* fix(inbound): restore warning and maintenance seams

* fix(reply): restore type seam and secure forked transcripts

(cherry picked from commit 041f0b8)
…w#45660)

* refactor: move Discord channel implementation to extensions/discord/src/

Move all Discord source files from src/discord/ to extensions/discord/src/,
following the extension migration pattern. Source files in src/discord/ are
replaced with re-export shims. Channel-plugin files from
src/channels/plugins/*/discord* are similarly moved and shimmed.

- Copy all .ts source files preserving subdirectory structure (monitor/, voice/)
- Move channel-plugin files (actions, normalize, onboarding, outbound, status-issues)
- Fix all relative imports to use correct paths from new location
- Create re-export shims at original locations for backward compatibility
- Delete test files from shim locations (tests live in extension now)
- Update tsconfig.plugin-sdk.dts.json rootDir from "src" to "." to accommodate
  extension files outside src/
- Update write-plugin-sdk-entry-dts.ts to match new declaration output paths

* fix: add importOriginal to thread-bindings session-meta mock for extensions test

* style: fix formatting in thread-bindings lifecycle test

(cherry picked from commit 5682ec3)
…w#45517)

* refactor: make OutboundSendDeps dynamic with channel-ID keys

Replace hardcoded per-channel send fields (sendTelegram, sendDiscord,
etc.) with a dynamic index-signature type keyed by channel ID. This
unblocks moving channel implementations to extensions without breaking
the outbound dispatch contract.

- OutboundSendDeps and CliDeps are now { [channelId: string]: unknown }
- Each outbound adapter resolves its send fn via bracket access with cast
- Lazy-loading preserved via createLazySender with module cache
- Delete 6 deps-send-*.runtime.ts one-liner re-export files
- Harden guardrail scan against deleted-but-tracked files

* fix: preserve outbound send-deps compatibility

* style: fix formatting issues (import order, extra bracket, trailing whitespace)

* fix: resolve type errors from dynamic OutboundSendDeps in tests and extension

* fix: remove unused OutboundSendDeps import from deliver.test-helpers

(cherry picked from commit 7764f71)
steipete and others added 23 commits March 24, 2026 06:14
@alexey-pelykh alexey-pelykh enabled auto-merge (squash) March 24, 2026 05:27
@alexey-pelykh alexey-pelykh merged commit ba8ff56 into main Mar 24, 2026
7 checks passed
@alexey-pelykh alexey-pelykh deleted the staging/cherry-pick-1873 branch March 24, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cherry-pick: Discord adapter (1/2) (50 commits)

5 participants