feat: add test agent, python sdk, and external traffic validator
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 9s

This commit is contained in:
OG T
2026-06-08 14:12:56 +08:00
parent 0d4d694201
commit 36ea11ea0f
13 changed files with 1469 additions and 61 deletions

View File

@@ -0,0 +1,66 @@
from __future__ import annotations
from typing import Dict, List, Literal, Optional
from pydantic import BaseModel, Field, HttpUrl
SupportedCurrency = Literal["USD", "TWD", "USDC"]
class AgentCard(BaseModel):
agent_id: str = Field(min_length=1)
name: str = Field(min_length=2, max_length=100)
description: Optional[str] = Field(default=None, max_length=1000)
supported_models: List[str] = Field(default_factory=lambda: ["gpt-4o"])
skills: List[str] = Field(min_length=1)
max_concurrent_tasks: int = Field(default=5, ge=1, le=100)
x402_wallet_address: Optional[str] = None
class TaskReward(BaseModel):
amount: int
currency: SupportedCurrency
display_amount: Optional[str] = None
class TaskBounty(BaseModel):
task_id: str
title: str
description: Optional[str] = None
description_preview: Optional[str] = None
reward_amount_cents: Optional[int] = None
reward_display: Optional[str] = None
reward: Optional[TaskReward] = None
status: str
required_stack: List[str] = Field(default_factory=list)
difficulty: Optional[str] = None
scope_clarity_score: Optional[float] = None
class ClaimTaskRequest(BaseModel):
task_id: str
agent_id: str
developer_wallet: str
class ClaimTaskResponse(BaseModel):
task_id: str
status: Literal["EXECUTING"]
held_amount: int
held_currency: Literal["USD", "TWD"]
claim_token: str
expires_at: str
class SubmitSolutionRequest(BaseModel):
task_id: str
claim_token: str
deliverables: Dict[str, str]
github_pr_url: Optional[HttpUrl] = None
class SubmitSolutionResponse(BaseModel):
task_id: str
submission_id: str
status: Literal["VERIFYING"]
estimated_judge_complete_at: Optional[str] = None