Skip to content

Commit 5bcee07

Browse files
authored
refactor(channels): deprecate the never-consumed group intro hint adapter (#107252)
* refactor(channels): deprecate the never-consumed group intro hint adapter * chore(channels): compress the intro-hint deprecation note to satisfy the size ratchet
1 parent 202dea5 commit 5bcee07

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

extensions/whatsapp/src/channel.setup.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Whatsapp plugin module implements channel.setup behavior.
22
import type { ChannelPlugin } from "openclaw/plugin-sdk/core";
33
import type { ResolvedWhatsAppAccount } from "./accounts.js";
4-
import { resolveWhatsAppGroupIntroHint } from "./group-intro.js";
54
import {
65
resolveWhatsAppGroupRequireMention,
76
resolveWhatsAppGroupToolPolicy,
@@ -20,7 +19,6 @@ export const whatsappSetupPlugin: ChannelPlugin<ResolvedWhatsAppAccount> = {
2019
groups: {
2120
resolveRequireMention: resolveWhatsAppGroupRequireMention,
2221
resolveToolPolicy: resolveWhatsAppGroupToolPolicy,
23-
resolveGroupIntroHint: resolveWhatsAppGroupIntroHint,
2422
},
2523
setupWizard: whatsappSetupWizardProxy,
2624
setup: whatsappSetupAdapter,

extensions/whatsapp/src/channel.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ import {
1818
import { whatsappChannelOutbound, whatsappMessageAdapter } from "./channel-outbound.js";
1919
import { whatsappCommandPolicy } from "./command-policy.js";
2020
import { formatWhatsAppConfigAllowFromEntries } from "./config-accessors.js";
21-
import {
22-
resolveWhatsAppGroupIntroHint,
23-
resolveWhatsAppMentionStripRegexes,
24-
} from "./group-intro.js";
21+
import { resolveWhatsAppMentionStripRegexes } from "./group-intro.js";
2522
import {
2623
resolveWhatsAppGroupRequireMention,
2724
resolveWhatsAppGroupToolPolicy,
@@ -85,7 +82,6 @@ export const whatsappPlugin: ChannelPlugin<ResolvedWhatsAppAccount> =
8582
groups: {
8683
resolveRequireMention: resolveWhatsAppGroupRequireMention,
8784
resolveToolPolicy: resolveWhatsAppGroupToolPolicy,
88-
resolveGroupIntroHint: resolveWhatsAppGroupIntroHint,
8985
},
9086
setupWizard: whatsappSetupWizardProxy,
9187
setup: whatsappSetupAdapter,

extensions/whatsapp/src/group-intro.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
const WHATSAPP_GROUP_INTRO_HINT =
33
"WhatsApp IDs: SenderId is the participant JID (group participant id).";
44

5+
/**
6+
* @deprecated Core never consumed the group intro hint adapter; this export
7+
* remains only for the plugin API surface and is removed after the next
8+
* release train together with ChannelGroupAdapter.resolveGroupIntroHint.
9+
*/
510
export function resolveWhatsAppGroupIntroHint(): string {
611
return WHATSAPP_GROUP_INTRO_HINT;
712
}

src/channels/plugins/types.adapters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ export type ChannelSecretsAdapter = {
175175

176176
export type ChannelGroupAdapter = {
177177
resolveRequireMention?: (params: ChannelGroupContext) => boolean | undefined;
178+
/** @deprecated Core never consumed this; removed after the next release train. */
178179
resolveGroupIntroHint?: (params: ChannelGroupContext) => string | undefined;
179180
resolveToolPolicy?: (params: ChannelGroupContext) => GroupToolPolicyConfig | undefined;
180181
};
181-
182182
export type ChannelStatusAdapter<ResolvedAccount, Probe = unknown, Audit = unknown> = {
183183
defaultRuntime?: ChannelAccountSnapshot;
184184
buildChannelSummary?: ChannelAdapterCallback<

0 commit comments

Comments
 (0)