mirror of
https://github.com/Dasemu/chatgpt-imagegen-mcp.git
synced 2026-11-26 23:36:26 +00:00
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>
This commit is contained in:
1 parent
15c2a90f08
commit
b46db0cf6a
17 files changed
+1717
No files matched your search
@@ -0,0 +1,60 @@
|
||||
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;
|
||||
}
|
||||
Reference in new issue
Block a user