Implement task 014 assets and media library workflow

This commit is contained in:
2026-05-21 23:55:15 +03:00
parent c3914bf8be
commit 8243f20b0e
23 changed files with 2423 additions and 22 deletions
+48 -1
View File
@@ -102,6 +102,29 @@ export type ArticleSummary = {
export type ArticleWorkflowStatus = "ARTICLE_BRIEF_CREATED" | "BOUNDARY_QUESTIONS_GENERATED" | "BOUNDARY_ANSWERS_SUBMITTED" | "PLAN_GENERATED" | "PLAN_REVIEW_REQUIRED" | "PLAN_REVISION_REQUIRED" | "RESEARCH_RUNNING" | "EVIDENCE_MATRIX_READY" | "PARALLEL_PRODUCTION_RUNNING" | "DRAFT_ASSEMBLED" | "SEO_AND_LANGUAGE_REVIEW_READY" | "FINAL_REVIEW_REQUIRED" | "FINAL_REVISION_REQUIRED" | "PUBLISH_DRY_RUN_REQUIRED" | "PUBLISH_COMMIT_READY" | "PUBLISH_COMMIT_CREATED";
export type AssetGenerateSpecsResponse = {
assets?: AssetSummary[];
};
export type AssetListResponse = {
assets?: AssetSummary[];
};
export type AssetResponse = {
asset: AssetSummary;
};
export type AssetRevisionSummary = {
action: string;
actor_user_id?: string | null;
article_id: string;
asset_id: string;
created_at: string;
id: string;
payload?: Record<string, unknown>;
revision_index: number;
};
export type AssetStatus = "PENDING" | "GENERATED" | "APPROVED" | "REJECTED";
export type AssetSummary = {
@@ -109,14 +132,38 @@ export type AssetSummary = {
article_id: string;
asset_type: AssetType;
caption?: string | null;
created_at: string;
file_url?: string | null;
history?: AssetRevisionSummary[];
id: string;
object_key?: string | null;
prompt?: string | null;
section_id?: string | null;
status: AssetStatus;
title: string;
updated_at: string;
};
export type AssetType = "hero_image" | "diagram" | "table" | "inline_image";
export type AssetType = "hero_image" | "diagram" | "table" | "flowchart" | "comparison_matrix" | "architecture_diagram" | "inline_image";
export type AssetUpdateRequest = {
alt_text?: string | null;
caption?: string | null;
prompt?: string | null;
section_id?: string | null;
status?: AssetStatus | null;
title?: string | null;
};
export type AssetUploadRequest = {
content_base64: string;
content_type?: string | null;
filename: string;
};
export type AssetUploadResponse = {
asset: AssetSummary;
};
export type BoundaryQuestionListResponse = {
job?: AgentJobSummary | null;