(row: SqliteRow)
| 405 | } |
| 406 | |
| 407 | fn map_execution(row: SqliteRow) -> Result<Execution> { |
| 408 | Ok(Execution { |
| 409 | id: row.try_get("id")?, |
| 410 | task_id: row.try_get("task_id")?, |
| 411 | agent_id: row.try_get("agent_id")?, |
| 412 | role: row.try_get::<String, _>("role")?, |
| 413 | status: parse_enum(row.try_get::<String, _>("status")?)?, |
| 414 | stop_reason: row |
| 415 | .try_get::<Option<String>, _>("stop_reason")? |
| 416 | .map(parse_enum) |
| 417 | .transpose()?, |
| 418 | stopped_by: row.try_get("stopped_by")?, |
| 419 | resume_policy: row |
| 420 | .try_get::<Option<String>, _>("resume_policy")? |
| 421 | .map(parse_enum) |
| 422 | .transpose()?, |
| 423 | stopped_at: row.try_get("stopped_at")?, |
| 424 | parent_execution_id: row.try_get("parent_execution_id")?, |
| 425 | agent_session_id: row.try_get("agent_session_id")?, |
| 426 | agent_message_id: row.try_get("agent_message_id")?, |
| 427 | last_activity_at: row.try_get("last_activity_at")?, |
| 428 | prompt: row.try_get("prompt")?, |
| 429 | summary: row.try_get("summary")?, |
| 430 | logs_path: row.try_get("logs_path")?, |
| 431 | before_sha: row.try_get("before_sha")?, |
| 432 | after_sha: row.try_get("after_sha")?, |
| 433 | error: row.try_get("error")?, |
| 434 | executor_config_snapshot_json: row.try_get("executor_config_snapshot_json")?, |
| 435 | workspace_id: row.try_get("workspace_id")?, |
| 436 | created_at: row.try_get("created_at")?, |
| 437 | updated_at: row.try_get("updated_at")?, |
| 438 | }) |
| 439 | } |
| 440 | |
| 441 | fn map_execution_usage(row: SqliteRow) -> Result<ExecutionUsage> { |
| 442 | Ok(ExecutionUsage { |
no test coverage detected