export type ConnectorCatalogEntry = { name: string; description: string; }; export declare const CONNECTOR_CATALOG: ConnectorCatalogEntry[]; export declare function listConnectorCatalog(): ConnectorCatalogEntry[]; export interface ConnectorPlatformDef { id: string; name: string; type: "polling" | "webhook" | "hybrid"; hint: string; fields: ConnectorFieldDef[]; /** * Adapter-derived flags that may be persisted for fast reconnects but must * be regenerated whenever dashboard-managed configuration changes. */ derivedReconnectFlags?: string[]; security?: ConnectorSecurityDef; } export interface ConnectorFieldDef { flag: string; aliases?: string[]; label: string; placeholder?: string; required?: boolean; help?: string[]; initialValue?: string; options?: Array<{ value: string; label: string; hint?: string; }>; includeWhen?: ConnectorFieldCondition; } export type ConnectorFieldCondition = { flag: string; equals?: string; notEquals?: string; }; export interface ConnectorSecurityFieldDef { key: string; label: string; placeholder?: string; help?: string[]; requiredMessage: string; validate?: (value: string) => string | undefined; } export interface ConnectorSecurityDef { prompt: string; fields: ConnectorSecurityFieldDef[]; argumentFlags: string[]; buildArgs: (values: Record) => string[]; } export type ConnectorChannel = { id: string; name: string; type: ConnectorPlatformDef["type"]; hint: string; fields: ConnectorFieldDef[]; security?: { prompt: string; fields: Array>; }; }; export type ActiveConnectorRecord = { id: string; type: string; instanceId: string; pid: number; hubUrl: string; startedAt?: string; applicationId?: string; botUsername?: string; userName?: string; phoneNumberId?: string; port?: number; baseUrl?: string; connectionMode?: string; }; export type ConfiguredConnectorRecord = { id: string; type: string; configuredAt: string; updatedAt: string; }; export type ConnectorChannelsResponse = { available: ConnectorChannel[]; active: ActiveConnectorRecord[]; configured: ConfiguredConnectorRecord[]; }; export declare function shouldIncludeConnectorField(field: ConnectorFieldDef, values: Record): boolean; /** * Build the non-interactive CLI arguments for a validated connector * configuration. The channel name itself is intentionally omitted so the * arguments can be persisted and reused by any host. */ export declare function buildConnectorConnectArgs(platform: ConnectorPlatformDef, values: Record, security?: { enabled: boolean; values: Record; }): string[]; /** * Replace dashboard-owned connector and security flags while retaining * CLI-only runtime options such as provider, model, cwd, and tool settings. */ export declare function mergeConnectorConnectArgs(platform: ConnectorPlatformDef, existingArgs: string[], configuredArgs: string[], options: { replaceSecurityArgs: boolean; }): string[]; export declare function connectorChannelsFromPlatforms(platforms?: ConnectorPlatformDef[]): ConnectorChannel[]; export declare const CONNECTOR_PLATFORMS: ConnectorPlatformDef[]; export declare const PLATFORMS: ConnectorPlatformDef[]; export declare const shouldIncludeField: typeof shouldIncludeConnectorField;