n8n
Version:
n8n Workflow Automation Tool
23 lines (22 loc) • 1.18 kB
TypeScript
import type { AgentIntegrationConfig } from '@n8n/api-types';
import type { Message, Thread } from 'chat';
import type { Logger } from 'n8n-workflow';
import type { IntegrationMessageContextService } from './integration-message-context.service';
import { type IntegrationMessageContext, type IntegrationMessageSubject } from './integration-tools';
interface UpdateLatestMessageContextOptions {
messageId?: string;
interactingUserId?: string;
agentUserId?: string;
subject?: IntegrationMessageSubject;
}
export declare class AgentChatMessageContextBridge {
private readonly messageContextStore;
private readonly integration;
private readonly agentId;
private readonly logger;
constructor(messageContextStore: IntegrationMessageContextService | undefined, integration: AgentIntegrationConfig, agentId: string, logger: Logger);
updateLatest(threadId: string, resourceId: string, thread: Thread<unknown, unknown>, options?: UpdateLatestMessageContextOptions): Promise<IntegrationMessageContext | undefined>;
resolveSubject(message: Message<unknown>): Promise<IntegrationMessageSubject | undefined>;
private getPreviousContext;
}
export {};