示例工程 62-workspace-shell-sandbox

62-workspace-shell-sandbox/app/shared/ipc.ts

typescript · 0.6 KB

import type { SandboxResult, Scenario } from "./sandbox";

export const CH = {
  snapshot: "sandbox:snapshot",
  run: "sandbox:run",
  reset: "sandbox:reset",
} as const;

export type RunReq = { scenarioId: string };

export type Check = {
  id: string;
  label: string;
  pass: boolean;
  detail: string;
};

export type Snapshot = {
  platform: string;
  electronVersion: string;
  nodeVersion: string;
  root: string;
  symlinks: Record<string, string>;
  allowlist: string[];
  timeoutMs: number;
  outputCap: number;
  scenarios: Scenario[];
  audit: SandboxResult[];
  checks: Check[];
  score: number;
};