From 9c89ae0e988eb7c40ea18f4c3f09e95dc7821ba4 Mon Sep 17 00:00:00 2001 From: Akshay Date: Wed, 28 Jan 2026 18:24:06 +0800 Subject: [PATCH] fix(cli): initialize plugins before pairing CLI registration The pairing CLI calls listPairingChannels() at registration time, which requires the plugin registry to be populated. Without this, plugin-provided channels like Matrix fail with "does not support pairing" even though they have pairing adapters defined. This mirrors the existing pattern used by the plugins CLI entry. --- src/cli/program/register.subclis.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cli/program/register.subclis.ts b/src/cli/program/register.subclis.ts index 97ca4508a..e5684fbea 100644 --- a/src/cli/program/register.subclis.ts +++ b/src/cli/program/register.subclis.ts @@ -168,6 +168,11 @@ const entries: SubCliEntry[] = [ name: "pairing", description: "Pairing helpers", register: async (program) => { + // Initialize plugins before registering pairing CLI. + // The pairing CLI calls listPairingChannels() at registration time, + // which requires the plugin registry to be populated with channel plugins. + const { registerPluginCliCommands } = await import("../../plugins/cli.js"); + registerPluginCliCommands(program, await loadConfig()); const mod = await import("../pairing-cli.js"); mod.registerPairingCli(program); },