UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

61 lines (60 loc) • 2.83 kB
import type { ChannelSetupWizard } from "./setup-wizard.js"; import type { ChannelAuthAdapter, ChannelCommandAdapter, ChannelConfigAdapter, ChannelDirectoryAdapter, ChannelExecApprovalAdapter, ChannelResolverAdapter, ChannelElevatedAdapter, ChannelGatewayAdapter, ChannelGroupAdapter, ChannelHeartbeatAdapter, ChannelLifecycleAdapter, ChannelOutboundAdapter, ChannelPairingAdapter, ChannelSecurityAdapter, ChannelSetupAdapter, ChannelStatusAdapter, ChannelAllowlistAdapter, ChannelConfiguredBindingProvider } from "./types.adapters.js"; import type { ChannelAgentTool, ChannelAgentToolFactory, ChannelCapabilities, ChannelId, ChannelAgentPromptAdapter, ChannelMentionAdapter, ChannelMessageActionAdapter, ChannelMessagingAdapter, ChannelMeta, ChannelStreamingAdapter, ChannelThreadingAdapter } from "./types.core.js"; export type ChannelConfigUiHint = { label?: string; help?: string; tags?: string[]; advanced?: boolean; sensitive?: boolean; placeholder?: string; itemTemplate?: unknown; }; /** JSON-schema-like config description published by a channel plugin. */ export type ChannelConfigSchema = { schema: Record<string, unknown>; uiHints?: Record<string, ChannelConfigUiHint>; }; /** Full capability contract for a native channel plugin. */ export type ChannelPlugin<ResolvedAccount = any, Probe = unknown, Audit = unknown> = { id: ChannelId; meta: ChannelMeta; capabilities: ChannelCapabilities; defaults?: { queue?: { debounceMs?: number; }; }; reload?: { configPrefixes: string[]; noopPrefixes?: string[]; }; setupWizard?: ChannelSetupWizard; config: ChannelConfigAdapter<ResolvedAccount>; configSchema?: ChannelConfigSchema; setup?: ChannelSetupAdapter; pairing?: ChannelPairingAdapter; security?: ChannelSecurityAdapter<ResolvedAccount>; groups?: ChannelGroupAdapter; mentions?: ChannelMentionAdapter; outbound?: ChannelOutboundAdapter; status?: ChannelStatusAdapter<ResolvedAccount, Probe, Audit>; gatewayMethods?: string[]; gateway?: ChannelGatewayAdapter<ResolvedAccount>; auth?: ChannelAuthAdapter; elevated?: ChannelElevatedAdapter; commands?: ChannelCommandAdapter; lifecycle?: ChannelLifecycleAdapter; execApprovals?: ChannelExecApprovalAdapter; allowlist?: ChannelAllowlistAdapter; bindings?: ChannelConfiguredBindingProvider; streaming?: ChannelStreamingAdapter; threading?: ChannelThreadingAdapter; messaging?: ChannelMessagingAdapter; agentPrompt?: ChannelAgentPromptAdapter; directory?: ChannelDirectoryAdapter; resolver?: ChannelResolverAdapter; actions?: ChannelMessageActionAdapter; heartbeat?: ChannelHeartbeatAdapter; agentTools?: ChannelAgentToolFactory | ChannelAgentTool[]; };