/**
 * V3.1 Task Record Types
 *
 * TaskRecord = projection of agent behavior into a structured execution step.
 * Created automatically by the system, not by agents directly.
 *
 * Three-layer model:
 *   Request → TaskRecord → TaskEvent
 *
 * @module types/v3/task-record.types
 */
/** How the task was originated — determines projection behavior. */
export type TaskRecordType = 'self_execution' | 'delegation' | 'skill_call' | 'reconcile' | 'trigger_action';
/** Lifecycle status of a TaskRecord. */
export type TaskRecordStatus = 'created' | 'assigned' | 'running' | 'blocked' | 'done' | 'failed';
/** Discrete event types emitted during task execution. */
export type TaskEventType = 'task_created' | 'task_assigned' | 'task_started' | 'task_blocked' | 'task_completed' | 'task_failed' | 'skill_called' | 'skill_succeeded' | 'skill_failed' | 'agent_resumed' | 'agent_failed' | 'token_recorded';
export interface TokenUsage {
    promptTokens: number;
    completionTokens: number;
    totalTokens: number;
    model?: string;
    estimatedCostUsd?: number;
}
export interface TaskRecord {
    id: string;
    /** Parent Request this task belongs to */
    requestId?: string;
    /** Parent WorkItem ID if this was spawned from task-pool */
    workItemId?: string;
    /** Hierarchical parent TaskRecord (delegation chain) */
    parentTaskId?: string;
    title: string;
    type: TaskRecordType;
    ownerAgent: string;
    status: TaskRecordStatus;
    assignedBy?: string;
    assignedAt?: string;
    startedAt?: string;
    completedAt?: string;
    blockedReason?: string;
    /** Aggregated token usage for this task */
    tokenUsage?: TokenUsage;
    /** ID of the trigger that spawned this task (if any) */
    triggerId?: string;
    createdAt: string;
    updatedAt: string;
}
export interface TaskEvent {
    id: string;
    taskId: string;
    eventType: TaskEventType;
    agentId: string;
    timestamp: string;
    payload: Record<string, unknown>;
}
/** Input for creating a new TaskRecord. */
export interface CreateTaskRecordInput {
    title: string;
    type: TaskRecordType;
    ownerAgent: string;
    requestId?: string;
    workItemId?: string;
    parentTaskId?: string;
    assignedBy?: string;
    triggerId?: string;
}
/** Partial update fields for an existing TaskRecord. */
export interface UpdateTaskRecordInput {
    status?: TaskRecordStatus;
    assignedAt?: string;
    startedAt?: string;
    completedAt?: string;
    blockedReason?: string;
    tokenUsage?: TokenUsage;
}
/** Input for recording a TaskEvent. */
export interface RecordTaskEventInput {
    taskId: string;
    eventType: TaskEventType;
    agentId: string;
    payload?: Record<string, unknown>;
}
/**
 * Creates a new TaskRecord with generated ID and timestamps.
 *
 * @param input - Creation parameters
 * @returns A new TaskRecord in 'created' status
 */
export declare function createTaskRecord(input: CreateTaskRecordInput): TaskRecord;
/**
 * Creates a new TaskEvent with generated ID and timestamp.
 *
 * @param input - Event parameters
 * @returns A new TaskEvent
 */
export declare function createTaskEvent(input: RecordTaskEventInput): TaskEvent;
//# sourceMappingURL=task-record.types.d.ts.map