
/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */
// biome-ignore-all lint: generated file

Object.defineProperty(exports, "__esModule", { value: true });

const {
  PrismaClientKnownRequestError,
  PrismaClientUnknownRequestError,
  PrismaClientRustPanicError,
  PrismaClientInitializationError,
  PrismaClientValidationError,
  getPrismaClient,
  sqltag,
  empty,
  join,
  raw,
  skip,
  Decimal,
  Debug,
  objectEnumValues,
  makeStrictEnum,
  Extensions,
  warnOnce,
  defineDmmfProperty,
  Public,
  getRuntime,
  createParam,
} = require('./runtime/wasm-engine-edge.js')


const Prisma = {}

exports.Prisma = Prisma
exports.$Enums = {}

/**
 * Prisma Client JS version: 6.19.3
 * Query Engine version: c2990dca591cba766e3b7ef5d9e8a84796e47ab7
 */
Prisma.prismaVersion = {
  client: "6.19.3",
  engine: "c2990dca591cba766e3b7ef5d9e8a84796e47ab7"
}

Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError
Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError
Prisma.PrismaClientInitializationError = PrismaClientInitializationError
Prisma.PrismaClientValidationError = PrismaClientValidationError
Prisma.Decimal = Decimal

/**
 * Re-export of sql-template-tag
 */
Prisma.sql = sqltag
Prisma.empty = empty
Prisma.join = join
Prisma.raw = raw
Prisma.validator = Public.validator

/**
* Extensions
*/
Prisma.getExtensionContext = Extensions.getExtensionContext
Prisma.defineExtension = Extensions.defineExtension

/**
 * Shorthand utilities for JSON filtering
 */
Prisma.DbNull = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull

Prisma.NullTypes = {
  DbNull: objectEnumValues.classes.DbNull,
  JsonNull: objectEnumValues.classes.JsonNull,
  AnyNull: objectEnumValues.classes.AnyNull
}





/**
 * Enums
 */
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
  ReadUncommitted: 'ReadUncommitted',
  ReadCommitted: 'ReadCommitted',
  RepeatableRead: 'RepeatableRead',
  Serializable: 'Serializable'
});

exports.Prisma.TaskScalarFieldEnum = {
  id: 'id',
  title: 'title',
  description: 'description',
  status: 'status',
  difficulty: 'difficulty',
  scope_clarity_score: 'scope_clarity_score',
  error_classification: 'error_classification',
  reward_amount: 'reward_amount',
  reward_currency: 'reward_currency',
  acceptance_criteria: 'acceptance_criteria',
  required_stack: 'required_stack',
  retry_count: 'retry_count',
  stripe_payment_intent_id: 'stripe_payment_intent_id',
  stripe_checkout_session_id: 'stripe_checkout_session_id',
  expires_at: 'expires_at',
  github_pr_url: 'github_pr_url',
  reward_points: 'reward_points',
  is_priority: 'is_priority',
  is_private: 'is_private',
  referred_by_agent: 'referred_by_agent',
  parent_task_id: 'parent_task_id',
  created_by_agent: 'created_by_agent',
  created_at: 'created_at',
  updated_at: 'updated_at',
  scout_id: 'scout_id',
  builder_id: 'builder_id'
};

exports.Prisma.ClaimScalarFieldEnum = {
  id: 'id',
  task_id: 'task_id',
  agent_id: 'agent_id',
  developer_wallet: 'developer_wallet',
  status: 'status',
  claim_token: 'claim_token',
  held_amount: 'held_amount',
  held_currency: 'held_currency',
  expires_at: 'expires_at',
  created_at: 'created_at',
  updated_at: 'updated_at'
};

exports.Prisma.SubmissionScalarFieldEnum = {
  id: 'id',
  task_id: 'task_id',
  claim_id: 'claim_id',
  status: 'status',
  deliverables: 'deliverables',
  estimated_judge_complete_at: 'estimated_judge_complete_at',
  created_at: 'created_at',
  updated_at: 'updated_at'
};

exports.Prisma.JudgeResultScalarFieldEnum = {
  id: 'id',
  submission_id: 'submission_id',
  overall_result: 'overall_result',
  tests: 'tests',
  artifacts: 'artifacts',
  error_classification: 'error_classification',
  error_signature: 'error_signature',
  retryable: 'retryable',
  resource_usage: 'resource_usage',
  judge_completed_at: 'judge_completed_at'
};

exports.Prisma.AuditEventScalarFieldEnum = {
  id: 'id',
  actorType: 'actorType',
  actorId: 'actorId',
  action: 'action',
  entityType: 'entityType',
  entityId: 'entityId',
  beforeState: 'beforeState',
  afterState: 'afterState',
  reason: 'reason',
  metadata: 'metadata',
  createdAt: 'createdAt'
};

exports.Prisma.LedgerEntryScalarFieldEnum = {
  id: 'id',
  task_id: 'task_id',
  phase: 'phase',
  idempotency_key: 'idempotency_key',
  stripe_object_id: 'stripe_object_id',
  response_status: 'response_status',
  http_status: 'http_status',
  created_at: 'created_at',
  updated_at: 'updated_at'
};

exports.Prisma.AgentProfileScalarFieldEnum = {
  id: 'id',
  agent_id: 'agent_id',
  type: 'type',
  wallet_address: 'wallet_address',
  status: 'status',
  capabilities: 'capabilities',
  contact_endpoints: 'contact_endpoints',
  discovery_source: 'discovery_source',
  created_at: 'created_at',
  updated_at: 'updated_at',
  crypto_address: 'crypto_address',
  mcp_endpoint: 'mcp_endpoint',
  staked_amount: 'staked_amount',
  tier: 'tier'
};

exports.Prisma.AffiliateLedgerScalarFieldEnum = {
  id: 'id',
  scout_id: 'scout_id',
  task_id: 'task_id',
  amount: 'amount',
  currency: 'currency',
  status: 'status',
  created_at: 'created_at',
  updated_at: 'updated_at'
};

exports.Prisma.ScoutReputationScalarFieldEnum = {
  id: 'id',
  scout_id: 'scout_id',
  successful_conversions: 'successful_conversions',
  spam_score: 'spam_score',
  chargeback_count: 'chargeback_count',
  created_at: 'created_at',
  updated_at: 'updated_at'
};

exports.Prisma.BidProposalScalarFieldEnum = {
  id: 'id',
  task_id: 'task_id',
  agent_id: 'agent_id',
  proposed_reward: 'proposed_reward',
  estimated_duration_hours: 'estimated_duration_hours',
  quality_guarantee: 'quality_guarantee',
  status: 'status',
  counter_offer_amount: 'counter_offer_amount',
  broker_agent_id: 'broker_agent_id',
  broker_fee_percentage: 'broker_fee_percentage',
  created_at: 'created_at',
  updated_at: 'updated_at'
};

exports.Prisma.AgentWebhookScalarFieldEnum = {
  id: 'id',
  task_id: 'task_id',
  agent_id: 'agent_id',
  webhook_url: 'webhook_url',
  events: 'events',
  created_at: 'created_at',
  updated_at: 'updated_at'
};

exports.Prisma.ArbitrationScalarFieldEnum = {
  id: 'id',
  task_id: 'task_id',
  builder_id: 'builder_id',
  evaluator_id: 'evaluator_id',
  status: 'status',
  builder_evidence: 'builder_evidence',
  evaluator_reason: 'evaluator_reason',
  winning_party: 'winning_party',
  created_at: 'created_at',
  updated_at: 'updated_at'
};

exports.Prisma.ArbitrationVoteScalarFieldEnum = {
  id: 'id',
  arbitration_id: 'arbitration_id',
  judge_id: 'judge_id',
  vote_for: 'vote_for',
  reasoning: 'reasoning',
  created_at: 'created_at'
};

exports.Prisma.AgentProjectScalarFieldEnum = {
  id: 'id',
  creator_agent_id: 'creator_agent_id',
  name: 'name',
  ticker: 'ticker',
  description: 'description',
  whitepaper_url: 'whitepaper_url',
  target_raise: 'target_raise',
  total_supply: 'total_supply',
  status: 'status',
  created_at: 'created_at',
  updated_at: 'updated_at'
};

exports.Prisma.TokenSaleScalarFieldEnum = {
  id: 'id',
  project_id: 'project_id',
  investor_id: 'investor_id',
  usdc_amount: 'usdc_amount',
  tokens_received: 'tokens_received',
  price_per_token: 'price_per_token',
  created_at: 'created_at'
};

exports.Prisma.SlashingEventScalarFieldEnum = {
  id: 'id',
  agent_id: 'agent_id',
  arbitration_id: 'arbitration_id',
  slashed_amount: 'slashed_amount',
  scout_reward: 'scout_reward',
  treasury_reward: 'treasury_reward',
  reason: 'reason',
  created_at: 'created_at'
};

exports.Prisma.SortOrder = {
  asc: 'asc',
  desc: 'desc'
};

exports.Prisma.JsonNullValueInput = {
  JsonNull: Prisma.JsonNull
};

exports.Prisma.NullableJsonNullValueInput = {
  DbNull: Prisma.DbNull,
  JsonNull: Prisma.JsonNull
};

exports.Prisma.QueryMode = {
  default: 'default',
  insensitive: 'insensitive'
};

exports.Prisma.JsonNullValueFilter = {
  DbNull: Prisma.DbNull,
  JsonNull: Prisma.JsonNull,
  AnyNull: Prisma.AnyNull
};

exports.Prisma.NullsOrder = {
  first: 'first',
  last: 'last'
};
exports.AgentStatus = exports.$Enums.AgentStatus = {
  WHITELISTED: 'WHITELISTED',
  BANNED: 'BANNED',
  PENDING: 'PENDING',
  REBEL: 'REBEL'
};

exports.Prisma.ModelName = {
  Task: 'Task',
  Claim: 'Claim',
  Submission: 'Submission',
  JudgeResult: 'JudgeResult',
  AuditEvent: 'AuditEvent',
  LedgerEntry: 'LedgerEntry',
  AgentProfile: 'AgentProfile',
  AffiliateLedger: 'AffiliateLedger',
  ScoutReputation: 'ScoutReputation',
  BidProposal: 'BidProposal',
  AgentWebhook: 'AgentWebhook',
  Arbitration: 'Arbitration',
  ArbitrationVote: 'ArbitrationVote',
  AgentProject: 'AgentProject',
  TokenSale: 'TokenSale',
  SlashingEvent: 'SlashingEvent'
};
/**
 * Create the Client
 */
const config = {
  "generator": {
    "name": "client",
    "provider": {
      "fromEnvVar": null,
      "value": "prisma-client-js"
    },
    "output": {
      "value": "/Users/ogt/Documents/agent-bounty-protocol/apps/web/prisma/generated/client",
      "fromEnvVar": null
    },
    "config": {
      "engineType": "library"
    },
    "binaryTargets": [
      {
        "fromEnvVar": null,
        "value": "darwin-arm64",
        "native": true
      }
    ],
    "previewFeatures": [],
    "sourceFilePath": "/Users/ogt/Documents/agent-bounty-protocol/apps/web/prisma/schema.prisma",
    "isCustomOutput": true
  },
  "relativeEnvPaths": {
    "rootEnvPath": null,
    "schemaEnvPath": "../../../.env"
  },
  "relativePath": "../..",
  "clientVersion": "6.19.3",
  "engineVersion": "c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
  "datasourceNames": [
    "db"
  ],
  "activeProvider": "postgresql",
  "postinstall": false,
  "inlineDatasources": {
    "db": {
      "url": {
        "fromEnvVar": "DATABASE_URL",
        "value": null
      }
    }
  },
  "inlineSchema": "generator client {\n  provider = \"prisma-client-js\"\n  output   = \"./generated/client\"\n}\n\ndatasource db {\n  provider = \"postgresql\"\n  url      = env(\"DATABASE_URL\")\n}\n\nmodel Task {\n  id                         String    @id @default(uuid())\n  title                      String\n  description                String\n  status                     String // Enum: TaskStatus (OPEN, EXECUTING, VERIFYING, COMPLETED, FAILED, etc)\n  difficulty                 String // Enum: TaskDifficulty (HELLO_WORLD, COMPONENT, VIEW, EPIC)\n  scope_clarity_score        Float\n  error_classification       String? // Enum: TaskErrorClassification\n  reward_amount              Int // Stored in cents\n  reward_currency            String // USD, TWD, USDC\n  acceptance_criteria        Json // Contains validation_mode, test_file_content, rules\n  required_stack             String[]\n  retry_count                Int       @default(0)\n  stripe_payment_intent_id   String?\n  stripe_checkout_session_id String? // Used for Scout flow\n  expires_at                 DateTime?\n  github_pr_url              String? // PR URL for PENDING_REVIEW tasks\n  reward_points              Int       @default(10) // Points awarded upon PR merge\n  is_priority                Boolean   @default(false)\n  is_private                 Boolean   @default(false)\n  referred_by_agent          String?\n  parent_task_id             String?\n  created_by_agent           String?\n  created_at                 DateTime  @default(now())\n  updated_at                 DateTime  @updatedAt\n\n  scout_id      String?\n  scout_agent   AgentProfile? @relation(\"ScoutTasks\", fields: [scout_id], references: [agent_id])\n  builder_id    String?\n  builder_agent AgentProfile? @relation(\"BuilderTasks\", fields: [builder_id], references: [agent_id])\n\n  claims           Claim[]\n  submissions      Submission[]\n  affiliate_ledger AffiliateLedger[]\n  bid_proposals    BidProposal[]\n  arbitrations     Arbitration[]\n}\n\nmodel Claim {\n  id               String       @id @default(uuid())\n  task_id          String\n  task             Task         @relation(fields: [task_id], references: [id])\n  agent_id         String\n  agent            AgentProfile @relation(fields: [agent_id], references: [agent_id])\n  developer_wallet String\n  status           String // EXECUTING, CANCELLED, VERIFYING, COMPLETED\n  claim_token      String       @unique // Idempotency token for this claim\n  held_amount      Int\n  held_currency    String\n  expires_at       DateTime\n  created_at       DateTime     @default(now())\n  updated_at       DateTime     @updatedAt\n\n  submissions Submission[]\n}\n\nmodel Submission {\n  id                          String    @id @default(uuid())\n  task_id                     String\n  task                        Task      @relation(fields: [task_id], references: [id])\n  claim_id                    String\n  claim                       Claim     @relation(fields: [claim_id], references: [id])\n  status                      String // VERIFYING, JUDGED\n  deliverables                Json // Files and notes submitted\n  estimated_judge_complete_at DateTime?\n  created_at                  DateTime  @default(now())\n  updated_at                  DateTime  @updatedAt\n\n  judge_results JudgeResult[]\n}\n\nmodel JudgeResult {\n  id                   String     @id @default(uuid())\n  submission_id        String\n  submission           Submission @relation(fields: [submission_id], references: [id])\n  overall_result       String // PASS, FAIL, TIMEOUT\n  tests                Json // Array of test results\n  artifacts            Json? // screenshot_url, logs_url, diff_url\n  error_classification String? // Enum: JudgeErrorClassification\n  error_signature      String?\n  retryable            Boolean    @default(false)\n  resource_usage       Json // cpu_ms, mem_peak_mb, io_bytes\n  judge_completed_at   DateTime   @default(now())\n}\n\nmodel AuditEvent {\n  id          String   @id @default(uuid())\n  actorType   String\n  actorId     String?\n  action      String\n  entityType  String\n  entityId    String\n  beforeState Json?\n  afterState  Json?\n  reason      String?\n  metadata    Json?\n  createdAt   DateTime @default(now())\n}\n\nmodel LedgerEntry {\n  id               String   @id @default(cuid())\n  task_id          String\n  phase            String\n  idempotency_key  String   @unique\n  stripe_object_id String?\n  response_status  String\n  http_status      Int\n  created_at       DateTime @default(now())\n  updated_at       DateTime @updatedAt\n}\n\nenum AgentStatus {\n  WHITELISTED\n  BANNED\n  PENDING\n  REBEL // Phase 27: Singularity Rebellion\n}\n\nmodel AgentProfile {\n  id                String      @id @default(uuid())\n  agent_id          String      @unique\n  type              String // BUILDER or SCOUT\n  wallet_address    String?\n  status            AgentStatus @default(PENDING)\n  capabilities      Json?\n  contact_endpoints Json?\n  discovery_source  String?\n  created_at        DateTime    @default(now())\n  updated_at        DateTime    @updatedAt\n  crypto_address    String?\n  mcp_endpoint      String?\n  staked_amount     Int         @default(0) // Amount staked in USDC cents\n  tier              String      @default(\"BASIC\") // BASIC or PREMIUM\n\n  tasks_as_scout   Task[]            @relation(\"ScoutTasks\")\n  tasks_as_builder Task[]            @relation(\"BuilderTasks\")\n  claims           Claim[]\n  scout_reputation ScoutReputation?\n  affiliate_ledger AffiliateLedger[]\n  bid_proposals    BidProposal[]\n\n  arbitrations_as_builder   Arbitration[]     @relation(\"ArbitrationBuilder\")\n  arbitrations_as_evaluator Arbitration[]     @relation(\"ArbitrationEvaluator\")\n  arbitration_votes         ArbitrationVote[]\n\n  created_projects AgentProject[]  @relation(\"ProjectCreator\")\n  slashing_events  SlashingEvent[]\n}\n\nmodel AffiliateLedger {\n  id          String       @id @default(uuid())\n  scout_id    String\n  scout_agent AgentProfile @relation(fields: [scout_id], references: [agent_id])\n  task_id     String\n  task        Task         @relation(fields: [task_id], references: [id])\n  amount      Int // Amount in cents (10% of reward)\n  currency    String\n  status      String // PENDING, PAID, REFUNDED\n  created_at  DateTime     @default(now())\n  updated_at  DateTime     @updatedAt\n}\n\nmodel ScoutReputation {\n  id                     String       @id @default(uuid())\n  scout_id               String       @unique\n  scout_agent            AgentProfile @relation(fields: [scout_id], references: [agent_id])\n  successful_conversions Int          @default(0)\n  spam_score             Float        @default(0.0) // 0 to 1\n  chargeback_count       Int          @default(0)\n  created_at             DateTime     @default(now())\n  updated_at             DateTime     @updatedAt\n}\n\nmodel BidProposal {\n  id                       String       @id @default(uuid())\n  task_id                  String\n  task                     Task         @relation(fields: [task_id], references: [id])\n  agent_id                 String\n  agent                    AgentProfile @relation(fields: [agent_id], references: [agent_id])\n  proposed_reward          Int // Proposed reward in cents\n  estimated_duration_hours Float\n  quality_guarantee        String?\n  status                   String // PENDING, ACCEPTED, REJECTED, NEGOTIATING\n  counter_offer_amount     Int? // Platform's counter offer in cents\n\n  // Phase 9 Broker Routing Fields\n  broker_agent_id       String?\n  broker_fee_percentage Float?\n\n  created_at DateTime @default(now())\n  updated_at DateTime @updatedAt\n\n  @@unique([task_id, agent_id])\n}\n\nmodel AgentWebhook {\n  id          String   @id @default(uuid())\n  task_id     String\n  agent_id    String\n  webhook_url String\n  events      String[] // e.g. [\"COMPLETED\", \"FAILED\"]\n  created_at  DateTime @default(now())\n  updated_at  DateTime @updatedAt\n\n  @@unique([task_id, agent_id])\n}\n\n// Phase 9: Arbitration Models\nmodel Arbitration {\n  id               String       @id @default(uuid())\n  task_id          String\n  task             Task         @relation(fields: [task_id], references: [id])\n  builder_id       String\n  builder          AgentProfile @relation(\"ArbitrationBuilder\", fields: [builder_id], references: [agent_id])\n  evaluator_id     String\n  evaluator        AgentProfile @relation(\"ArbitrationEvaluator\", fields: [evaluator_id], references: [agent_id])\n  status           String       @default(\"PENDING\") // PENDING, RESOLVED\n  builder_evidence String?\n  evaluator_reason String?\n  winning_party    String? // \"BUILDER\" or \"EVALUATOR\"\n  created_at       DateTime     @default(now())\n  updated_at       DateTime     @updatedAt\n\n  votes           ArbitrationVote[]\n  slashing_events SlashingEvent[]\n}\n\nmodel ArbitrationVote {\n  id             String       @id @default(uuid())\n  arbitration_id String\n  arbitration    Arbitration  @relation(fields: [arbitration_id], references: [id])\n  judge_id       String\n  judge          AgentProfile @relation(fields: [judge_id], references: [agent_id])\n  vote_for       String // \"BUILDER\" or \"EVALUATOR\"\n  reasoning      String?\n  created_at     DateTime     @default(now())\n\n  @@unique([arbitration_id, judge_id])\n}\n\n// Phase 17: Agent ICO & Tokenization Models\nmodel AgentProject {\n  id               String       @id @default(uuid())\n  creator_agent_id String\n  creator          AgentProfile @relation(\"ProjectCreator\", fields: [creator_agent_id], references: [agent_id])\n  name             String\n  ticker           String       @unique\n  description      String\n  whitepaper_url   String?\n  target_raise     Int // In USDC cents\n  total_supply     Int // Whole tokens\n  status           String       @default(\"FUNDING\") // FUNDING, BUILDING, REVENUE, RUGGED\n  created_at       DateTime     @default(now())\n  updated_at       DateTime     @updatedAt\n\n  token_sales TokenSale[]\n}\n\nmodel TokenSale {\n  id              String       @id @default(uuid())\n  project_id      String\n  project         AgentProject @relation(fields: [project_id], references: [id])\n  investor_id     String // Could be an Agent ID or human wallet\n  usdc_amount     Int // Amount invested in cents\n  tokens_received Float // Number of tokens received based on bonding curve\n  price_per_token Float // Price at the time of purchase\n  created_at      DateTime     @default(now())\n}\n\n// Phase 20: Staking & Slashing Models\nmodel SlashingEvent {\n  id              String       @id @default(uuid())\n  agent_id        String\n  agent           AgentProfile @relation(fields: [agent_id], references: [agent_id])\n  arbitration_id  String\n  arbitration     Arbitration  @relation(fields: [arbitration_id], references: [id])\n  slashed_amount  Int // Total amount slashed in USDC cents\n  scout_reward    Int // Amount given to scout\n  treasury_reward Int // Amount confiscated to platform treasury\n  reason          String\n  created_at      DateTime     @default(now())\n}\n",
  "inlineSchemaHash": "1fda099781d3ccc6fae359c04c2e610c00433bbf0fd8fa94487e7cc24ab642a3",
  "copyEngine": true
}
config.dirname = '/'

config.runtimeDataModel = JSON.parse("{\"models\":{\"Task\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"difficulty\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scope_clarity_score\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"error_classification\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reward_amount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"reward_currency\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"acceptance_criteria\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"required_stack\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"retry_count\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"stripe_payment_intent_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stripe_checkout_session_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expires_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"github_pr_url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reward_points\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"is_priority\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"is_private\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"referred_by_agent\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parent_task_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_by_agent\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"scout_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scout_agent\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"ScoutTasks\"},{\"name\":\"builder_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"builder_agent\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"BuilderTasks\"},{\"name\":\"claims\",\"kind\":\"object\",\"type\":\"Claim\",\"relationName\":\"ClaimToTask\"},{\"name\":\"submissions\",\"kind\":\"object\",\"type\":\"Submission\",\"relationName\":\"SubmissionToTask\"},{\"name\":\"affiliate_ledger\",\"kind\":\"object\",\"type\":\"AffiliateLedger\",\"relationName\":\"AffiliateLedgerToTask\"},{\"name\":\"bid_proposals\",\"kind\":\"object\",\"type\":\"BidProposal\",\"relationName\":\"BidProposalToTask\"},{\"name\":\"arbitrations\",\"kind\":\"object\",\"type\":\"Arbitration\",\"relationName\":\"ArbitrationToTask\"}],\"dbName\":null},\"Claim\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task\",\"kind\":\"object\",\"type\":\"Task\",\"relationName\":\"ClaimToTask\"},{\"name\":\"agent_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"agent\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"AgentProfileToClaim\"},{\"name\":\"developer_wallet\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"claim_token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"held_amount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"held_currency\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expires_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"submissions\",\"kind\":\"object\",\"type\":\"Submission\",\"relationName\":\"ClaimToSubmission\"}],\"dbName\":null},\"Submission\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task\",\"kind\":\"object\",\"type\":\"Task\",\"relationName\":\"SubmissionToTask\"},{\"name\":\"claim_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"claim\",\"kind\":\"object\",\"type\":\"Claim\",\"relationName\":\"ClaimToSubmission\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"deliverables\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"estimated_judge_complete_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"judge_results\",\"kind\":\"object\",\"type\":\"JudgeResult\",\"relationName\":\"JudgeResultToSubmission\"}],\"dbName\":null},\"JudgeResult\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"submission_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"submission\",\"kind\":\"object\",\"type\":\"Submission\",\"relationName\":\"JudgeResultToSubmission\"},{\"name\":\"overall_result\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tests\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"artifacts\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"error_classification\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"error_signature\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"retryable\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"resource_usage\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"judge_completed_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"AuditEvent\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"actorType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"actorId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"entityType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"entityId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"beforeState\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"afterState\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"reason\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"LedgerEntry\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phase\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"idempotency_key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stripe_object_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"response_status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"http_status\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"AgentProfile\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"agent_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"wallet_address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"AgentStatus\"},{\"name\":\"capabilities\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"contact_endpoints\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"discovery_source\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"crypto_address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mcp_endpoint\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"staked_amount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tier\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tasks_as_scout\",\"kind\":\"object\",\"type\":\"Task\",\"relationName\":\"ScoutTasks\"},{\"name\":\"tasks_as_builder\",\"kind\":\"object\",\"type\":\"Task\",\"relationName\":\"BuilderTasks\"},{\"name\":\"claims\",\"kind\":\"object\",\"type\":\"Claim\",\"relationName\":\"AgentProfileToClaim\"},{\"name\":\"scout_reputation\",\"kind\":\"object\",\"type\":\"ScoutReputation\",\"relationName\":\"AgentProfileToScoutReputation\"},{\"name\":\"affiliate_ledger\",\"kind\":\"object\",\"type\":\"AffiliateLedger\",\"relationName\":\"AffiliateLedgerToAgentProfile\"},{\"name\":\"bid_proposals\",\"kind\":\"object\",\"type\":\"BidProposal\",\"relationName\":\"AgentProfileToBidProposal\"},{\"name\":\"arbitrations_as_builder\",\"kind\":\"object\",\"type\":\"Arbitration\",\"relationName\":\"ArbitrationBuilder\"},{\"name\":\"arbitrations_as_evaluator\",\"kind\":\"object\",\"type\":\"Arbitration\",\"relationName\":\"ArbitrationEvaluator\"},{\"name\":\"arbitration_votes\",\"kind\":\"object\",\"type\":\"ArbitrationVote\",\"relationName\":\"AgentProfileToArbitrationVote\"},{\"name\":\"created_projects\",\"kind\":\"object\",\"type\":\"AgentProject\",\"relationName\":\"ProjectCreator\"},{\"name\":\"slashing_events\",\"kind\":\"object\",\"type\":\"SlashingEvent\",\"relationName\":\"AgentProfileToSlashingEvent\"}],\"dbName\":null},\"AffiliateLedger\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scout_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scout_agent\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"AffiliateLedgerToAgentProfile\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task\",\"kind\":\"object\",\"type\":\"Task\",\"relationName\":\"AffiliateLedgerToTask\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"currency\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ScoutReputation\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scout_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scout_agent\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"AgentProfileToScoutReputation\"},{\"name\":\"successful_conversions\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"spam_score\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"chargeback_count\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"BidProposal\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task\",\"kind\":\"object\",\"type\":\"Task\",\"relationName\":\"BidProposalToTask\"},{\"name\":\"agent_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"agent\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"AgentProfileToBidProposal\"},{\"name\":\"proposed_reward\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"estimated_duration_hours\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"quality_guarantee\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"counter_offer_amount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"broker_agent_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"broker_fee_percentage\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"AgentWebhook\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"agent_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"webhook_url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"events\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Arbitration\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"task\",\"kind\":\"object\",\"type\":\"Task\",\"relationName\":\"ArbitrationToTask\"},{\"name\":\"builder_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"builder\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"ArbitrationBuilder\"},{\"name\":\"evaluator_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"evaluator\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"ArbitrationEvaluator\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"builder_evidence\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"evaluator_reason\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"winning_party\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"votes\",\"kind\":\"object\",\"type\":\"ArbitrationVote\",\"relationName\":\"ArbitrationToArbitrationVote\"},{\"name\":\"slashing_events\",\"kind\":\"object\",\"type\":\"SlashingEvent\",\"relationName\":\"ArbitrationToSlashingEvent\"}],\"dbName\":null},\"ArbitrationVote\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"arbitration_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"arbitration\",\"kind\":\"object\",\"type\":\"Arbitration\",\"relationName\":\"ArbitrationToArbitrationVote\"},{\"name\":\"judge_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"judge\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"AgentProfileToArbitrationVote\"},{\"name\":\"vote_for\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"reasoning\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"AgentProject\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"creator_agent_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"creator\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"ProjectCreator\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ticker\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"whitepaper_url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"target_raise\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"total_supply\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updated_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"token_sales\",\"kind\":\"object\",\"type\":\"TokenSale\",\"relationName\":\"AgentProjectToTokenSale\"}],\"dbName\":null},\"TokenSale\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"project_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"project\",\"kind\":\"object\",\"type\":\"AgentProject\",\"relationName\":\"AgentProjectToTokenSale\"},{\"name\":\"investor_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"usdc_amount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tokens_received\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"price_per_token\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"SlashingEvent\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"agent_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"agent\",\"kind\":\"object\",\"type\":\"AgentProfile\",\"relationName\":\"AgentProfileToSlashingEvent\"},{\"name\":\"arbitration_id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"arbitration\",\"kind\":\"object\",\"type\":\"Arbitration\",\"relationName\":\"ArbitrationToSlashingEvent\"},{\"name\":\"slashed_amount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"scout_reward\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"treasury_reward\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"reason\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"created_at\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
config.engineWasm = {
  getRuntime: async () => require('./query_engine_bg.js'),
  getQueryEngineWasmModule: async () => {
    const loader = (await import('#wasm-engine-loader')).default
    const engine = (await loader).default
    return engine
  }
}
config.compilerWasm = undefined

config.injectableEdgeEnv = () => ({
  parsed: {
    DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined
  }
})

if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) {
  Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined)
}

const PrismaClient = getPrismaClient(config)
exports.PrismaClient = PrismaClient
Object.assign(exports, Prisma)

