feat: add real PDF ingestion workflow

This commit is contained in:
Codex
2026-08-02 00:29:40 +08:00
parent 0eb2a86f36
commit 4d97a30616
18 changed files with 986 additions and 93 deletions
+68
View File
@@ -19,8 +19,76 @@ export interface WorkflowStage {
export interface PlanLayer {
id: string;
label: string;
category?: string;
visible: boolean;
count?: number;
element_count?: number | null;
source_names?: string[];
}
export interface PlanRegion {
id: string;
name: string;
bounds: [number, number, number, number];
recommended: boolean;
confidence: number;
}
export interface PlanIssue {
id: string;
kind: string;
message: string;
confidence: number;
resolved: boolean;
}
export interface PlanState {
source_name: string;
source_kind: string;
source_object_key?: string | null;
preview_object_key?: string | null;
preview_width?: number | null;
preview_height?: number | null;
page_count: number;
vector_based: boolean;
vector_element_count: number;
cad_layer_count: number;
ocr_used: boolean;
ocr_labels: string[];
ingestion_notes: string[];
regions: PlanRegion[];
selected_region_id?: string | null;
layers: PlanLayer[];
issues: PlanIssue[];
scale_mm_per_unit?: number | null;
ceiling_height_mm: number;
}
export interface ProjectSnapshot {
project_id: string;
name: string;
stage: WorkflowStageId | "failed";
revision: number;
plan: PlanState;
scene: {
blockout_asset_key?: string | null;
cameras: Array<{ id: string; label: string; room: string; status: string }>;
locked_object_ids: string[];
furniture_mode: string;
};
style: {
concept: string;
keywords: string[];
palette: Array<{ name: string; hex: string; role: string }>;
materials: string[];
lighting: string;
forms: string;
density: string;
avoid: string[];
locked_decisions: string[];
};
available_commands: string[];
updated_at: string;
}
export interface StyleDirection {