import type { ProjectFile } from './files';
import type { PreviewCommentMember, PreviewCommentPosition, PreviewCommentSelectionKind, PreviewVisualMarkKind } from './comments';
import type { ResearchOptions } from './research';
export type ChatRole = 'user' | 'assistant';
export type ChatCommentSelectionKind = PreviewCommentSelectionKind | 'visual';
export interface ChatRequest {
    agentId: string;
    message: string;
    /** The latest user turn only, used for per-turn telemetry content. */
    currentPrompt?: string;
    systemPrompt?: string;
    projectId?: string | null;
    conversationId?: string | null;
    assistantMessageId?: string | null;
    clientRequestId?: string | null;
    skillId?: string | null;
    skillIds?: string[];
    designSystemId?: string | null;
    attachments?: string[];
    commentAttachments?: ChatCommentAttachment[];
    model?: string | null;
    reasoning?: string | null;
    research?: ResearchOptions;
}
export interface ChatRunCreateRequest extends ChatRequest {
    projectId: string;
    conversationId: string;
    assistantMessageId: string;
    clientRequestId: string;
}
export type ChatRunStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled';
export type ChatMessageFeedbackRating = 'positive' | 'negative';
export type ChatMessageFeedbackReasonCode = 'matched_request' | 'strong_visual' | 'useful_structure' | 'easy_to_continue' | 'missed_request' | 'weak_visual' | 'incomplete_output' | 'hard_to_use' | 'other';
export interface ChatMessageFeedback {
    rating: ChatMessageFeedbackRating;
    reasonCodes?: ChatMessageFeedbackReasonCode[];
    customReason?: string;
    reasonsSubmittedAt?: number;
    createdAt: number;
    updatedAt?: number;
}
export interface ChatRunCreateResponse {
    runId: string;
}
export interface ChatRunStatusResponse {
    id: string;
    projectId: string | null;
    conversationId: string | null;
    assistantMessageId: string | null;
    agentId: string | null;
    status: ChatRunStatus;
    createdAt: number;
    updatedAt: number;
    exitCode?: number | null;
    signal?: string | null;
}
export interface ChatRunListResponse {
    runs: ChatRunStatusResponse[];
}
export interface ChatRunCancelResponse {
    ok: true;
}
export interface ChatAttachment {
    path: string;
    name: string;
    kind: 'image' | 'file';
    size?: number;
}
export interface ChatCommentAttachment {
    id: string;
    order: number;
    filePath: string;
    elementId: string;
    selector: string;
    label: string;
    comment: string;
    currentText: string;
    pagePosition: PreviewCommentPosition;
    htmlHint: string;
    selectionKind?: ChatCommentSelectionKind;
    memberCount?: number;
    podMembers?: PreviewCommentMember[];
    screenshotPath?: string;
    markKind?: PreviewVisualMarkKind;
    intent?: string;
    source?: 'saved-comment' | 'board-batch';
}
export type PersistedAgentEvent = {
    kind: 'status';
    label: string;
    detail?: string;
} | {
    kind: 'text';
    text: string;
} | {
    kind: 'thinking';
    text: string;
} | {
    kind: 'live_artifact';
    action: 'created' | 'updated' | 'deleted';
    projectId: string;
    artifactId: string;
    title: string;
    refreshStatus?: string;
} | {
    kind: 'live_artifact_refresh';
    phase: 'started' | 'succeeded' | 'failed';
    projectId: string;
    artifactId: string;
    refreshId?: string;
    title?: string;
    refreshedSourceCount?: number;
    error?: string;
} | {
    kind: 'tool_use';
    id: string;
    name: string;
    input: unknown;
} | {
    kind: 'tool_result';
    toolUseId: string;
    content: string;
    isError: boolean;
} | {
    kind: 'usage';
    inputTokens?: number;
    outputTokens?: number;
    costUsd?: number;
    durationMs?: number;
} | {
    kind: 'raw';
    line: string;
};
export interface ChatMessage {
    id: string;
    role: ChatRole;
    content: string;
    agentId?: string;
    agentName?: string;
    events?: PersistedAgentEvent[];
    createdAt?: number;
    runId?: string;
    runStatus?: ChatRunStatus;
    lastRunEventId?: string;
    startedAt?: number;
    endedAt?: number;
    attachments?: ChatAttachment[];
    commentAttachments?: ChatCommentAttachment[];
    producedFiles?: ProjectFile[];
    feedback?: ChatMessageFeedback;
    /**
     * Request-only marker for the final assistant-message persistence pass.
     * The daemon does not store or return this field; it only uses it to
     * avoid telemetry reads before content and producedFiles are finalized.
     */
    telemetryFinalized?: boolean;
}
//# sourceMappingURL=chat.d.ts.map