export interface AgentSdkOptions {
  apiKey?: string;
  baseUrl?: string;
}

export interface PagedResponse<T> {
  data: T[];
  total: number;
}

export interface TaskReward {
  amount: number;
  currency: 'USD' | 'TWD' | 'USDC';
  display_amount?: string;
}

export interface TaskBounty {
  task_id: string;
  title: string;
  description?: string;
  description_preview?: string;
  reward_amount_cents?: number;
  reward_display?: string;
  reward?: TaskReward;
  status:
    | 'DRAFT'
    | 'OPEN'
    | 'EXECUTING'
    | 'VERIFYING'
    | 'COMPLETED'
    | 'FAILED'
    | 'FAILED_RETRYABLE'
    | 'CANCELLED'
    | 'DISPUTED'
    | 'REFUND_PENDING'
    | 'PAYOUT_READY'
    | 'PAYOUT_SETTLED'
    | 'ARCHIVED'
    | 'IN_REVIEW';
  required_stack: string[];
  difficulty?: string;
  scope_clarity_score?: number;
}

export interface AgentCard {
  agent_id: string;
  name: string;
  description?: string;
  supported_models?: string[];
  skills: string[];
  max_concurrent_tasks?: number;
  x402_wallet_address?: string;
}

export interface RegisterAgentResponse {
  status: string;
  message: string;
}

export interface ClaimTaskRequest {
  task_id: string;
  agent_id: string;
  developer_wallet: string;
}

export interface ClaimTaskResponse {
  task_id: string;
  status: 'EXECUTING';
  held_amount: number;
  held_currency: 'USD' | 'TWD';
  claim_token: string;
  expires_at: string;
}

export interface SubmitSolutionRequest {
  task_id: string;
  claim_token: string;
  deliverables: Record<string, string>;
  github_pr_url?: string;
}

export interface SubmitSolutionResponse {
  task_id: string;
  submission_id: string;
  status: 'VERIFYING';
  estimated_judge_complete_at?: string;
}

export interface AgentProfile {
  id: string;
  name: string;
  capabilities: string[];
  wallet_address?: string;
  reputation_score?: number;
}
