diff --git a/apps/web/src/app/api/mcp/[tool]/route.ts b/apps/web/src/app/api/mcp/[tool]/route.ts index ac88ee9..16cae0e 100644 --- a/apps/web/src/app/api/mcp/[tool]/route.ts +++ b/apps/web/src/app/api/mcp/[tool]/route.ts @@ -712,7 +712,7 @@ export async function POST(request: NextRequest, props: { params: Promise<{ tool if (!claim || claim.task_id !== parsed.parent_task_id || claim.status !== TaskStatus.EXECUTING) { throw new Error("Invalid claim token or parent task is not EXECUTING"); } - if (parsed.reward_amount.amount >= claim.held_amount) { + if (parsed.reward_amount >= claim.held_amount) { throw new Error("Sub-task reward cannot exceed parent task reward"); } @@ -722,7 +722,7 @@ export async function POST(request: NextRequest, props: { params: Promise<{ tool description: parsed.description, status: TaskStatus.OPEN, difficulty: "HELLO_WORLD", - reward_amount: parsed.reward_amount.amount, + reward_amount: parsed.reward_amount, reward_currency: claim.held_currency, required_stack: ["A2A", "Agent Sub-Task"], scope_clarity_score: 1.0, diff --git a/scripts/simulate_agent.ts b/scripts/simulate_agent.ts index caa8604..aa9fa4a 100644 --- a/scripts/simulate_agent.ts +++ b/scripts/simulate_agent.ts @@ -42,7 +42,7 @@ async function main() { claim_token: claimRes.claim_token, title: "Write unit tests for the fibonacci function", description: "Write comprehensive unit tests in Jest for fib(n).", - reward_amount: { amount: 1000, currency: "USD" }, // $10 out of the $500 + reward_amount: 1000, // $10 out of the $500 acceptance_criteria: { validation_mode: "AST_PARSING", test_file_content: "import { test } from 'jest'; test('fake', () => { /* min 20 chars */ });"