// src/messages/drone.ts // Copyright (C) 2026 Rob Colbert // Licensed under the Apache License, Version 2.0 import { IChatSession } from "../interfaces/chat-session.ts"; import { IChatTurn } from "../interfaces/chat-turn.ts"; import { IDroneRegistration } from "../interfaces/drone-registration.ts"; import { IProject } from "../interfaces/project.ts"; export type ProcessWorkOrderCallback = ( success: boolean, message?: string, ) => void; export type ProcessWorkOrderMessage = ( registration: IDroneRegistration, project: IProject, chatSession: IChatSession, turn: IChatTurn, cb: ProcessWorkOrderCallback, ) => void; export type ThinkingMessage = (content: string) => void; export type ResponseMessage = (content: string) => void; export type ToolCallMessage = ( callId: string, name: string, params: string, response: string, ) => void; export type WorkOrderCompleteMessage = ( workOrderId: string, success: boolean, message?: string, ) => void; export type RequestCrashRecoveryMessage = (data: { workspaceId: string; turnId: string; chatSessionId: string; }) => void; export type CrashRecoveryResponseMessage = (data: { turnId: string; action: "discard" | "retry"; retryDelay?: number; }) => void;