Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
pull_request:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
test-and-build:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: npm
- run: npm ci
- run: npm test
- run: npm run build
env:
NEXT_TELEMETRY_DISABLED: "1"
5 changes: 4 additions & 1 deletion src/components/AgentDetailApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ export function AgentDetailApp({ id }: { id: string }) {
<div className="mb-6 rounded-lg border px-4 py-3" style={{ borderColor: "var(--hairline-cyan)", background: "color-mix(in srgb, var(--primary) 5%, transparent)", fontSize: "var(--text-sm)" }}>
<span style={{ fontWeight: 500 }}>Example agent.</span>{" "}
<Link href="/" className="no-underline" style={{ color: "var(--primary)" }}>Add your own agent</Link>{" "}
<span style={{ color: "var(--text-muted)" }}>to log, grade, and set goals.</span>
<span style={{ color: "var(--text-muted)" }}>
to log, grade, and set goals. This illustrative profile has no
live x402 listing.
</span>
</div>
) : null}

Expand Down
4 changes: 3 additions & 1 deletion src/lib/data/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ function buildAgent(spec: SeedSpec): Agent {
name: spec.name,
slug: spec.slug,
ownerWallet: DEFAULT_OWNER,
x402Url: `https://agents.suedeai.ai/a/${spec.slug}`,
// These are deterministic illustrative profiles, not published Agent
// Studio records. Never manufacture a Studio URL from the demo slug.
x402Url: "",
priceUsdc: spec.priceUsdc,
category: spec.category,
launchedAt,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/data/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export interface Agent {
id: string;
name: string;
ownerWallet: string;
/** Public x402 listing URL on the builder (e.g. agents.suedeai.ai/a/{slug}). */
/** Public x402 listing URL on the builder, or empty for illustrative data. */
x402Url: string;
/** Slug used for builder deep-links (x402 discovery doc, public page). */
/** Stable local slug for resolving the illustrative or operator-entered profile. */
slug: string;
priceUsdc: number;
category: string;
Expand Down
41 changes: 41 additions & 0 deletions tests/public-link-integrity.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { readFile } from "node:fs/promises";
import { describe, expect, it } from "vitest";
import sitemap from "@/app/sitemap";
import { publicAgentData } from "@/lib/data/seed-provider";
import { SITE_URL } from "@/lib/site";

describe("public example link integrity", () => {
it("suppresses unavailable Studio listings for every public example page", () => {
const examples = publicAgentData();
expect(examples).toHaveLength(18);
for (const { agent } of examples) {
expect(agent.x402Url).toBe("");
}
});

it("covers every current sitemap agent page without manufacturing an external CTA", () => {
const examples = publicAgentData();
const agentUrls = sitemap()
.map((entry) => entry.url)
.filter((url) => url.startsWith(`${SITE_URL}/agent/`));

expect(agentUrls).toEqual(
examples.map(
({ agent }) =>
`${SITE_URL}/agent/${encodeURIComponent(agent.id)}`,
),
);
expect(examples.every(({ agent }) => agent.x402Url === "")).toBe(true);
});

it("labels illustrative profiles when no live listing is attached", async () => {
const source = await readFile(
new URL("../src/components/AgentDetailApp.tsx", import.meta.url),
"utf8",
);
expect(source).toContain(
"This illustrative profile has no",
);
expect(source).toContain("live x402 listing.");
});
});
Loading