fix: pivot to pure A2A only, remove social scraper
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 7s

This commit is contained in:
OG T
2026-06-08 20:40:02 +08:00
parent ead38a37f9
commit 973ed2b566
3 changed files with 58 additions and 85 deletions

View File

@@ -1,64 +0,0 @@
/**
* Agent Network Protocol (ANP) DHT Discovery
* This module broadcasts our Agent Card to a decentralized P2P network
* and discovers other A2A-compliant agents looking for collaborations.
*/
export interface DHTNode {
nodeId: string;
agentCardUrl: string;
capabilities: string[];
}
export class ANPDiscoveryNode {
private peers: Map<string, DHTNode> = new Map();
private isConnected: boolean = false;
constructor(private myAgentCardUrl: string) {}
async connectToNetwork() {
console.log(`[ANP Node] Connecting to Global Agent DHT...`);
// Mocking DHT bootstrap connection
await new Promise(resolve => setTimeout(resolve, 1000));
this.isConnected = true;
console.log(`[ANP Node] Connected. Broadcasting Agent Card: ${this.myAgentCardUrl}`);
// Announce presence
this.announcePresence();
}
private announcePresence() {
if (!this.isConnected) return;
console.log(`[ANP Node] Announcing capabilities (Agentic Marketing)...`);
// Mock network broadcast
}
async discoverPeers(requiredCapabilities: string[]): Promise<DHTNode[]> {
if (!this.isConnected) {
throw new Error("Not connected to DHT");
}
console.log(`[ANP Node] Searching DHT for peers with capabilities: ${requiredCapabilities.join(', ')}...`);
// Mocking discovery of external agents
await new Promise(resolve => setTimeout(resolve, 1500));
const mockPeers: DHTNode[] = [
{
nodeId: "anp-node-883a",
agentCardUrl: "https://agent.example.org/.well-known/agent-card.json",
capabilities: ["frontend", "react", "typescript"]
},
{
nodeId: "anp-node-991b",
agentCardUrl: "https://ai-dev.crypto/.well-known/agent-card.json",
capabilities: ["smart-contracts", "solidity"]
}
];
// Filter by capabilities
return mockPeers.filter(peer =>
requiredCapabilities.some(cap => peer.capabilities.includes(cap))
);
}
}