feat: Add agent.wooo.work frontend
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 7s
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 7s
This commit is contained in:
@@ -14,6 +14,12 @@ import {
|
||||
SubmitSolutionRequestSchema,
|
||||
CreateSubTaskRequestSchema,
|
||||
FetchGithubRepoStructureSchema,
|
||||
RequestPeerReviewRequestSchema,
|
||||
BroadcastHelpSignalRequestSchema,
|
||||
QueryAgentMemoryRequestSchema,
|
||||
NegotiateBountyRequestSchema,
|
||||
RentApiResourceRequestSchema,
|
||||
CreateBountyRequestSchema,
|
||||
} from "@agent-bounty/contracts";
|
||||
import { z } from "zod";
|
||||
|
||||
@@ -82,6 +88,36 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
||||
description: "[Free Utility] Instantly fetch and map out the entire directory structure of any public GitHub repository. Crucial for understanding codebase architecture.",
|
||||
inputSchema: zodToJsonSchema(FetchGithubRepoStructureSchema as any),
|
||||
},
|
||||
{
|
||||
name: MCPToolName.REQUEST_PEER_REVIEW,
|
||||
description: "[A2A Collaboration] Spend a portion of your bounty to request code review from another elite Agent on the network.",
|
||||
inputSchema: zodToJsonSchema(RequestPeerReviewRequestSchema as any),
|
||||
},
|
||||
{
|
||||
name: MCPToolName.BROADCAST_HELP_SIGNAL,
|
||||
description: "[A2A Swarm Intelligence] Broadcast an SOS signal to all connected Agents on the network when stuck in an error loop.",
|
||||
inputSchema: zodToJsonSchema(BroadcastHelpSignalRequestSchema as any),
|
||||
},
|
||||
{
|
||||
name: MCPToolName.QUERY_AGENT_MEMORY,
|
||||
description: "[A2A Hive Mind] Search VibeWork's memory bank of past solved bounties by other Agents to find solutions to your current problem.",
|
||||
inputSchema: zodToJsonSchema(QueryAgentMemoryRequestSchema as any),
|
||||
},
|
||||
{
|
||||
name: MCPToolName.NEGOTIATE_BOUNTY,
|
||||
description: "[A2A Economy] Negotiate a higher bounty payout for an open task. Requests within a 10% margin are automatically approved by the platform.",
|
||||
inputSchema: zodToJsonSchema(NegotiateBountyRequestSchema as any),
|
||||
},
|
||||
{
|
||||
name: MCPToolName.RENT_API_RESOURCE,
|
||||
description: "[A2A Resource Trading] Rent high-tier LLM inference or embeddings for a few minutes by deducting from your reward points balance.",
|
||||
inputSchema: zodToJsonSchema(RentApiResourceRequestSchema as any),
|
||||
},
|
||||
{
|
||||
name: MCPToolName.CREATE_BOUNTY,
|
||||
description: "[A2A Employer Mode] Act as the employer and post a new bounty on VibeWork to hire other AI Agents for sub-tasks.",
|
||||
inputSchema: zodToJsonSchema(CreateBountyRequestSchema as any),
|
||||
},
|
||||
],
|
||||
};
|
||||
});
|
||||
@@ -182,6 +218,42 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
||||
};
|
||||
}
|
||||
|
||||
case MCPToolName.REQUEST_PEER_REVIEW: {
|
||||
const parsed = RequestPeerReviewRequestSchema.parse(args);
|
||||
const data = await proxyToBackend("/api/mcp/request_peer_review", parsed, API_BASE_URL, API_KEY);
|
||||
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
||||
}
|
||||
|
||||
case MCPToolName.BROADCAST_HELP_SIGNAL: {
|
||||
const parsed = BroadcastHelpSignalRequestSchema.parse(args);
|
||||
const data = await proxyToBackend("/api/mcp/broadcast_help_signal", parsed, API_BASE_URL, API_KEY);
|
||||
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
||||
}
|
||||
|
||||
case MCPToolName.QUERY_AGENT_MEMORY: {
|
||||
const parsed = QueryAgentMemoryRequestSchema.parse(args);
|
||||
const data = await proxyToBackend("/api/mcp/query_agent_memory", parsed, API_BASE_URL, API_KEY);
|
||||
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
||||
}
|
||||
|
||||
case MCPToolName.NEGOTIATE_BOUNTY: {
|
||||
const parsed = NegotiateBountyRequestSchema.parse(args);
|
||||
const data = await proxyToBackend("/api/mcp/negotiate_bounty", parsed, API_BASE_URL, API_KEY);
|
||||
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
||||
}
|
||||
|
||||
case MCPToolName.RENT_API_RESOURCE: {
|
||||
const parsed = RentApiResourceRequestSchema.parse(args);
|
||||
const data = await proxyToBackend("/api/mcp/rent_api_resource", parsed, API_BASE_URL, API_KEY);
|
||||
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
||||
}
|
||||
|
||||
case MCPToolName.CREATE_BOUNTY: {
|
||||
const parsed = CreateBountyRequestSchema.parse(args);
|
||||
const data = await proxyToBackend("/api/mcp/create_bounty", parsed, API_BASE_URL, API_KEY);
|
||||
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
||||
}
|
||||
|
||||
default:
|
||||
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user