import { DetailType, JudgeResultBody, type LangConfig, NormalizedSubtask, ProblemConfigFile, } from '@hydrooj/common'; import { CopyInFile } from './sandbox'; import type { JudgeTask } from './task'; export interface Execute { execute: string; clean: () => Promise; copyIn: Record; [Symbol.asyncDispose]: () => Promise; _cacheable?: string; } export type NextFunction = (body: Partial) => Promise | void; export interface ParsedConfig extends Omit { count: number; time: number; memory: number; subtasks: NormalizedSubtask[]; detail: DetailType; } export { JudgeRequest } from '@hydrooj/common'; export interface Session { getLang: (name: string, doThrow?: boolean) => LangConfig; getReporter: (task: JudgeTask) => { next: NextFunction, end: NextFunction }; fetchFile: (namespace: T, files: Record) => Promise; postFile: (target: string, filename: string, file: string) => Promise; config: { detail: DetailType, host?: string, trusted?: boolean }; }