- apps/web: Next.js dashboard — pages (/, /skills, /marketplace, /protected) + API routes
(/api/health, /api/skills, /api/services, /api/x402/weather) adapted from the real x402
next fullstack example; reads a generated static skills catalog (251 skills, 62 domains)
- generated skills.json catalog (gen-catalog now emits JSON for web + tooling)
- contracts: interfaces/, libraries/ (SafeTransferLib, SignatureLib, StoaTypes), mocks/,
DeployAtlantic/DeployLocal/ExportAbis scripts — all compile
- sdk: types, errors, addresses, chains, abis modules (wired into barrel; 0 tsc errors)
- mercator: planner (seller scoring), scenario, trace, wallet, demo runners
- examples: numbered demos (05-08,10) + x402 seller server
- config/docs: turbo.json, .prettierrc, eslint.config.js, SUBMISSION.md,
docs/HACKATHON_SUBMISSION.md, deployments/{pharos-atlantic,localhost}.json
- oss/ (gitignored): cloned x402, pharos-agent-kit, pharos-examples, pharos-skill-engine
20 lines
625 B
TypeScript
20 lines
625 B
TypeScript
import { NextRequest, NextResponse } from "next/server";
|
|
import { loadServices } from "@/lib/services";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export async function GET(req: NextRequest) {
|
|
const capability = req.nextUrl.searchParams.get("capability") ?? "research";
|
|
|
|
// loadServices never throws: it reads the on-chain ServiceRegistry when
|
|
// STOA_SERVICES_ADDRESS + PHAROS_RPC_URL are configured, otherwise returns a
|
|
// small demo dataset flagged with `demo: true`.
|
|
const services = await loadServices(capability);
|
|
|
|
return NextResponse.json({
|
|
capability,
|
|
count: services.length,
|
|
services,
|
|
});
|
|
}
|