57 lines
1.5 KiB
TypeScript
57 lines
1.5 KiB
TypeScript
// src/messages/drone.ts
|
|
// Copyright (C) 2026 Rob Colbert <rob.colbert@openplatform.us>
|
|
// 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";
|
|
import { WorkspaceMode } from "./ide.ts";
|
|
|
|
export type ProcessWorkOrderCallback = (
|
|
success: boolean,
|
|
message?: string,
|
|
) => void;
|
|
export type ProcessWorkOrderMessage = (
|
|
registration: IDroneRegistration,
|
|
turn: IChatTurn,
|
|
cb: ProcessWorkOrderCallback,
|
|
) => void;
|
|
|
|
export type StatusMessage = (content: string) => 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;
|
|
|
|
export type RequestTerminationMessage = (
|
|
cb: (success: boolean) => void,
|
|
) => void;
|
|
|
|
export type WorkspaceModeChangedMessage = (mode: WorkspaceMode) => void;
|