import { r as KlawConfig } from "./types.klaw-xKUw_Rz7.js"; import { n as ChannelConfigSchema } from "./types.config-D44pO5LU.js"; import { n as ChannelOutboundAdapter } from "./outbound.types-P0E6jGE1.js"; import { g as ChannelLegacyStateMigrationPlan } from "./types.core-BSyOg0vX.js"; import { u as KlawPluginApi } from "./types-CAmC_cW72.js"; import { n as ChannelPlugin } from "./types.public-BSMobFik.js"; import { n as PluginRuntime } from "./types-yybOtwsl.js"; import { t as PluginModuleLoaderFactory } from "./plugin-module-loader-cache-uyiPV37u.js"; //#region src/plugin-sdk/channel-entry-contract.d.ts 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: KlawPluginApi) => void; registerFull?: (api: KlawPluginApi) => void; }; type DefineBundledChannelSetupEntryOptions = { importMetaUrl: string; plugin: BundledEntryModuleRef; secrets?: BundledEntryModuleRef; runtime?: BundledEntryModuleRef; legacyStateMigrations?: BundledEntryModuleRef; legacySessionSurface?: BundledEntryModuleRef; features?: BundledChannelSetupEntryFeatures; }; type BundledChannelSetupEntryFeatures = { legacyStateMigrations?: boolean; legacySessionSurfaces?: boolean; }; type BundledChannelEntryFeatures = { accountInspect?: boolean; }; type BundledChannelLegacySessionSurface = { isLegacyGroupSessionKey?: (key: string) => boolean; canonicalizeLegacySessionKey?: (params: { key: string; agentId: string; }) => string | null | undefined; }; type BundledChannelLegacyStateMigrationDetector = (params: { cfg: KlawConfig; env: NodeJS.ProcessEnv; stateDir: string; oauthDir: string; }) => ChannelLegacyStateMigrationPlan[] | Promise | null | undefined; type BundledChannelEntryContract = { kind: "bundled-channel-entry"; id: string; name: string; description: string; configSchema: ChannelEntryConfigSchema; features?: BundledChannelEntryFeatures; register: (api: KlawPluginApi) => void; loadChannelPlugin: (options?: BundledEntryModuleLoadOptions) => TPlugin; loadChannelOutbound?: (options?: BundledEntryModuleLoadOptions) => ChannelOutboundAdapter | undefined; loadChannelSecrets?: (options?: BundledEntryModuleLoadOptions) => ChannelPlugin["secrets"] | undefined; loadChannelAccountInspector?: (options?: BundledEntryModuleLoadOptions) => NonNullable; setChannelRuntime?: (runtime: PluginRuntime) => void; }; 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: PluginRuntime) => void; features?: BundledChannelSetupEntryFeatures; }; type BundledEntryModuleLoadOptions = { createLoaderForTest?: PluginModuleLoaderFactory; }; declare function loadBundledEntryExportSync(importMetaUrl: string, reference: BundledEntryModuleRef, options?: BundledEntryModuleLoadOptions): T; declare function defineBundledChannelEntry({ id, name, description, importMetaUrl, plugin, outbound, secrets, configSchema, runtime, accountInspect, features, registerCliMetadata, registerFull }: DefineBundledChannelEntryOptions): BundledChannelEntryContract; declare function defineBundledChannelSetupEntry({ importMetaUrl, plugin, secrets, runtime, legacyStateMigrations, legacySessionSurface, features }: DefineBundledChannelSetupEntryOptions): BundledChannelSetupEntryContract; //#endregion export { BundledChannelSetupEntryContract as a, defineBundledChannelEntry as c, BundledChannelLegacyStateMigrationDetector as i, defineBundledChannelSetupEntry as l, BundledChannelEntryFeatures as n, BundledChannelSetupEntryFeatures as o, BundledChannelLegacySessionSurface as r, BundledEntryModuleLoadOptions as s, BundledChannelEntryContract as t, loadBundledEntryExportSync as u };