export type ConnectorVerifyType = 'hmac-sha256' | 'token'; export type ConnectorTargetMode = 'dynamic' | 'fixed' | 'new-group'; export type ConnectorTargetKind = 'turn' | 'workflow'; export type ConnectorTopicMessageMode = 'default' | 'custom' | 'template' | 'none'; export interface ConnectorTopicMessageExtractor { path: string; kind: 'text' | 'mention'; /** Relative path within each extracted mention object. Omit when the * extracted value itself is the identity string. */ identityPath?: string; /** Optional relative path for the display name used inside/fallback from a * native Lark mention. */ namePath?: string; } export interface ConnectorDefinition { id: string; name: string; enabled: boolean; verify: { type: ConnectorVerifyType; secretRef: string; signatureHeader: string; timestampHeader: string; nonceHeader: string; toleranceSeconds: number; }; target: { mode: ConnectorTargetMode; kind: ConnectorTargetKind; botId: string; botIds?: string[]; chatId?: string; allowChats?: string[]; workflowId?: string; }; promptEnvelope: { sourceName: string; headerAllowlist: string[]; includeRawText: boolean; maxBodyBytes: number; instruction?: string; }; /** Feishu topic seed shown when this webhook has to open a new topic. * Missing on older stores means `default` for backwards compatibility. */ topicMessage?: { mode: ConnectorTopicMessageMode; /** Custom text may contain `{source}`, resolved from promptEnvelope.sourceName. */ text?: string; /** Connector-owner allowlist used only by `template` mode. Aliases become * `{{alias}}` or `{{mention alias}}` tokens in `text`. */ extractors?: Record; }; /** When true, the daemon drops the trailing final_output reply for turns this * webhook fires (the live streaming card / start notice still show). Lets a * webhook that only needs the bot's in-topic `botmux send` output avoid the * extra "完成/总结" message. Missing = false. Ignored for wait/async response * modes, whose whole contract is to return the final output. */ suppressFinalOutput?: boolean; loggingPolicy: { storePayload: boolean; storeHeaders: boolean; retentionDays: number; }; lifecycleExtractors: null | { dedupKey: string; }; rateLimit?: { windowSeconds: number; maxRequests: number; }; createdAt: string; updatedAt: string; } export interface ConnectorStoreFile { version: 1; connectors: ConnectorDefinition[]; } export declare function readConnectorStore(dataDir?: string): ConnectorStoreFile; export declare function listConnectors(dataDir?: string): ConnectorDefinition[]; export declare function getConnector(id: string, dataDir?: string): ConnectorDefinition | null; export declare function upsertConnector(connector: ConnectorDefinition, dataDir?: string): ConnectorDefinition; export declare function deleteConnector(id: string, dataDir?: string): boolean; export declare function newConnectorId(): string; //# sourceMappingURL=connector-store.d.ts.map