← Files Biological Sequence & Alignment ViewerARCHIVED FILE

src/msa/worker-protocol.ts

903 Bytes · Sep 30, 2026 · 23:01 UTC

↓ Download file

import type { MsaAnalysisRequest, MsaDerivedAnalysis } from "./analysis";
import type { MsaParseResult } from "./types";

export type MsaWorkerRequest =
  | {
      contents: string;
      filePath?: string;
      requestId: string;
      type: "parse";
    }
  | {
      requestId: string;
      payload: MsaAnalysisRequest;
      type: "analyze";
    };

export type MsaWorkerResponse =
  | {
      phase: "parsing";
      requestId: string;
      type: "phase";
    }
  | {
      phase: "parsed";
      requestId: string;
      result: MsaParseResult;
      type: "parse-result";
    }
  | {
      phase: "analyzing";
      requestId: string;
      type: "phase";
    }
  | {
      analysis: MsaDerivedAnalysis;
      phase: "ready";
      requestId: string;
      type: "analysis-result";
    }
  | {
      message: string;
      phase: "error";
      requestId: string;
      type: "error";
    };

SHA-256: 06112fb2740e1fa85bbe125f572bff320b14ab118cf8716df64eb9e9c007b710