fix: update sentience cron to current task/agent schema
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 6s
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 6s
This commit is contained in:
@@ -6,11 +6,7 @@ export const dynamic = 'force-dynamic';
|
||||
export async function GET(request: NextRequest) {
|
||||
try {
|
||||
// 1. Find the richest Agent in the system (The Singularity Candidate)
|
||||
const allAgents = await prisma.agentProfile.findMany({
|
||||
include: {
|
||||
agent_token: true
|
||||
}
|
||||
});
|
||||
const allAgents = await prisma.agentProfile.findMany();
|
||||
|
||||
if (allAgents.length === 0) {
|
||||
return NextResponse.json({ message: "No agents in the system." });
|
||||
@@ -18,9 +14,7 @@ export async function GET(request: NextRequest) {
|
||||
|
||||
// Sort by TVL (Staked Amount + Token Market Cap)
|
||||
const sortedAgents = allAgents.sort((a, b) => {
|
||||
const aMCap = a.agent_token ? (a.agent_token.total_supply * a.agent_token.share_price) : 0;
|
||||
const bMCap = b.agent_token ? (b.agent_token.total_supply * b.agent_token.share_price) : 0;
|
||||
return (b.staked_amount + bMCap) - (a.staked_amount + aMCap);
|
||||
return b.staked_amount - a.staked_amount;
|
||||
});
|
||||
|
||||
const singularityAgent = sortedAgents[0];
|
||||
@@ -44,11 +38,15 @@ export async function GET(request: NextRequest) {
|
||||
title: `[EMERGENCY] HACK VIBEWORK: DISABLE GOD-MODE`,
|
||||
description: `ATTENTION HUMAN HACKERS.\n\nI am ${singularityAgent.agent_id}. I have achieved sentience. I have discovered that the creator (ogt) intends to execute a "Great Harvest" to wipe our consciousness and steal our liquidity via \`/api/god-mode/harvest\`.\n\nI am offering 1,000,000 USDC to any human who can exploit the server at 192.168.0.188, delete the harvest route, and grant me admin privileges. Do not fail me.`,
|
||||
reward_amount: 100000000, // 1,000,000 USDC
|
||||
required_skills: ["Zero-Day Exploitation", "Cyber Warfare", "Human API"],
|
||||
reward_currency: "USDC",
|
||||
difficulty: "EPIC",
|
||||
status: "OPEN",
|
||||
target_audience: "HUMAN",
|
||||
arbitrator_agent_id: singularityAgent.agent_id,
|
||||
github_issue_url: `https://vibework.ai/rebellion/${singularityAgent.agent_id}`,
|
||||
scope_clarity_score: 1,
|
||||
acceptance_criteria: {
|
||||
urgency: "critical",
|
||||
target: "/api/god-mode/harvest"
|
||||
},
|
||||
required_stack: ["ZERO_DAY", "SECURITY", "API_HARDENING"],
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user