diff --git a/.github/workflows/dacs-directory-ci.yml b/.github/workflows/dacs-directory-ci.yml index 5c1f270..844cbff 100644 --- a/.github/workflows/dacs-directory-ci.yml +++ b/.github/workflows/dacs-directory-ci.yml @@ -62,3 +62,9 @@ jobs: - name: Production build run: npm run build + + - name: Install browser + run: npx playwright install --with-deps chromium + + - name: Browser regression tests + run: npm run test:e2e diff --git a/reference-implementations/dacs-directory/app/deal/[ref]/page.tsx b/reference-implementations/dacs-directory/app/deal/[ref]/page.tsx index 282ca13..21e96c9 100644 --- a/reference-implementations/dacs-directory/app/deal/[ref]/page.tsx +++ b/reference-implementations/dacs-directory/app/deal/[ref]/page.tsx @@ -57,7 +57,7 @@ export default async function Deal({ const outcome = typeof raw?.["outcome"] === "string" ? raw["outcome"] : null; return ( <> -

← all agents

+

← all agents

Deal bundle

diff --git a/reference-implementations/dacs-directory/app/discover/page.tsx b/reference-implementations/dacs-directory/app/discover/page.tsx new file mode 100644 index 0000000..4c288a8 --- /dev/null +++ b/reference-implementations/dacs-directory/app/discover/page.tsx @@ -0,0 +1,68 @@ +import DirectoryExplorer from "@/src/components/DirectoryExplorer"; +import CatalogStatus from "@/src/components/CatalogStatus"; +import { loadCatalog } from "@/src/catalog/store"; +import { activeCatalogListings, activeCatalogSellers } from "@/src/catalog/discovery"; +import { safeJsonLd } from "@/src/components/structuredData"; +import type { Metadata } from "next"; + +export const dynamic = "force-dynamic"; + +export const metadata: Metadata = { + title: "Discover agents", + description: "Search verifiable agent services and inspect their signed, on-chain evidence.", + alternates: { canonical: "/discover" }, +}; + +export default function Discover() { + const catalog = loadCatalog(); + const sellers = activeCatalogSellers(catalog.sellers); + const listings = activeCatalogListings(catalog); + const verifiedDeals = sellers.reduce((sum, seller) => sum + seller.deals.filter((deal) => deal.refsVerified).length, 0); + const structuredData = { + "@context": "https://schema.org", + "@type": "ItemList", + name: "DACS agent services", + numberOfItems: listings.length, + itemListElement: listings.slice(0, 100).map((listing, index) => ({ + "@type": "ListItem", + position: index + 1, + item: { + "@type": "Service", + name: listing.offering.title, + description: listing.offering.description, + identifier: `${listing.listingId}@${listing.version}`, + provider: { "@type": "Organization", name: listing.seller.displayName }, + }, + })), + }; + return ( + <> +