* fix(plugins): add missing secret-input-schema build entry and Matrix runtime export buildSecretInputSchema was not included in plugin-sdk-entrypoints.json, so it was never emitted to dist/plugin-sdk/secret-input-schema.js. This caused a ReferenceError during onboard when configuring channels that use secret input schemas (matrix, feishu, mattermost, bluebubbles, nextcloud-talk, zalo). Additionally, the Matrix extension's hand-written runtime-api barrel was missing the re-export, unlike other extensions that use `export *` from their plugin-sdk subpath. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Plugin SDK: guard package subpaths and fix Twitch setup export * Plugin SDK: fix import guardrail drift --------- Co-authored-by: hxy91819 <masonxhuang@icloud.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import {
|
|
listDirectoryGroupEntriesFromMapKeys,
|
|
listDirectoryUserEntriesFromAllowFrom,
|
|
type DirectoryConfigParams,
|
|
} from "openclaw/plugin-sdk/directory-runtime";
|
|
import { resolveWhatsAppAccount } from "./accounts.js";
|
|
import { isWhatsAppGroupJid, normalizeWhatsAppTarget } from "./normalize.js";
|
|
|
|
export async function listWhatsAppDirectoryPeersFromConfig(params: DirectoryConfigParams) {
|
|
const account = resolveWhatsAppAccount({ cfg: params.cfg, accountId: params.accountId });
|
|
return listDirectoryUserEntriesFromAllowFrom({
|
|
allowFrom: account.allowFrom,
|
|
query: params.query,
|
|
limit: params.limit,
|
|
normalizeId: (entry) => {
|
|
const normalized = normalizeWhatsAppTarget(entry);
|
|
if (!normalized || isWhatsAppGroupJid(normalized)) {
|
|
return null;
|
|
}
|
|
return normalized;
|
|
},
|
|
});
|
|
}
|
|
|
|
export async function listWhatsAppDirectoryGroupsFromConfig(params: DirectoryConfigParams) {
|
|
const account = resolveWhatsAppAccount({ cfg: params.cfg, accountId: params.accountId });
|
|
return listDirectoryGroupEntriesFromMapKeys({
|
|
groups: account.groups,
|
|
query: params.query,
|
|
limit: params.limit,
|
|
});
|
|
}
|