示例工程 59-agent-runtime-main

59-agent-runtime-main/app/shared/ipc.ts

typescript · 0.6 KB

import type { RunEvent, RunSummary } from "./runtime";

export const CH = {
  start: "runtime:start",
  cancel: "runtime:cancel",
  snapshot: "runtime:snapshot",
} as const;

export type StartReq = {
  providerId: string;
  prompt: string;
};

export type Snapshot = {
  platform: string;
  electronVersion: string;
  nodeVersion: string;
  providers: Array<{ id: string; label: string; note: string }>;
  running: boolean;
  providerId: string;
  events: RunEvent[];
  last: RunSummary | null;
  history: RunSummary[];
  checks: Array<{ id: string; label: string; pass: boolean; detail: string }>;
  score: number;
};