import type { AgentTaskCancellationState } from '@n8n/api-types'; import { LockService } from '@n8n/backend-common'; import { TransactionRunner } from '@n8n/db'; import { AgentChatAttachmentService } from './agent-chat-attachment.service'; import { AgentChatExecutionService } from './agent-chat-execution.service'; import { AgentExecutionUpdateBroadcaster } from './agent-execution-update-broadcaster'; import { AgentMessageQueueService } from './agent-message-queue.service'; import { AgentPlanService } from './agent-plan.service'; import { AgentBackgroundJobService } from './background/agent-background-job.service'; import { AgentExecutionThreadRepository } from './repositories/agent-execution-thread.repository'; import { AgentExecutionRepository } from './repositories/agent-execution.repository'; import { AgentMessageQueueRepository } from './repositories/agent-message-queue.repository'; import { AgentPlanRepository } from './repositories/agent-plan.repository'; import type { AgentTaskStopSurface } from './types/agent-task-stop'; export declare class AgentTaskCancellationService { private readonly threads; private readonly executions; private readonly queue; private readonly plans; private readonly planService; private readonly jobs; private readonly chatExecutions; private readonly txRunner; private readonly locks; private readonly updates; private readonly messages; private readonly attachments; constructor(threads: AgentExecutionThreadRepository, executions: AgentExecutionRepository, queue: AgentMessageQueueRepository, plans: AgentPlanRepository, planService: AgentPlanService, jobs: AgentBackgroundJobService, chatExecutions: AgentChatExecutionService, txRunner: TransactionRunner, locks: LockService, updates: AgentExecutionUpdateBroadcaster, messages: AgentMessageQueueService, attachments: AgentChatAttachmentService); request(threadId: string, planId: string | null, onQueued?: (queueId: string) => void, surface?: AgentTaskStopSurface): Promise; state(threadId: string): Promise; private prepareStopRequest; private requestForegroundStop; private requestBackgroundStops; private recordStopResults; private canReuseStop; }