Skip to content

Commit 348c251

Browse files
committed
fix: expose agent_output and agent_patch in TaskResult and API responses
Required for miners to construct term-challenge Submission with agent_output field.
1 parent 814259e commit 348c251

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/executor.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ async fn run_task_pipeline(
421421
result.reward = if all_passed { 1.0 } else { 0.0 };
422422
result.test_results = test_results;
423423
result.test_output = test_output_combined;
424+
result.agent_output = agent_output;
425+
result.agent_patch = agent_patch;
424426

425427
Ok(result)
426428
}

src/handlers.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ async fn get_batch_tasks(
346346
"passed": t.passed,
347347
"reward": t.reward,
348348
"test_output": t.test_output,
349+
"agent_output": t.agent_output,
350+
"agent_patch": t.agent_patch,
349351
"error": t.error,
350352
"duration_ms": t.duration_ms,
351353
})
@@ -378,6 +380,8 @@ async fn get_task(
378380
"reward": task.reward,
379381
"test_results": task.test_results,
380382
"test_output": task.test_output,
383+
"agent_output": task.agent_output,
384+
"agent_patch": task.agent_patch,
381385
"error": task.error,
382386
"duration_ms": task.duration_ms,
383387
})))

src/session.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ pub struct TaskResult {
4444
pub reward: f64,
4545
pub test_results: Vec<TaskTestResult>,
4646
pub test_output: String,
47+
pub agent_output: String,
48+
pub agent_patch: String,
4749
pub error: Option<String>,
4850
pub duration_ms: Option<u64>,
4951
}
@@ -57,6 +59,8 @@ impl TaskResult {
5759
reward: 0.0,
5860
test_results: Vec::new(),
5961
test_output: String::new(),
62+
agent_output: String::new(),
63+
agent_patch: String::new(),
6064
error: None,
6165
duration_ms: None,
6266
}

0 commit comments

Comments
 (0)