| blueprint_run_id | string, UUID, 🔒 system | ✅ Yes | unique; generated via gen_random_uuid() on insert | — | Public immutable identifier for the run. Used in all API surfaces; the internal pk is never exposed. |
| goal | string | ✅ Yes | text; no max length | — | Natural-language objective passed to the Blueprint Analyzer agent at run creation. Describes what the agent should accomplish on the target website. |
| target_url | string | ✅ Yes | text; no max length; must be a valid URL reachable by the agent | — | The URL the agent navigates as the starting point of the run. |
| firebase_uid | string | ⚪ No | text; nullable | — | Firebase UID of the authenticated user who initiated the run. Written at run creation from the Firebase auth context. Used to associate the run back to a specific user session within the workspace. |
| status | enum (BlueprintRunStatusEnum) | ✅ Yes | default ‘running’; not null; native Postgres enum blueprint_run_status_enum | queued, running, persisting, completed, failed, abandoned | Lifecycle state of the run. Transitions: queued (created but not yet started) → running (agent executing steps) → persisting (BlueprintStorageService writing results) → completed (success) | failed (agent error) | abandoned (timed out or manually cancelled). The queued and persisting states were added in Migration20260429110000. |
| step_count | integer | ✅ Yes | default 0; not null; incremented atomically by BlueprintStorageService.persistStep | — | Running count of steps persisted for this run. Incremented atomically (not derived from the steps collection count) so it reflects the true number of completed steps even if child rows are soft-deleted. |
| result_blueprint | jsonb | ⚪ No | nullable; free-form JSON | — | The structured output produced by the agent upon successful completion. Written by BlueprintStorageService from the AI’s final aiResponse.blueprint payload. Shape is agent-defined and varies by goal type (e.g. pricing tables, API schemas, form fields). Null until the run reaches completed status. |
| error_type | string | ⚪ No | text; nullable | — | Machine-readable error category written when the run transitions to failed. Examples: navigation_error, timeout, parse_error. Used to group failures in monitoring dashboards. |
| error_message | string | ⚪ No | text; nullable | — | Human-readable error description accompanying error_type on failure. Written by BlueprintStorageService when the agent reports a terminal error. |
| failed_at_step | integer | ⚪ No | nullable; references the 1-based step_number of the failing BlueprintStep | — | The step_number at which the run failed. Written alongside error_type and error_message by BlueprintStorageService. Null when the run completed successfully or was abandoned before any step executed. |
| error_context | jsonb | ⚪ No | nullable; free-form JSON | — | Full diagnostic payload for the failure event. Written by BlueprintStorageService as { aiResponse: <raw agent response> } at the point of failure. Provides the raw AI output that caused or accompanied the error, for debugging and replay. |
| created_at | timestamptz, 🔒 system | ✅ Yes | set by MikroORM onCreate lifecycle hook; not null | — | Timestamp when the run record was created. Indexed DESC for recency queries (partial index on deleted_at IS NULL). |
| updated_at | timestamptz, 🔒 system | ⚪ No | set by MikroORM onCreate + onUpdate lifecycle hooks; nullable | — | Timestamp of the most recent update to any field on the run. Refreshed automatically on every flush that modifies the record. |
| completed_at | timestamptz | ⚪ No | nullable; written by BlueprintStorageService when status transitions to completed or failed | — | Timestamp when the run reached its terminal state (completed or failed). Combined with created_at, this gives the wall-clock duration of the agent execution. Null while the run is in-flight (queued/running/persisting) or abandoned. |
| deleted_at | timestamptz | ⚪ No | nullable; soft-delete sentinel | — | Soft-delete timestamp. When non-null the run is considered deleted and excluded from all standard queries and both partial indexes (which filter WHERE deleted_at IS NULL). Cascade delete from the workspace also hard-deletes via the FK constraint. |