import { U as ChannelLegacyStateMigrationPlan } from "./types.core-CuC3Nb15.js"; import { i as OpenClawConfig } from "./types.openclaw-CpnoYlBx.js"; import { n as ChannelConfigSchema } from "./types.config-D1pSqbn8.js"; import { n as ChannelOutboundAdapter } from "./outbound.types-CfSE45o1.js"; import { t as ChannelPlugin } from "./types.plugin-oQrs9-Gb.js"; import { C as OpenClawPluginApi$1, O as OpenClawPluginCommandDefinition$1, at as PluginCommandContext$1 } from "./types-BftTUA7h.js"; import { r as AnyAgentTool$1 } from "./common-BQld_MGZ.js"; import { t as PluginModuleLoaderFactory } from "./plugin-module-loader-cache-DOUa0J2M.js"; //#region src/plugin-sdk/channel-entry-contract.types.d.ts /** Legacy session helpers used while bundled channels migrate old session key formats. */ type BundledChannelLegacySessionSurface = { isLegacyGroupSessionKey?: (key: string) => boolean; canonicalizeLegacySessionKey?: (params: { key: string; agentId: string; }) => string | null | undefined; }; /** Detects channel-owned state migrations needed before a bundled channel starts. */ type BundledChannelLegacyStateMigrationDetector = (params: { cfg: OpenClawConfig; env: NodeJS.ProcessEnv; stateDir: string; oauthDir: string; }) => ChannelLegacyStateMigrationPlan[] | Promise | null | undefined; /** Test hook for swapping the source-module loader used by bundled entry imports. */ type BundledEntryModuleLoadOptions = { createLoaderForTest?: PluginModuleLoaderFactory; }; //#endregion //#region src/plugin-sdk/channel-entry-contract.d.ts type AnyAgentTool = AnyAgentTool$1; type OpenClawPluginApi = OpenClawPluginApi$1; type OpenClawPluginCommandDefinition = OpenClawPluginCommandDefinition$1; type PluginCommandContext = PluginCommandContext$1; type BundledChannelRuntime = unknown; type ChannelEntryConfigSchema = TPlugin extends ChannelPlugin ? NonNullable : ChannelConfigSchema; type BundledEntryModuleRef = { specifier: string; exportName?: string; }; type DefineBundledChannelEntryOptions = { id: string; name: string; description: string; importMetaUrl: string; plugin: BundledEntryModuleRef; outbound?: BundledEntryModuleRef; secrets?: BundledEntryModuleRef; configSchema?: ChannelEntryConfigSchema | (() => ChannelEntryConfigSchema); runtime?: BundledEntryModuleRef; accountInspect?: BundledEntryModuleRef; features?: BundledChannelEntryFeatures; registerCliMetadata?: (api: OpenClawPluginApi) => void; registerFull?: (api: OpenClawPluginApi) => void; }; type DefineBundledChannelSetupEntryOptions = { importMetaUrl: string; plugin: BundledEntryModuleRef; secrets?: BundledEntryModuleRef; runtime?: BundledEntryModuleRef; legacyStateMigrations?: BundledEntryModuleRef; legacySessionSurface?: BundledEntryModuleRef; registerSetupRuntime?: (api: OpenClawPluginApi) => void; features?: BundledChannelSetupEntryFeatures; }; /** Feature flags exposed by bundled setup entries for optional migration/session surfaces. */ type BundledChannelSetupEntryFeatures = { legacyStateMigrations?: boolean; legacySessionSurfaces?: boolean; }; /** Feature flags exposed by full bundled channel entries. */ type BundledChannelEntryFeatures = { accountInspect?: boolean; }; /** Runtime contract returned by a bundled channel's main entrypoint definition. */ type BundledChannelEntryContract = { kind: "bundled-channel-entry"; id: string; name: string; description: string; configSchema: ChannelEntryConfigSchema; features?: BundledChannelEntryFeatures; register: (api: OpenClawPluginApi) => void; loadChannelPlugin: (options?: BundledEntryModuleLoadOptions) => TPlugin; loadChannelOutbound?: (options?: BundledEntryModuleLoadOptions) => ChannelOutboundAdapter | undefined; loadChannelSecrets?: (options?: BundledEntryModuleLoadOptions) => ChannelPlugin["secrets"] | undefined; loadChannelAccountInspector?: (options?: BundledEntryModuleLoadOptions) => NonNullable; setChannelRuntime?: (runtime: BundledChannelRuntime) => void; }; /** Runtime contract returned by a bundled channel's setup-only entrypoint definition. */ type BundledChannelSetupEntryContract = { kind: "bundled-channel-setup-entry"; loadSetupPlugin: (options?: BundledEntryModuleLoadOptions) => TPlugin; loadSetupSecrets?: (options?: BundledEntryModuleLoadOptions) => ChannelPlugin["secrets"] | undefined; loadLegacyStateMigrationDetector?: (options?: BundledEntryModuleLoadOptions) => BundledChannelLegacyStateMigrationDetector; loadLegacySessionSurface?: (options?: BundledEntryModuleLoadOptions) => BundledChannelLegacySessionSurface; setChannelRuntime?: (runtime: BundledChannelRuntime) => void; registerSetupRuntime?: (api: OpenClawPluginApi) => void; features?: BundledChannelSetupEntryFeatures; }; /** Loads one export from a bundled channel sidecar module through the guarded entry boundary. */ declare function loadBundledEntryExportSync(importMetaUrl: string, reference: BundledEntryModuleRef, options?: BundledEntryModuleLoadOptions): T; /** Defines the full bundled channel entry contract used by core plugin registration. */ declare function defineBundledChannelEntry({ id, name, description, importMetaUrl, plugin, outbound, secrets, configSchema, runtime, accountInspect, features, registerCliMetadata, registerFull }: DefineBundledChannelEntryOptions): BundledChannelEntryContract; /** Defines the setup-only bundled channel entry contract for onboarding and migration surfaces. */ declare function defineBundledChannelSetupEntry({ importMetaUrl, plugin, secrets, runtime, legacyStateMigrations, legacySessionSurface, registerSetupRuntime, features }: DefineBundledChannelSetupEntryOptions): BundledChannelSetupEntryContract; //#endregion export { AnyAgentTool, BundledChannelEntryContract, BundledChannelEntryFeatures, type BundledChannelLegacySessionSurface, type BundledChannelLegacyStateMigrationDetector, BundledChannelSetupEntryContract, BundledChannelSetupEntryFeatures, type BundledEntryModuleLoadOptions, OpenClawPluginApi, OpenClawPluginCommandDefinition, PluginCommandContext, defineBundledChannelEntry, defineBundledChannelSetupEntry, loadBundledEntryExportSync };