refactor: move channel config metadata into plugin-owned manifests

This commit is contained in:
Peter Steinberger
2026-03-27 01:52:30 +00:00
parent e1ff753790
commit 40bd36e35d
77 changed files with 16713 additions and 1908 deletions

View File

@@ -4,14 +4,13 @@ import {
adaptScopedAccountAccessor,
createScopedChannelConfigAdapter,
} from "openclaw/plugin-sdk/channel-config-helpers";
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
import {
listBlueBubblesAccountIds,
type ResolvedBlueBubblesAccount,
resolveBlueBubblesAccount,
resolveDefaultBlueBubblesAccountId,
} from "./accounts.js";
import { BlueBubblesConfigSchema } from "./config-schema.js";
import { BlueBubblesChannelConfigSchema } from "./config-schema.js";
import type { ChannelPlugin } from "./runtime-api.js";
import { normalizeBlueBubblesHandle } from "./targets.js";
@@ -41,7 +40,7 @@ export const bluebubblesCapabilities: ChannelPlugin<ResolvedBlueBubblesAccount>[
};
export const bluebubblesReload = { configPrefixes: ["channels.bluebubbles"] };
export const bluebubblesConfigSchema = buildChannelConfigSchema(BlueBubblesConfigSchema);
export const bluebubblesConfigSchema = BlueBubblesChannelConfigSchema;
export const bluebubblesConfigAdapter =
createScopedChannelConfigAdapter<ResolvedBlueBubblesAccount>({

View File

@@ -1,5 +1,6 @@
import {
AllowFromListSchema,
buildChannelConfigSchema,
buildCatchallMultiAccountChannelSchema,
DmPolicySchema,
GroupPolicySchema,
@@ -7,6 +8,7 @@ import {
ToolPolicySchema,
} from "openclaw/plugin-sdk/channel-config-schema";
import { z } from "zod";
import { bluebubblesChannelConfigUiHints } from "./config-ui-hints.js";
import { buildSecretInputSchema, hasConfiguredSecretInput } from "./secret-input.js";
const bluebubblesActionSchema = z
@@ -71,3 +73,7 @@ export const BlueBubblesConfigSchema = buildCatchallMultiAccountChannelSchema(
).extend({
actions: bluebubblesActionSchema,
});
export const BlueBubblesChannelConfigSchema = buildChannelConfigSchema(BlueBubblesConfigSchema, {
uiHints: bluebubblesChannelConfigUiHints,
});

View File

@@ -0,0 +1,12 @@
import type { ChannelConfigUiHint } from "openclaw/plugin-sdk/core";
export const bluebubblesChannelConfigUiHints = {
"": {
label: "BlueBubbles",
help: "BlueBubbles channel provider configuration used for Apple messaging bridge integrations. Keep DM policy aligned with your trusted sender model in shared deployments.",
},
dmPolicy: {
label: "BlueBubbles DM Policy",
help: 'Direct message access control ("pairing" recommended). "open" requires channels.bluebubbles.allowFrom=["*"].',
},
} satisfies Record<string, ChannelConfigUiHint>;