From 152b465e640be07a82188b707f2d28e48f7ac29c Mon Sep 17 00:00:00 2001 From: hzhang Date: Thu, 28 May 2026 21:03:47 +0100 Subject: [PATCH] fix(channel): include accountId in describeAccount snapshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ChannelAccountSnapshot from openclaw plugin-sdk requires accountId (everything else is optional). Returning bare { configured: boolean } satisfies neither tsc -p tsconfig.json strict checks nor the runtime contract — the snapshot fed into channelManager.getRuntimeSnapshot() is keyed by accountId, so an unkeyed entry is dropped before applyDescribedAccountFields ever sees the configured flag the original PR #10 was trying to surface. Pre-existing bug (introduced together with describeAccount in #10) that was masked because tsc invoked without -p falls back to Node10 module resolution, which doesn't read openclaw's package.json exports map, so plugin-sdk/core resolves to nothing, so ChannelAccountSnapshot ends up unknown, so { configured: boolean } passes. Tripped now because install.mjs's build step uses `tsc -p tsconfig.json` (NodeNext) and properly resolves the SDK types — exposes the missing accountId. Trivial fix: pull accountId off the same ResolvedFabricAccount that already carries it. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/channel.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/channel.ts b/src/channel.ts index 09ef50c..c83ed5b 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -164,6 +164,7 @@ export const fabricChannelPlugin = createChatChannelPlugin ({ + accountId: account.accountId, configured: Boolean(account.fabricApiKey), }), },