Files
chatgpt-imagegen-mcp/src/types.ts
T
dasemuandClaude Opus 5.5 b46db0cf6a feat: generate images through chatgpt.com with Playwright behind an MCP server
Port of ZenvairoProspect's imagegen (legacy/whatsapp-mockup) to the
ZenvairoMediaGenerator-MCP submit+poll contract: persistent logged-in
Chromium profile, selector fallback lists, serial queue with pacing and a
circuit breaker for usage limits and lost sessions, signed public URLs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 17:09:51 +02:00

61 lines
1.2 KiB
TypeScript

export type JobStatus = "QUEUING" | "RUNNING" | "COMPLETED" | "FAILED";
export interface ToolArgument {
name: string;
value: unknown;
}
export interface StoredOutput {
index: number;
path: string;
filename: string;
mimeType: string;
sizeBytes: number;
sha256: string;
width?: number;
height?: number;
}
export type ImageMimeType = "image/png" | "image/jpeg" | "image/webp";
export interface InlineReferenceImage {
base64: string;
mime_type: ImageMimeType;
}
export interface GenerationReferenceImage {
generation_id: string;
index: number;
}
export type ReferenceImage = InlineReferenceImage | GenerationReferenceImage;
export interface ImageRequest {
prompt: string;
aspectRatio: string;
imageCount: number;
references: InlineReferenceImage[];
}
export interface JobError {
code: string;
message: string;
retryable: boolean;
retryAfter?: string;
}
export interface GenerationJob {
generationId: string;
taskTraceId?: string;
model: string;
request?: ImageRequest;
status: JobStatus;
queuePosition?: number;
createdAt: string;
startedAt?: string;
completedAt?: string;
updatedAt: string;
outputs?: StoredOutput[];
error?: JobError;
}