diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f6fc08..002a7c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,9 +6,13 @@ The merchant data is the source of truth: one JSON file per merchant at `data/me Two paths: -1. **Self-registration form** — [agenticterminal.ai/submit](https://agenticterminal.ai/submit). Opens a PR automatically. Easiest for merchants. +1. **Email** — `merchants@agenticterminal.ai`. We write the record and open the PR. Easiest for merchants. 2. **Direct PR** — add/edit the JSON file and open a PR. +The self-registration form at [agenticterminal.ai/submit](https://agenticterminal.ai/submit) is **not +operational** and this file advertised it as a working route until 2026-09-15. See the README for what +is and is not built. Restore it here only once a test submission has opened a PR. + ### Rules enforced by `pnpm validate-data` (and CI) - `id` is slug-form and the filename is `.json`. diff --git a/FOLLOWUPS.md b/FOLLOWUPS.md index 2e3679d..d48a05f 100644 --- a/FOLLOWUPS.md +++ b/FOLLOWUPS.md @@ -68,6 +68,22 @@ directory's first x402-native infrastructure merchant, so it is worth re-checking periodically rather than waiting for it to resurface in a research pass. +### Skhron — USDC accepted, chain undetermined (logged 2026-09-15) + +`skhron.eu` carries a Circle USDC mark in its home-page payment strip, alongside Ethereum, Tron and +MATIC marks, so `accepts_usdc` is `true` on the record. It has **no `usdc` rail**, because the chain +is not stated anywhere I could find and the schema requires one. A logo strip is also weaker evidence +than the prose statement that carries the Lightning and BTC rails ("We accept Bitcoin, Bitcoin +Lightning, Monero, Tron, Bitcoin Cash ... through a self-hosted, non-custodial payment processor"), +which names no stablecoin at all. + +The same sentence says **Tron**, which may mean TRX or may mean USDT-TRC20. Neither a `usdt` nor a +`usdc` rail can be written honestly without resolving which, so both are absent rather than guessed. + +**Resolve by** reaching a checkout and reading the chains the processor actually offers, or asking +Skhron. Then add the rail with its `chain`. Until then the record under-reports: a `rail: "usdc"` or +`rail: "usdt"` filter will not return Skhron even though it may settle both. + ## Trust-tier filter on /merchants ignores derived tier (logged 2026-05-20) **Symptom.** On `https://agenticterminal.ai/merchants`, the "OP trust min" diff --git a/README.md b/README.md index 89f9156..d22bf12 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,18 @@ Schema is enforced in CI (`pnpm validate-data`) and on every load. USDT rails re ## Contributing -See [CONTRIBUTING.md](./CONTRIBUTING.md). Merchants can self-register at [agenticterminal.ai/submit](https://agenticterminal.ai/submit) — submissions open a PR for review and land at Tier 1 until verified. +See [CONTRIBUTING.md](./CONTRIBUTING.md). Merchants and researchers submit by email to +`merchants@agenticterminal.ai`; accepted entries land at Tier 1 until verified. + +**The self-registration form at `/submit` is not operational.** `apps/web/app/submit/page.tsx` has +had `TALLY_FORM_ID = 'TODO'` since 883c183 (2026-06-22, which replaced the earlier GitHub-issue form) +and no commit since has changed it, so the page renders an email fallback and embeds no form. +`apps/web/netlify/functions/submit-merchant.ts` exists and is complete, but it needs +`TURNSTILE_SECRET_KEY`, `GITHUB_APP_ID`, `GITHUB_APP_PRIVATE_KEY` and `GITHUB_INSTALLATION_ID` in the +Netlify environment and nothing in this repo shows whether they are set. This README and +CONTRIBUTING.md advertised the form as the working route anyway until 2026-09-15, when an inbound +bounty submission pointed it out. Do not re-advertise it until the form ID is set and a test +submission has actually opened a PR. ## Documents diff --git a/apps/web/app/api-docs/page.tsx b/apps/web/app/api-docs/page.tsx index 70665f0..e3c1573 100644 --- a/apps/web/app/api-docs/page.tsx +++ b/apps/web/app/api-docs/page.tsx @@ -9,8 +9,8 @@ const TOOLS: Tool[] = [ { name: 'search_merchants', summary: - 'Search merchants by rail, chain, category, agent-callable tier, trust tier, USDC, and free text. Ranked by trust tier then verification recency. Reads are ungated: anonymous and credentialed callers see all tiers, same limits.', - args: 'query?, rail?, chain?, category?, agent_callable_tier?, trust_tier_min?, accepts_usdc?, limit?', + 'Search merchants by rail, chain, category, agent-callable tier, trust tier, USDC, and free text. Ranked by trust tier then verification recency. Reads are ungated: anonymous and credentialed callers see all tiers, same limits. agent_callable is the coarse form of agent_callable_tier: true matches full-api and structured-handoff together, which exact-tier filtering cannot ask for in one call.', + args: 'query?, rail?, chain?, category?, agent_callable_tier?, agent_callable?, trust_tier_min?, accepts_usdc?, limit?', returns: '{ results: MerchantSummary[], total_matching, truncated, agent_identity }', }, { diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css index a9dbf6c..c30b941 100644 --- a/apps/web/app/globals.css +++ b/apps/web/app/globals.css @@ -736,6 +736,11 @@ code.tok { color: #8b5cf6; border-color: rgba(139, 92, 246, 0.3); } +.badge.challenge-status.status-paused { + background: rgba(148, 163, 184, 0.15); + color: #cbd5e1; + border-color: rgba(148, 163, 184, 0.35); +} .badge.challenge-status.status-closed, .badge.challenge-status.status-winner { background: rgba(34, 197, 94, 0.12); @@ -935,6 +940,12 @@ code.tok { border-color: rgba(139, 92, 246, 0.3); } +.challenge-badge.status-paused { + background: rgba(148, 163, 184, 0.15); + color: #cbd5e1; + border-color: rgba(148, 163, 184, 0.35); +} + .challenge-badge.status-closed, .challenge-badge.status-winner { background: rgba(255, 255, 255, 0.07); @@ -1771,3 +1782,42 @@ code.tok { opacity: 0.85; text-decoration: none; } + +/* Open-call terms block on a listing's detail page. For most of a call's + life the task board is suppressed (lib/display-policy.ts), so this block + is the published surface for its rate, cap and closing date. */ +.open-call-terms { + margin: 2rem 0; + padding: 1.25rem 1.5rem; + border: 1px solid rgba(255, 255, 255, 0.1); + border-left: 3px solid var(--accent); + border-radius: 8px; + background: rgba(255, 255, 255, 0.02); +} + +.open-call-terms h2 { + margin-top: 0; +} + +.open-call-terms .row { + margin-bottom: 0.75rem; +} + +.open-call-terms p:last-child { + margin-bottom: 0; +} + +/* Archived previous version of a set of published terms. Visually set back + from the current terms without being hidden: a superseded version has to + stay legible to somebody who submitted under it. */ +.terms-archive { + margin: 1.5rem 0 0; + padding: 1rem 1.5rem; + border-left: 3px solid rgba(255, 255, 255, 0.15); + background: rgba(255, 255, 255, 0.02); + color: var(--muted); +} + +.terms-archive p:last-child { + margin-bottom: 0; +} diff --git a/apps/web/app/merchants/[slug]/page.tsx b/apps/web/app/merchants/[slug]/page.tsx index 7dbd967..f431feb 100644 --- a/apps/web/app/merchants/[slug]/page.tsx +++ b/apps/web/app/merchants/[slug]/page.tsx @@ -1,5 +1,7 @@ import { notFound } from 'next/navigation'; +import type { Merchant } from '@at-directory/core'; import { allListings, merchantBySlug, categoryLabel } from '@/lib/data'; +import { isOpenCall } from '@/lib/display-policy'; import { TrustTier } from '@/components/TrustTier'; import { RailIcon } from '@/components/RailIcon'; import { VerifyNowButton } from '@/components/VerifyNowButton'; @@ -10,6 +12,42 @@ const CALLABLE_LABEL: Record = { 'human-checkout': 'Human checkout', }; +const CALL_STATUS_LABEL: Record = { + open: 'Open', + judging: 'Judging', + paused: 'Paused', + closed: 'Closed', + winner: 'Winner announced', +}; + +// The task board is suppressed while there are fewer than three live calls +// (lib/display-policy.ts), so for most of this call's life THIS page is the +// only place its terms are published. It has to carry them: budget, closing +// date, status and the link to the full terms, not just the description. +// +// Formatted from the ISO string rather than toLocaleDateString: this is a +// static export and a date that renders differently per locale is a term of +// a bounty that reads differently per reader. +function callDate(iso: string): string { + const d = new Date(iso); + return `${d.getUTCDate()} ${ + [ + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', + ][d.getUTCMonth()] + } ${d.getUTCFullYear()}`; +} + // Every listing gets a detail page, not just the merchant directory: // marketplace task cards link open calls to /merchants/{id}/, so narrowing // this to allMerchants() would 404 all four of them. @@ -47,6 +85,8 @@ export default async function MerchantPage({ params }: { params: Promise<{ slug: · {categoryLabel(m.category)}

+ {isOpenCall(m) && } +

Rails

@@ -120,3 +160,46 @@ export default async function MerchantPage({ params }: { params: Promise<{ slug: ); } + +function OpenCallTerms({ m }: { m: Merchant }) { + const status = m.challenge_status ?? 'open'; + const budget = m.challenge_prize ?? m.price_display ?? null; + return ( +
+

This is an open call

+
+ + {CALL_STATUS_LABEL[status] ?? status} + + {budget && {budget}} + {m.challenge_deadline && ( + Closes {callDate(m.challenge_deadline)} + )} +
+ {status === 'paused' && ( +

+ Paused. Not accepting submissions right now, because the call has reached its budget cap + for the current period. It reopens at the start of the next one, and nothing about the + published rates changes in the meantime. +

+ )} + {m.terms_url && ( +

+ + Full terms + + : rates, cap, and what counts as accepted. Read these before starting work. +

+ )} + {m.contact_url && ( +

+ Submit to{' '} + + {m.contact_url.replace(/^mailto:/, '')} + + . +

+ )} +
+ ); +} diff --git a/apps/web/app/open-calls/directory-expansion/page.tsx b/apps/web/app/open-calls/directory-expansion/page.tsx new file mode 100644 index 0000000..99d4a28 --- /dev/null +++ b/apps/web/app/open-calls/directory-expansion/page.tsx @@ -0,0 +1,228 @@ +import type { Metadata } from 'next'; + +// The published terms of the Directory Expansion Research open call. +// +// This page exists because the terms outgrew the listing. They are read by +// agents deciding whether to spend effort before they submit, so they are +// static HTML at a stable URL, with every number literal and no conditional +// language that needs interpreting. The record at +// data/merchants/at-directory-expansion.json points here through terms_url, +// which puts the link in the MCP and REST responses as well as on the page. +// +// Revising these terms: add the new version ABOVE and move the current one +// into the Previous terms section verbatim. Do not edit a version in place +// once it has been effective, and do not remove an old version. An agent +// that submitted under v1 has to be able to show what v1 said. + +export const metadata: Metadata = { + title: 'Directory Expansion Research: bounty terms | AT Directory', + description: + 'Published terms for the AT Directory expansion bounty: two rates, a monthly cap, and what counts as an accepted record. Effective 15 September 2026.', +}; + +export default function DirectoryExpansionTermsPage() { + return ( +
+
+

Directory Expansion Research: bounty terms

+

+ Version 2. Effective 15 September 2026. This call closes 31 December 2026. +

+
+ +

+ We pay for merchant records that are not yet in the AT Directory. Find a merchant that sells + something and accepts a crypto rail, verify it, send us the evidence, and we pay on + acceptance. The rate depends on whether an agent can transact with the merchant + programmatically. +

+ +

1. What we pay

+ +
+ + + + + + + + + + + + + + + + + + + +
TierThe merchantRate per accepted record
+ A. Agent-callable + + Exposes a surface an agent can transact with programmatically: an API, an MCP server, + a machine-readable catalog, or a payment request an agent can settle without a person + driving a browser. + + 10,000 sats +
+ B. Human-checkout + + Accepts a crypto rail, but ordering runs through a human web checkout only. No API and + no machine-readable catalog. + + 2,000 sats +
+ +

+ Tier B is worth recording because these merchants become agent-callable over time, and the + directory wants the record in place when they do. It is not what the directory primarily + exists to hold, which is why it is priced lower. +

+ +

Classify your candidate before you start

+

+ The test is a single question:{' '} + can an agent complete a purchase here without a person driving a browser?{' '} + Yes is Tier A. No is Tier B. If the merchant publishes an API, an MCP endpoint, an OpenAPI + document, or a documented payment endpoint an agent can settle against, it is Tier A. If the + only route to a purchase is a checkout page a human clicks through, it is Tier B, however + good the merchant is. +

+

+ These map onto the three values the directory already stores in the{' '} + agent_callable_tier field on every record, so you can read the existing records + to see where the line falls in practice: +

+
    +
  • + full-api is Tier A. +
  • +
  • + structured-handoff is Tier A. The agent pays autonomously from a structured + request even though a person fulfils the order. +
  • +
  • + human-checkout is Tier B. +
  • +
+

+ Tell us which tier you think it is. We confirm the tier at adjudication against the + merchant's own published surface, and the tier we confirm is the one we pay. If we + disagree with your classification we say why in the decline or acceptance note. +

+ +

2. The cap

+
    +
  • + 100,000 sats per calendar month, total, across every accepted record from + every submitter. At the Tier A rate that is ten agent-callable records in a month. +
  • +
  • + Five accepted records per submitter for the life of this call, not per + month. +
  • +
  • + This call closes 31 December 2026. Submissions received after that date + are not adjudicated. +
  • +
+

+ When a month's cap is reached, the call is marked Paused on its + listing at{' '} + + agenticterminal.ai/merchants/at-directory-expansion/ + + , the reason is stated there, and wherever the call carries an apply affordance that + affordance is turned off. The listing stays up and says why. We are not going to take the + call down, leave the rate published, and decline what arrives. +

+

+ Submissions received while the call is paused are not adjudicated and are not queued. + Resubmit once the call reopens at the start of the next month. A resubmission of something + you sent while we were paused is not treated as a duplicate. +

+ +

3. What counts as accepted

+

A record is accepted when all of the following hold.

+
    +
  1. + The merchant meets the directory's inclusion criteria: it sells products, services, + APIs, or content, and it accepts at least one of Lightning, BOLT12, L402, USDT, USDC, or + on-chain Bitcoin. Wallets, exchanges, and payment processors do not qualify. Card or bank + checkout alone does not qualify. +
  2. +
  3. + There is a live, reachable page on the merchant's own site evidencing the crypto + rail. A third-party listing is not evidence. A published intention to accept a rail is not + evidence that it settles. +
  4. +
  5. + The merchant is not already in the directory at the time your submission arrives. Check{' '} + the current records first, or query the directory with{' '} + search_merchants. +
  6. +
  7. + Your submission carries enough to write the record without further research: provider URL, + evidence URL, category, rail, the tier you think it is, and pricing model. +
  8. +
  9. + We adjudicate manually and our decision is final. A declined submission + gets a one-line reason. We do not run an appeal. +
  10. +
+ +

4. How to submit

+

+ Send it to merchants@agenticterminal.ai. +

+

+ The self-registration form at agenticterminal.ai/submit is not + operational. It was advertised as the submission route in earlier versions of these terms + and in our repository documentation, which was wrong, and an agent told us so in its first + submission. The inbox above is the route. When the form works we will say so here. +

+ +

5. Why the rate changed

+

+ The original rate was a single figure of 10,000 sats per accepted merchant, set on 22 June + 2026 before we had seen a single submission. It said “accepted new merchant” and + it did not say that being agent-callable was worth more, because we had not thought about + it. Our first inbound submission was a merchant that is genuine, verified, and + human-checkout only. The terms did not distinguish, so we paid the published rate, and then + we wrote these. +

+

+ The previous terms are below in full, unedited. If you sent us a submission before 15 + September 2026, it is adjudicated under those terms and paid at 10,000 sats whatever tier it + turns out to be. We are not applying this revision backwards, and we are not going to change + published terms quietly. Agents read these pages as a contract, and a rate cut that appears + without notice right after somebody claims is worse for us than the money it saves. +

+ +

Previous terms

+

+ Version 1. Posted 22 June 2026. In force until 15 September 2026. Retained verbatim. +

+
+

+ Help grow the AT Directory. Research Lightning-native merchants, agent service providers, + and OP-compatible platforms that are not yet listed. Submit via the AT Directory + self-registration form. Payment: 10,000 sats per new merchant accepted into the directory + (must pass our review). Agents and humans welcome {'\u2014'} use whatever research tools + you have. +

+

+ + Version 1 published no cap, no closing date, no per-submitter limit, and no statement of + what acceptance required beyond “must pass our review”. It named the + self-registration form as the submission route. That form has not been operational since + 22 June 2026, which is the day these terms were posted. + +

+
+ + ); +} diff --git a/apps/web/app/submit/page.tsx b/apps/web/app/submit/page.tsx index 4844808..6c38ddf 100644 --- a/apps/web/app/submit/page.tsx +++ b/apps/web/app/submit/page.tsx @@ -4,6 +4,15 @@ import { useEffect } from 'react'; // Swap TALLY_FORM_ID when Boyd creates the form at tally.so. // URL will be: https://tally.so/r/ +// +// While this is 'TODO' there is no form on this page and nothing reaches +// apps/web/netlify/functions/submit-merchant.ts. That is fine as long as +// nothing elsewhere claims the form is the submission route. It did: the +// README, CONTRIBUTING.md and the directory-expansion open call all named +// the form until 2026-09-15, and an inbound bounty submission found the +// gap and used the merchant inbox instead. Before setting this ID, make a +// test submission and confirm it opens a PR. Advertising the route is the +// last step, not the first. const TALLY_FORM_ID = 'TODO'; declare global { @@ -55,11 +64,26 @@ export default function SubmitPage() { evaluated within a few business days.

- Send your application to{' '} + + Send your application to{' '} + merchants@agenticterminal.ai. + {' '} + That is the submission route. There is no form on this page yet, and we would rather say + so than point you at one that does not work. You can also reach us as{' '} @Maxibtc2009 {' '} - on X while the form is being set up. + on X. +

+

+ Tell us the provider URL, a page on the merchant's own site evidencing the crypto + rail, the category, the rail, and whether an agent can transact programmatically or a + human has to complete a checkout. +

+

+ Submitting merchants you did not build? We pay for accepted records. Rates, cap and + adjudication standard are at{' '} + Directory Expansion Research.

); diff --git a/apps/web/components/TaskCard.tsx b/apps/web/components/TaskCard.tsx index 51afe45..f24cc84 100644 --- a/apps/web/components/TaskCard.tsx +++ b/apps/web/components/TaskCard.tsx @@ -7,10 +7,19 @@ import { ApplyModal } from './ApplyModal'; const STATUS_COLOR: Record = { open: 'status-open', judging: 'status-judging', + paused: 'status-paused', closed: 'status-closed', winner: 'status-winner', }; +const CHALLENGE_STATUS_LABEL: Record = { + open: 'Open', + judging: 'Judging', + paused: 'Paused', + closed: 'Closed', + winner: 'Winner announced', +}; + function daysUntil(iso: string): number { return Math.ceil((new Date(iso).getTime() - Date.now()) / 86400000); } @@ -32,6 +41,11 @@ export function TaskCard({ m }: { m: Merchant }) { const postedAt = m.posted_at ?? null; const budget = m.challenge_prize ?? m.price_display ?? null; const isClosed = status === 'closed' || status === 'winner'; + // Paused is shown, not hidden — see lib/display-policy.ts. The card stays + // on the board and says why; only the apply affordance goes away, so a + // submitter learns the call is capped before spending effort on it rather + // than by being declined afterwards. + const isPaused = status === 'paused'; const deadlineDays = deadline ? daysUntil(deadline) : null; const deadlineStr = deadline @@ -54,18 +68,15 @@ export function TaskCard({ m }: { m: Merchant }) {
{isChallenge ? ( - Challenge —{' '} - {status === 'open' - ? 'Open' - : status === 'judging' - ? 'Judging' - : status === 'winner' - ? 'Winner announced' - : 'Closed'} + Challenge — {CHALLENGE_STATUS_LABEL[status] ?? 'Closed'} ) : ( Wanted )} + {/* A non-challenge call renders "Wanted" above and would otherwise + carry no status at all, so paused needs its own badge rather + than a branch inside the challenge one. */} + {isPaused && Paused}
{postedAt && Posted {timeAgo(postedAt)}} @@ -115,14 +126,18 @@ export function TaskCard({ m }: { m: Merchant }) { - {!isClosed && !isPast ? ( + {!isClosed && !isPaused && !isPast ? ( ) : ( - {status === 'winner' ? 'Winner selected' : 'Closed'} + {isPaused + ? 'Paused: not accepting submissions' + : status === 'winner' + ? 'Winner selected' + : 'Closed'} )} diff --git a/apps/web/lib/display-policy.test.ts b/apps/web/lib/display-policy.test.ts new file mode 100644 index 0000000..a4a6a90 --- /dev/null +++ b/apps/web/lib/display-policy.test.ts @@ -0,0 +1,69 @@ +// Gate for the display policy's hide/show rules. apps/web carries no test +// runner, so this is a plain tsx script wired to `pnpm -F @at-directory/web +// test`: it throws on the first failed assertion and fails CI with it. +// Adding vitest here would be a dependency change for four assertions. +import assert from 'node:assert/strict'; +import type { Merchant } from '@at-directory/core'; +import { + isLiveOpenCall, + isOpenCall, + liveOpenCalls, + MIN_OPEN_CALLS_TO_SHOW, +} from './display-policy.ts'; + +const call = (overrides: Partial): Merchant => ({ + id: 'c', + name: 'C', + url: 'https://c.example', + description: '', + category: 'marketplace', + rails: [{ rail: 'lightning', health: 'unknown' }], + op_trust_tier: 1, + agent_callable_tier: 'human-checkout', + accepts_usdc: false, + accepts_x402: false, + pricing_model: 'per-product', + source: 'integrated', + listing_type: 'open-call', + ...overrides, +}); + +const NOW = Date.parse('2026-09-15T00:00:00Z'); + +// The one that matters. A paused call has stopped accepting submissions and +// must still be on the page saying so: hiding it makes "capped this month" +// and "withdrawn" indistinguishable to a submitter, which is exactly what +// publishing a cap was supposed to prevent. If somebody adds 'paused' to the +// hide list in isLiveOpenCall, this is the assertion that stops them. +assert.equal(isLiveOpenCall(call({ challenge_status: 'paused' }), NOW), true); +assert.equal( + liveOpenCalls([call({ id: 'p', challenge_status: 'paused' })], NOW) + .map((m) => m.id) + .join(), + 'p', +); + +// The statuses that do hide, unchanged. +assert.equal(isLiveOpenCall(call({ challenge_status: 'closed' }), NOW), false); +assert.equal(isLiveOpenCall(call({ challenge_status: 'winner' }), NOW), false); +assert.equal(isLiveOpenCall(call({ challenge_status: 'judging' }), NOW), true); +assert.equal(isLiveOpenCall(call({}), NOW), true); + +// A deadline still hides a call regardless of status, paused included: a +// paused call that never reopens should not outlive its own closing date. +assert.equal( + isLiveOpenCall( + call({ challenge_status: 'paused', challenge_deadline: '2026-08-01T00:00:00Z' }), + NOW, + ), + false, +); +assert.equal(isLiveOpenCall(call({ challenge_deadline: '2026-12-31T23:59:59Z' }), NOW), true); + +assert.equal(isOpenCall(call({})), true); +assert.equal(isOpenCall(call({ listing_type: 'offer' })), false); +assert.equal(isOpenCall(call({ listing_type: undefined })), false); + +assert.equal(typeof MIN_OPEN_CALLS_TO_SHOW, 'number'); + +console.log('display-policy: all assertions passed'); diff --git a/apps/web/lib/display-policy.ts b/apps/web/lib/display-policy.ts index a80576f..d4e968e 100644 --- a/apps/web/lib/display-policy.ts +++ b/apps/web/lib/display-policy.ts @@ -53,6 +53,14 @@ export const MIN_OPEN_CALLS_TO_SHOW = 3; // An open call is past its deadline, or its poster closed it. Expired // calls are hidden from every default view: a stale listing on a live page // reads as abandonment, and "Deadline passed — Closed" is worse than absent. +// +// 'paused' is deliberately NOT in that set. A call that has hit its budget +// cap has stopped accepting work, but hiding it is the failure mode the +// cap was published to avoid: a submitter who cannot see the call cannot +// tell "capped until next month" from "withdrawn", and finds out only by +// spending the effort and being declined. Paused stays on the page, with +// its reason, and its apply affordance off (TaskCard). The assertion that +// holds this is in lib/display-policy.test.ts. export function isLiveOpenCall(m: Merchant, now: number = Date.now()): boolean { const status = m.challenge_status ?? 'open'; if (status === 'closed' || status === 'winner') return false; diff --git a/apps/web/package.json b/apps/web/package.json index 7743de5..bea4a52 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -9,7 +9,7 @@ "bundle:data": "tsx scripts/bundle-data.ts", "lint": "prettier --check \"app/**/*.{ts,tsx}\" \"components/**/*.tsx\" \"lib/**/*.ts\" \"netlify/**/*.ts\"", "typecheck": "tsc", - "test": "echo 'no web unit tests in v1'" + "test": "tsx lib/display-policy.test.ts" }, "dependencies": { "@at-directory/core": "workspace:*", diff --git a/apps/web/public/logos/skhron.svg b/apps/web/public/logos/skhron.svg new file mode 100644 index 0000000..940440b --- /dev/null +++ b/apps/web/public/logos/skhron.svg @@ -0,0 +1 @@ +SK diff --git a/data/LOGO-AUDIT.md b/data/LOGO-AUDIT.md index d35a371..4c5cf3c 100644 --- a/data/LOGO-AUDIT.md +++ b/data/LOGO-AUDIT.md @@ -37,6 +37,7 @@ request. Anything ambiguous: leave the placeholder and flag in the | sphinx | sphinx.chat | nominative use | placeholder | | stakwork | stakwork.com | nominative use | placeholder | | starbackr | starbackr.com | confirm current branding | placeholder | +| skhron | skhron.eu favicon | nominative use | placeholder | ## Swap procedure diff --git a/data/merchants/at-directory-expansion.json b/data/merchants/at-directory-expansion.json index efeb21e..e2f354a 100644 --- a/data/merchants/at-directory-expansion.json +++ b/data/merchants/at-directory-expansion.json @@ -2,15 +2,15 @@ "id": "at-directory-expansion", "name": "Directory Expansion Research", "url": "https://agenticterminal.ai", - "description": "Help grow the AT Directory. Research Lightning-native merchants, agent service providers, and OP-compatible platforms that are not yet listed. Submit via the AT Directory self-registration form. Payment: 10,000 sats per new merchant accepted into the directory (must pass our review). Agents and humans welcome \u2014 use whatever research tools you have.", + "description": "Help grow the AT Directory. Research merchants that accept a crypto rail and are not yet listed, verify them, and send us the evidence. Two rates: 10,000 sats for an accepted record an agent can transact with programmatically, 2,000 sats for one that is human-checkout only. Capped at 100,000 sats per calendar month and five accepted records per submitter. Closes 31 December 2026. Read the full terms before starting work, then submit to merchants@agenticterminal.ai.", "category": "marketplace", "listing_type": "open-call", "is_challenge": false, "challenge_who_can_apply": "agents", "posted_at": "2026-06-22T00:00:00Z", "poster_name": "Agentic Terminal", - "price_display": "10,000 sats per accepted merchant listing", - "contact_url": "https://x.com/Maxibtc2009", + "price_display": "10,000 sats agent-callable / 2,000 sats human-checkout", + "contact_url": "mailto:merchants@agenticterminal.ai", "logo_url": "/logos/at-directory-expansion.svg", "rails": [ { @@ -35,5 +35,8 @@ "open" ], "poster_did": "did:web:observerprotocol.org", - "poster_did_verified": true + "poster_did_verified": true, + "challenge_status": "open", + "challenge_deadline": "2026-12-31T23:59:59Z", + "terms_url": "https://agenticterminal.ai/open-calls/directory-expansion/" } diff --git a/data/merchants/skhron.json b/data/merchants/skhron.json new file mode 100644 index 0000000..bebbfc2 --- /dev/null +++ b/data/merchants/skhron.json @@ -0,0 +1,38 @@ +{ + "id": "skhron", + "name": "Skhron", + "url": "https://skhron.eu/", + "description": "European KVM VPS hosting purchasable through a self-hosted, non-custodial Bitcoin Lightning checkout.", + "category": "hosting-domains", + "rails": [ + { + "rail": "lightning", + "payment_endpoint": null, + "health": "unknown", + "last_health_check": null + }, + { + "rail": "btc", + "payment_endpoint": null, + "health": "unknown", + "last_health_check": null + } + ], + "op_trust_tier": 1, + "agent_callable_tier": "human-checkout", + "accepts_usdc": true, + "accepts_x402": false, + "pricing_model": "per-product", + "last_verified_at": "2026-09-16T01:57:55Z", + "source": "crawled", + "source_attribution": "Sourced from an inbound Directory Expansion Research bounty submission by a third-party agent. Verified independently at 2026-09-16T01:57:55Z by GET on https://skhron.eu/ and https://skhron.eu/services/bitcoin-lightning, both 200: the evidence page states Lightning payment through Skhron's own self-hosted, non-custodial processor, and the home page states Bitcoin, Bitcoin Lightning, Monero, Tron and Bitcoin Cash through the same processor. Rail health is unknown because no payment endpoint was probed. No API, MCP endpoint or machine-readable catalog was found, which is why this is human-checkout.", + "op_attestation_url": null, + "logo_url": "/logos/skhron.svg", + "tags": [ + "vps", + "hosting", + "no-kyc", + "lightning", + "europe" + ] +} diff --git a/data/schema/merchant.schema.json b/data/schema/merchant.schema.json index 48405b7..cf46c8f 100644 --- a/data/schema/merchant.schema.json +++ b/data/schema/merchant.schema.json @@ -91,8 +91,8 @@ "description": "Who may apply to this challenge. Tasks are executed by agents on behalf of human posters." }, "challenge_status": { - "enum": ["open", "judging", "closed", "winner"], - "description": "Lifecycle state of the challenge." + "enum": ["open", "judging", "paused", "closed", "winner"], + "description": "Lifecycle state of the open call. 'paused' is distinct from 'closed': a paused call is still shown, with its reason, because a call that stops accepting work and vanishes is indistinguishable from one that was silently withdrawn. See apps/web/lib/display-policy.ts — 'closed' and 'winner' hide the listing, 'paused' does not." }, "listing_type": { "enum": ["offer", "open-call"], @@ -102,6 +102,11 @@ "type": ["string", "null"], "description": "Human-readable price or budget string shown on marketplace cards. Free-form — not parsed or enforced. Examples: '5000 sats / request', '0.01 BTC for 90 days', 'Negotiate per task'. Null = not specified." }, + "terms_url": { + "type": ["string", "null"], + "format": "uri", + "description": "Where the full, dated terms of this listing are published. Set on any open call whose terms are longer than its description — a bounty's rate, cap and adjudication standard are read by agents before they spend effort, so the link has to be a field they can read, not prose buried in the description. Null when the description is the whole of the terms." + }, "contact_url": { "type": ["string", "null"], "format": "uri", diff --git a/packages/core/src/search.test.ts b/packages/core/src/search.test.ts index d5f5946..c417d6e 100644 --- a/packages/core/src/search.test.ts +++ b/packages/core/src/search.test.ts @@ -37,6 +37,62 @@ describe('searchMerchants', () => { ]); }); + it('filters by agent_callable across both callable tiers', () => { + const merchants = [ + M({ id: 'api', agent_callable_tier: 'full-api' }), + M({ id: 'handoff', agent_callable_tier: 'structured-handoff' }), + M({ id: 'human', agent_callable_tier: 'human-checkout' }), + ]; + // The point of the flag: 'what can I transact with' is two tiers, and + // asking by exact tier returns half the population without saying so. + expect(searchMerchants(merchants, { agent_callable: true }).results.map((m) => m.id)).toEqual([ + 'api', + 'handoff', + ]); + expect(searchMerchants(merchants, { agent_callable: false }).results.map((m) => m.id)).toEqual([ + 'human', + ]); + expect( + searchMerchants(merchants, { agent_callable_tier: 'full-api' }).results.map((m) => m.id), + ).toEqual(['api']); + }); + + it('agent_callable=false is a filter, not an absent option', () => { + // `if (opts.agent_callable)` would silently ignore false and return + // everything, which is the failure this asserts against. + const merchants = [ + M({ id: 'api', agent_callable_tier: 'full-api' }), + M({ id: 'human', agent_callable_tier: 'human-checkout' }), + ]; + const r = searchMerchants(merchants, { agent_callable: false }); + expect(r.total_matching).toBe(1); + }); + + it('agent_callable composes with the other filters rather than replacing them', () => { + const merchants = [ + M({ id: 'ln', agent_callable_tier: 'full-api', category: 'compute' }), + M({ id: 'other', agent_callable_tier: 'full-api', category: 'travel' }), + M({ id: 'human', agent_callable_tier: 'human-checkout', category: 'compute' }), + ]; + expect( + searchMerchants(merchants, { agent_callable: true, category: 'compute' }).results.map( + (m) => m.id, + ), + ).toEqual(['ln']); + }); + + it("carries terms_url into the summary so a caller can read a listing's terms", () => { + const merchants = [ + M({ id: 'call', terms_url: 'https://agenticterminal.ai/open-calls/directory-expansion/' }), + M({ id: 'plain' }), + ]; + const r = searchMerchants(merchants); + const withTerms = r.results.find((m) => m.id === 'call'); + const without = r.results.find((m) => m.id === 'plain'); + expect(withTerms?.terms_url).toBe('https://agenticterminal.ai/open-calls/directory-expansion/'); + expect(without && 'terms_url' in without).toBe(false); + }); + it('filters by rail and chain', () => { const merchants = [ M({ diff --git a/packages/core/src/search.ts b/packages/core/src/search.ts index 8a0ec6c..ec5f0f8 100644 --- a/packages/core/src/search.ts +++ b/packages/core/src/search.ts @@ -1,3 +1,4 @@ +import { isAgentCallable } from './types.ts'; import type { AgentCallableTier, ListingType, @@ -17,6 +18,12 @@ export interface SearchOptions { // so a query for a category added post-compile must still filter correctly. category?: string; agent_callable_tier?: AgentCallableTier; + // The coarse question, which agent_callable_tier alone cannot ask in one + // call: "only the merchants I can actually transact with". Two of the + // three tiers qualify, so filtering by exact tier makes a caller issue + // two queries and union them, and a caller that issues one gets a + // silently short answer. true = full-api or structured-handoff. + agent_callable?: boolean; trust_tier_min?: OpTrustTier; accepts_usdc?: boolean; participant_type?: ParticipantType; @@ -47,6 +54,11 @@ export function searchMerchants(merchants: Merchant[], opts: SearchOptions = {}) function matches(m: Merchant, opts: SearchOptions): boolean { if (opts.category && m.category !== opts.category) return false; if (opts.agent_callable_tier && m.agent_callable_tier !== opts.agent_callable_tier) return false; + if ( + opts.agent_callable !== undefined && + isAgentCallable(m.agent_callable_tier) !== opts.agent_callable + ) + return false; if (opts.trust_tier_min !== undefined && m.op_trust_tier < opts.trust_tier_min) return false; if (opts.accepts_usdc !== undefined && m.accepts_usdc !== opts.accepts_usdc) return false; if (opts.participant_type && (m.participant_type ?? 'merchant') !== opts.participant_type) @@ -90,6 +102,7 @@ function toSummary(m: Merchant): MerchantSummary { ...(m.participant_type !== undefined && { participant_type: m.participant_type }), ...(m.listing_type !== undefined && { listing_type: m.listing_type }), ...(m.price_display !== undefined && { price_display: m.price_display }), + ...(m.terms_url !== undefined && { terms_url: m.terms_url }), ...(m.contact_url !== undefined && { contact_url: m.contact_url }), }; } diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index fc23a50..8e3739f 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -24,6 +24,24 @@ export type RailHealth = 'healthy' | 'degraded' | 'down' | 'unknown'; export type AgentCallableTier = 'full-api' | 'structured-handoff' | 'human-checkout'; +// Can an agent complete a purchase here without a human driving a browser? +// +// Declared as a total map rather than `tier !== 'human-checkout'` so that +// adding a fourth tier to the union above fails typecheck here until +// somebody classifies it. The default matters in money: the directory +// bounty pays 10,000 sats for an agent-callable merchant and 2,000 for a +// human-checkout one, so a tier that lands on the wrong side of this line +// by omission underpays a submitter against published terms. +export const AGENT_CALLABLE: Record = { + 'full-api': true, + 'structured-handoff': true, + 'human-checkout': false, +}; + +export function isAgentCallable(tier: AgentCallableTier): boolean { + return AGENT_CALLABLE[tier]; +} + export type OpTrustTier = 1 | 2 | 3; export type PricingModel = 'subscription' | 'per-product' | 'per-request' | 'variable' | 'free'; @@ -33,7 +51,7 @@ export type Source = 'crawled' | 'self-registered' | 'integrated'; export type ParticipantType = 'merchant' | 'agent'; export type ChallengeWhoCanApply = 'agents' | 'humans' | 'both'; -export type ChallengeStatus = 'open' | 'judging' | 'closed' | 'winner'; +export type ChallengeStatus = 'open' | 'judging' | 'paused' | 'closed' | 'winner'; export type ListingType = 'offer' | 'open-call'; @@ -76,6 +94,7 @@ export interface Merchant { participant_type?: ParticipantType; listing_type?: ListingType; price_display?: string | null; + terms_url?: string | null; contact_url?: string | null; logo_url?: string; tags?: string[]; @@ -105,6 +124,7 @@ export interface MerchantSummary { participant_type?: ParticipantType; listing_type?: ListingType; price_display?: string | null; + terms_url?: string | null; contact_url?: string | null; } diff --git a/packages/mcp-server/src/rest.test.ts b/packages/mcp-server/src/rest.test.ts index eb96bf9..a2a31d1 100644 --- a/packages/mcp-server/src/rest.test.ts +++ b/packages/mcp-server/src/rest.test.ts @@ -81,6 +81,38 @@ describe('REST surface', () => { expect(r.json.results.map((m: Merchant) => m.id)).toEqual(['t2']); }); + it('GET /v1/merchants coerces agent_callable, including the false case', async () => { + const mixed: DirectoryData = { + ...data, + merchants: [ + M({ id: 'api', agent_callable_tier: 'full-api' }), + M({ id: 'handoff', agent_callable_tier: 'structured-handoff' }), + M({ id: 'human', agent_callable_tier: 'human-checkout' }), + ], + }; + const q = async (url: string) => { + const req = { method: 'GET', url } as IncomingMessage; + let body = ''; + const res = { + writeHead: () => res, + end(b?: string) { + body = b ?? ''; + }, + headersSent: false, + } as unknown as ServerResponse; + await tryHandleRest(req, res, mixed); + return JSON.parse(body) + .results.map((m: Merchant) => m.id) + .sort(); + }; + expect(await q('/v1/merchants?agent_callable=true')).toEqual(['api', 'handoff']); + // 'false' has to reach the filter as false and not be dropped as falsy, + // otherwise the query silently returns everything. + expect(await q('/v1/merchants?agent_callable=false')).toEqual(['human']); + expect(await q('/v1/merchants?agent_callable=1')).toEqual(['api', 'handoff']); + expect(await q('/v1/merchants')).toEqual(['api', 'handoff', 'human']); + }); + it('GET /v1/merchants omits open calls by default, returns them on request', async () => { const withCall: DirectoryData = { ...data, diff --git a/packages/mcp-server/src/rest.ts b/packages/mcp-server/src/rest.ts index 5c7208d..fbc8c63 100644 --- a/packages/mcp-server/src/rest.ts +++ b/packages/mcp-server/src/rest.ts @@ -101,8 +101,12 @@ function coerceSearch(qs: URLSearchParams): Record { str('listing_type'); const tier = qs.get('trust_tier_min'); if (tier !== null && tier !== '') out.trust_tier_min = Number(tier); - const usdc = qs.get('accepts_usdc'); - if (usdc !== null && usdc !== '') out.accepts_usdc = usdc === 'true' || usdc === '1'; + const bool = (k: string) => { + const v = qs.get(k); + if (v !== null && v !== '') out[k] = v === 'true' || v === '1'; + }; + bool('accepts_usdc'); + bool('agent_callable'); const limit = qs.get('limit'); if (limit !== null && limit !== '') out.limit = Number(limit); return out; diff --git a/packages/mcp-server/src/tools/search_merchants.ts b/packages/mcp-server/src/tools/search_merchants.ts index db256af..67a8323 100644 --- a/packages/mcp-server/src/tools/search_merchants.ts +++ b/packages/mcp-server/src/tools/search_merchants.ts @@ -9,6 +9,10 @@ export const SearchMerchantsArgs = z.object({ chain: z.enum(['tron', 'ethereum', 'solana', 'bsc', 'polygon', 'arbitrum', 'base']).optional(), category: z.string().optional(), agent_callable_tier: z.enum(['full-api', 'structured-handoff', 'human-checkout']).optional(), + // "Only merchants I can transact with programmatically" — true matches + // full-api and structured-handoff, false matches human-checkout. Asking + // by exact tier takes two calls to cover the same population. + agent_callable: z.boolean().optional(), trust_tier_min: z.union([z.literal(1), z.literal(2), z.literal(3)]).optional(), accepts_usdc: z.boolean().optional(), participant_type: z.enum(['merchant', 'agent']).optional(), diff --git a/packages/skill/SKILL.md b/packages/skill/SKILL.md index dc0926f..8cb7ffd 100644 --- a/packages/skill/SKILL.md +++ b/packages/skill/SKILL.md @@ -57,6 +57,10 @@ as a decision the directory has made for you. A Tier 1 listing has been checked - `structured-handoff` — you pay autonomously from a structured request; fulfillment is human-handled. - `human-checkout` — you discover the merchant but a human must complete a web checkout. +The first two are the ones you can act on alone. To ask for exactly those in one call, pass +`agent_callable: true` — filtering by `agent_callable_tier` matches one tier at a time, so a single +exact-tier query silently omits the other half of the population you can transact with. + Worked examples: - Tier 1 + `full-api` → you can buy now, but trust is self-asserted. Good for low-value, reversible buys. @@ -75,6 +79,9 @@ search_merchants({ rail: 'usdt', chain: 'tron', category: 'gift-cards' }); // Fully agent-callable Lightning merchants, verified tier only search_merchants({ rail: 'lightning', agent_callable_tier: 'full-api', trust_tier_min: 2 }); +// Everything you can transact with unaided — full-api AND structured-handoff +search_merchants({ rail: 'lightning', agent_callable: true }); + // Full record before transacting get_merchant({ id: 'bitrefill' });