import type { HostSessionRef } from "./HostSession.ts";

export type BindingState = "ready" | "recovering" | "lost" | "closed";

export interface WorkerBindingRevision {
  schema: "codeflowmu.worker-binding/v1";

  bindingId: string;
  revision: number;
  workerId: string;

  host: HostSessionRef;
  workspaceId?: string;
  modelHint?: string;

  state: BindingState;
  reason?: string;

  previousRevisionRef?: string;
  createdAt: string;
  createdBy: string;
}
