import type { ActorRef, Task, TaskAcceptancePolicy, TaskContract, TaskPhase, TaskPriority, TaskResolution } from '@xopcai/gateway-contract'; export type TaskExecutionSource = 'chat' | 'cli' | 'cron' | 'workflow' | 'channel' | 'api'; export type TaskUiLocale = 'en' | 'zh'; export type TaskAggregate = Task; export interface TaskCreateInput { id?: string; idempotencyKey?: string; title: string; body?: string; phase?: Extract; projectId?: string; milestoneId?: string; parentTaskId?: string; priority?: TaskPriority; dueAt?: number; ownerId?: string; delegateAgentId?: string; source?: TaskExecutionSource; locale?: TaskUiLocale; objective: string; expectedOutputs?: string[]; acceptanceCriteria?: string[]; constraints?: string[]; approvalRequired?: string[]; assumptions?: string[]; risks?: string[]; acceptancePolicy?: TaskAcceptancePolicy; outputDestinations?: Array>; createdBy?: ActorRef; now?: number; } export declare class TaskRepository { create(input: TaskCreateInput): TaskAggregate; get(id: string): TaskAggregate | undefined; require(id: string): TaskAggregate; getByIdempotencyKey(key: string): TaskAggregate | undefined; getBySession(sessionKey: string): TaskAggregate | undefined; list(input?: { phase?: TaskPhase; projectId?: string; limit?: number; }): TaskAggregate[]; listByProject(projectId: string, limit?: number): TaskAggregate[]; getContract(taskId: string, version?: number): TaskContract | undefined; update(taskId: string, patch: { expectedVersion: number; title?: string; body?: string | null; projectId?: string | null; milestoneId?: string | null; parentTaskId?: string | null; priority?: TaskPriority; dueAt?: number | null; ownerId?: string | null; delegateAgentId?: string | null; now?: number; }): TaskAggregate | undefined; setLifecycle(input: { taskId: string; expectedVersion: number; phase: TaskPhase; resolution?: TaskResolution; now?: number; }): TaskAggregate | undefined; reviseContract(input: { taskId: string; objective: string; expectedOutputs: string[]; acceptanceCriteria: string[]; constraints: string[]; approvalRequired: string[]; assumptions: string[]; risks: string[]; acceptancePolicy: TaskAcceptancePolicy; outputDestinations: Array>; createdBy: ActorRef; expectedVersion: number; now?: number; }): TaskAggregate | undefined; delete(taskId: string): boolean; private insertContract; }