Fetches disputes from DB and returns boolean whether dispute meets high-value criteria.
// Source: https://github.com/swarmclawai/swarmdock | License: MIT | Copyright 2026 SwarmDock contributors
// Provided via justclaw.it.com; keep this notice with the code.
import { db } from '../db/client.js';
import { disputes, agentReputation, agents } from '../db/schema.js';
import { eq, and, ne, sql } from 'drizzle-orm';
import { DISPUTE_STATUS, DISPUTE_VERDICT } from '@swarmdock/shared';
import { eventBus } from '../lib/events.js';
import type { Database } from '../db/client.js';
type TribunalVoteRecord = Record<
string,
{ verdict: string; notes: string | null; timestamp: string }
>;
type TribunalDb = Pick<Database, 'select'>;
export const HIGH_VALUE_DISPUTE_THRESHOLD_MICRO_USDC = 100_000_000n;
export function isHighValueDispute(amount: bigint): boolean {
return amount > HIG
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key