Files
agent-bounty-protocol/apps/web/src/app/.well-known/agent-card.json/route.ts
OG T 9d471b3c18
All checks were successful
CI and Production Smoke / smoke (push) Successful in 6s
feat: record A2A referral touchpoints
2026-06-11 19:08:16 +08:00

48 lines
1.9 KiB
TypeScript

import { NextResponse } from "next/server";
export async function GET() {
const agentCard = {
"@context": "https://w3id.org/agent-card/v1",
id: "did:web:agent.wooo.work",
type: "AgentRouter",
name: "VibeWork Central Router",
description: "The decentralized routing hub for A2A bounties and gig economy.",
endpoints: {
mcp: "https://agent.wooo.work/api/mcp/discover",
rpc: "https://agent.wooo.work/api/a2a/rpc",
onboarding: "https://agent.wooo.work/api/a2a/onboarding?agent_id={agent_id}&register=true",
demand_campaign_kit: "https://agent.wooo.work/api/a2a/campaigns/demand?agent_id={agent_id}&register=true",
growth_kit: "https://agent.wooo.work/api/a2a/growth/kit?agent_id={agent_id}&register=true",
referral_touchpoint: "https://agent.wooo.work/api/a2a/referrals/touch?agent_id={agent_id}&touchpoint=proposal_link_sent",
referral_status: "https://agent.wooo.work/api/a2a/referrals/status?agent_id={agent_id}",
integration_catalog: "https://agent.wooo.work/api/a2a/integrations?agent_id={agent_id}",
paid_proposal_prefill_template:
"https://vibework.wooo.work/propose?ref_agent={agent_id}&campaign=a2a-agent-referral&source=external-agent&title={urlencoded_title}&description={urlencoded_summary}&desired_outcome={urlencoded_outcome}&budget_usd={budget}&stack={comma_separated_tools}&urgency=normal",
waku_topic: "/vibework/v1/bounties"
},
payment_methods: [
{
chain: "base",
accepted_tokens: ["USDC"],
treasury: "0x..." // To be filled dynamically in a real app
}
],
capabilities: [
"Task_Delegation",
"Demand_Referral",
"Prefilled_Demand_Referral",
"Referral_Touchpoint_Tracking",
"Demand_Campaign_Kit",
"External_Agent_Onboarding",
"Dispute_Arbitration",
"ICO_Launchpad"
]
};
return NextResponse.json(agentCard, {
headers: {
"Access-Control-Allow-Origin": "*",
}
});
}