From 11e71dbfb31efba3ed46351e7c3ecafcee90c7f6 Mon Sep 17 00:00:00 2001 From: Lexirieru Date: Fri, 13 Nov 2026 04:59:55 +0700 Subject: [PATCH 1/4] feat(trust): Trust Center as its own app, apps/trust, for trust.hellonear.xyz Axel wants the Trust Center in its own folder, not inside the docs (which move to Mintlify next). Same content and rules as /trust in apps/docs, now at the root: / (Overview), /resources, /subprocessors, /faq, /updates, plus /llms.txt and every page as Markdown (/.md or Accept: text/markdown). Links to product pages now point at https://docs.hellonear.xyz/; the OpenAPI link points at the spec on GitHub. Own CLAUDE.md (Vercel project hellonear-trust, prebuilt deploys) and CI (trust.yml). Tests: bun run typecheck ok; bun run test 10 pass, 0 fail (tabs, no dashes or emoji, no badges or audit claim, links, every Yes linked, llms.txt, markdown, proxy); bun run build ok; dev on :3400 answers 200 for the five tabs, /faq.md, /index.md, Accept: text/markdown and /llms.txt, 404 for an unknown path. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e --- .github/workflows/trust.yml | 38 ++++ apps/trust/.gitignore | 4 + apps/trust/AGENTS.md | 9 + apps/trust/CLAUDE.md | 28 +++ apps/trust/app/[section]/page.tsx | 95 ++++++++++ apps/trust/app/_components/Brand.tsx | 13 ++ apps/trust/app/_components/Faq.tsx | 31 ++++ apps/trust/app/_components/TrustTabs.tsx | 20 +++ apps/trust/app/_components/UpdateCard.tsx | 17 ++ apps/trust/app/apple-icon.png | Bin 0 -> 2723 bytes apps/trust/app/favicon.ico | Bin 0 -> 2914 bytes apps/trust/app/globals.css | 155 +++++++++++++++++ apps/trust/app/icon.svg | 1 + apps/trust/app/layout.tsx | 55 ++++++ apps/trust/app/llms.txt/route.ts | 7 + apps/trust/app/md/[[...slug]]/route.ts | 12 ++ apps/trust/app/page.tsx | 65 +++++++ apps/trust/bun.lock | 203 ++++++++++++++++++++++ apps/trust/content/faq.md | 65 +++++++ apps/trust/content/index.md | 42 +++++ apps/trust/content/resources.md | 33 ++++ apps/trust/content/subprocessors.md | 61 +++++++ apps/trust/content/updates.md | 44 +++++ apps/trust/lib/content.ts | 67 +++++++ apps/trust/lib/markdown.ts | 34 ++++ apps/trust/lib/site.ts | 5 + apps/trust/lib/tabs.ts | 8 + apps/trust/next-env.d.ts | 7 + apps/trust/next.config.ts | 10 ++ apps/trust/package.json | 33 ++++ apps/trust/proxy.ts | 34 ++++ apps/trust/scripts/build-content.mjs | 37 ++++ apps/trust/tests/content.test.ts | 81 +++++++++ apps/trust/tsconfig.json | 41 +++++ 34 files changed, 1355 insertions(+) create mode 100644 .github/workflows/trust.yml create mode 100644 apps/trust/.gitignore create mode 100644 apps/trust/AGENTS.md create mode 100644 apps/trust/CLAUDE.md create mode 100644 apps/trust/app/[section]/page.tsx create mode 100644 apps/trust/app/_components/Brand.tsx create mode 100644 apps/trust/app/_components/Faq.tsx create mode 100644 apps/trust/app/_components/TrustTabs.tsx create mode 100644 apps/trust/app/_components/UpdateCard.tsx create mode 100644 apps/trust/app/apple-icon.png create mode 100644 apps/trust/app/favicon.ico create mode 100644 apps/trust/app/globals.css create mode 100644 apps/trust/app/icon.svg create mode 100644 apps/trust/app/layout.tsx create mode 100644 apps/trust/app/llms.txt/route.ts create mode 100644 apps/trust/app/md/[[...slug]]/route.ts create mode 100644 apps/trust/app/page.tsx create mode 100644 apps/trust/bun.lock create mode 100644 apps/trust/content/faq.md create mode 100644 apps/trust/content/index.md create mode 100644 apps/trust/content/resources.md create mode 100644 apps/trust/content/subprocessors.md create mode 100644 apps/trust/content/updates.md create mode 100644 apps/trust/lib/content.ts create mode 100644 apps/trust/lib/markdown.ts create mode 100644 apps/trust/lib/site.ts create mode 100644 apps/trust/lib/tabs.ts create mode 100644 apps/trust/next-env.d.ts create mode 100644 apps/trust/next.config.ts create mode 100644 apps/trust/package.json create mode 100644 apps/trust/proxy.ts create mode 100644 apps/trust/scripts/build-content.mjs create mode 100644 apps/trust/tests/content.test.ts create mode 100644 apps/trust/tsconfig.json diff --git a/.github/workflows/trust.yml b/.github/workflows/trust.yml new file mode 100644 index 00000000..9a2eb81d --- /dev/null +++ b/.github/workflows/trust.yml @@ -0,0 +1,38 @@ +# Trust Center CI: typecheck, unit tests (content rules, links, llms.txt, proxy) and a production build. No secrets. +name: trust + +on: + pull_request: + paths: ['apps/trust/**', '.github/workflows/trust.yml'] + push: + branches: [main] + paths: ['apps/trust/**', '.github/workflows/trust.yml'] + +concurrency: + group: trust-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 15 + defaults: + run: + working-directory: apps/trust + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 24.22.1 + - uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.3.9 + - run: bun install --frozen-lockfile + - run: bun run typecheck + - run: bun run test + - run: bun run build + env: + NEXT_TELEMETRY_DISABLED: '1' diff --git a/apps/trust/.gitignore b/apps/trust/.gitignore new file mode 100644 index 00000000..f40c4965 --- /dev/null +++ b/apps/trust/.gitignore @@ -0,0 +1,4 @@ +tsconfig.tsbuildinfo +.vercel +.env* +lib/generated/ diff --git a/apps/trust/AGENTS.md b/apps/trust/AGENTS.md new file mode 100644 index 00000000..af3b7c84 --- /dev/null +++ b/apps/trust/AGENTS.md @@ -0,0 +1,9 @@ + + +## This is NOT the Next.js you know + +This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. + +This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. + + diff --git a/apps/trust/CLAUDE.md b/apps/trust/CLAUDE.md new file mode 100644 index 00000000..5aea3564 --- /dev/null +++ b/apps/trust/CLAUDE.md @@ -0,0 +1,28 @@ +# CLAUDE.md — apps/trust + +The Trust Center, **trust.hellonear.xyz**: what protects a HelloNear user's data and funds, with a link to check each claim. Its own Next.js app since 13 Nov 2026 (before that it lived inside `apps/docs`). Owner: Axel. Root rules in `/CLAUDE.md` also apply. + +**Update this file in the same PR whenever you change setup, commands, routes, content rules or where it is deployed.** + +## How it works + +- **One source:** each tab is a Markdown file in `content/` (frontmatter `title`, `description`): `index.md` (Overview), `resources.md`, `subprocessors.md`, `faq.md`, `updates.md`. `scripts/build-content.mjs` turns them into `lib/generated/pages.json` (gitignored, the folder is made on a fresh checkout; runs before `dev`, `build`, `typecheck` and `test`). The build fails on an en or em dash. +- **Routes:** `/` (Overview: intro, scope and controls table, controls cards, subprocessors and the 3 newest updates), `/resources`, `/subprocessors`, `/faq`, `/updates` (`app/[section]`), each built from its Markdown by heading: `###` sections become cards, FAQ `##` categories and `###` questions become `
` with Expand all / Collapse all. Tabs are `lib/tabs.ts`; a test fails if a page is missing from them or listed twice. +- **For agents:** `/llms.txt`, and every page as Markdown at `/.md` (or with `Accept: text/markdown`), served from `app/md` through `proxy.ts` (Next 16's middleware). `next.config.ts` adds `Link: ; rel="llms-txt"`. +- **Links:** product pages point at the docs, `https://docs.hellonear.xyz/` (Mintlify, `apps/docs`); keep those slugs in step with `apps/docs/docs.json`. Proof links go to GitHub, NearBlocks, SourceScan or the TEE Explorer. A test fails on any link that is neither a full URL nor a trust page. +- **Rules (Axel, 13 Nov):** no compliance badges or certifications (HelloNear has none), no "audit" as a claim, no team members' names, no emoji. Every "Yes" in the scope table links to its proof (a test checks it); "N/A" where a control does not apply. Updates only for what git log or the README proves. The repo is public but all rights reserved, so the column says "Source public", never "open source". +- Styles: plain CSS (`app/globals.css`) with the web app's Stone & Lime tokens, light and dark by `prefers-color-scheme`, 16px gutters, no horizontal scroll at phone width. + +## Commands + +```sh +bun install +bun run dev # http://localhost:3400 +bun run typecheck +bun run test # node:test: tabs, content rules, links, Yes has proof, llms.txt, markdown, proxy +bun run build +``` + +## Deploy + +On **Vercel**, project `hellonear-trust`, deployed by Axel with the Vercel CLI from this folder: `vercel build --prod`, then `vercel deploy --prebuilt --prod`. Domain on the project: `trust.hellonear.xyz`, a `CNAME` in the `hellonear.xyz` Cloudflare zone to the target Vercel gives (DNS only, not proxied); the DNS change is on the box owner's side (James), with Axel's approval. No env vars. CI: `.github/workflows/trust.yml`. diff --git a/apps/trust/app/[section]/page.tsx b/apps/trust/app/[section]/page.tsx new file mode 100644 index 00000000..acc9a080 --- /dev/null +++ b/apps/trust/app/[section]/page.tsx @@ -0,0 +1,95 @@ +import type { Metadata } from "next"; +import { notFound } from "next/navigation"; +import { getPage, sections } from "@/lib/content"; +import { render } from "@/lib/markdown"; +import { FaqControls } from "../_components/Faq"; +import { UpdateCard } from "../_components/UpdateCard"; + +const SECTIONS = ["resources", "subprocessors", "faq", "updates"] as const; +type Props = { params: Promise<{ section: string }> }; + +export const dynamicParams = false; +export const generateStaticParams = () => SECTIONS.map((section) => ({ section })); + +async function pageOf(props: Props) { + const { section } = await props.params; + const page = getPage(section); + if (!page) notFound(); + return { section, page }; +} + +export async function generateMetadata(props: Props): Promise { + const { section, page } = await pageOf(props); + return { title: page.title, description: page.description, alternates: { canonical: `/${section}`, types: { "text/markdown": `/${section}.md` } } }; +} + +export default async function TrustSection(props: Props) { + const { section, page } = await pageOf(props); + return ( + <> +

{page.title}

+

{page.description}

+ {section === "faq" && } + {section === "subprocessors" && } + {section === "resources" && } + {section === "updates" && ( +
+ {sections(page.markdown, 3).items.map((u) => ( + + ))} +
+ )} + + ); +} + +function Cards({ markdown, className }: { markdown: string; className: string }) { + const s = sections(markdown, 3); + return ( + <> + {s.intro &&
} +
+ {s.items.map((c) => ( +
+

{c.title}

+
+
+ ))} +
+ + ); +} + +function Resources({ markdown }: { markdown: string }) { + return ( +
+ {sections(markdown, 2).items.map((g) => ( +
+

{g.title}

+
+
+ ))} +
+ ); +} + +function Faq({ markdown }: { markdown: string }) { + return ( + + {sections(markdown, 2).items.map((cat) => ( +
+

{cat.title}

+ {sections(cat.body, 3).items.map((q) => ( +
+ + {q.title} + # + +
+
+ ))} +
+ ))} +
+ ); +} diff --git a/apps/trust/app/_components/Brand.tsx b/apps/trust/app/_components/Brand.tsx new file mode 100644 index 00000000..522f0228 --- /dev/null +++ b/apps/trust/app/_components/Brand.tsx @@ -0,0 +1,13 @@ +import Link from "next/link"; + +export function Brand({ href, label }: { href: string; label: string }) { + return ( + + {/* eslint-disable-next-line @next/next/no-img-element */} + + + HelloNear {label} + + + ); +} diff --git a/apps/trust/app/_components/Faq.tsx b/apps/trust/app/_components/Faq.tsx new file mode 100644 index 00000000..ddc4599f --- /dev/null +++ b/apps/trust/app/_components/Faq.tsx @@ -0,0 +1,31 @@ +"use client"; + +import { useEffect, useRef } from "react"; + +// Expand all / Collapse all for the FAQ's
, and open the one a #link points at. The answers are plain +//
, so they work without JavaScript. +export function FaqControls({ children }: { children: React.ReactNode }) { + const ref = useRef(null); + const setAll = (open: boolean) => ref.current?.querySelectorAll("details").forEach((d) => (d.open = open)); + useEffect(() => { + const openHash = () => { + const el = location.hash ? document.getElementById(decodeURIComponent(location.hash.slice(1))) : null; + if (el instanceof HTMLDetailsElement) { + el.open = true; + el.scrollIntoView({ block: "start" }); + } + }; + openHash(); + window.addEventListener("hashchange", openHash); + return () => window.removeEventListener("hashchange", openHash); + }, []); + return ( +
+
+ + +
+ {children} +
+ ); +} diff --git a/apps/trust/app/_components/TrustTabs.tsx b/apps/trust/app/_components/TrustTabs.tsx new file mode 100644 index 00000000..f5a63682 --- /dev/null +++ b/apps/trust/app/_components/TrustTabs.tsx @@ -0,0 +1,20 @@ +"use client"; + +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { TABS } from "@/lib/tabs"; + +export function TrustTabs() { + const path = usePathname().replace(/\/$/, ""); + return ( + + ); +} diff --git a/apps/trust/app/_components/UpdateCard.tsx b/apps/trust/app/_components/UpdateCard.tsx new file mode 100644 index 00000000..b299f3e4 --- /dev/null +++ b/apps/trust/app/_components/UpdateCard.tsx @@ -0,0 +1,17 @@ +import Link from "next/link"; +import { render } from "@/lib/markdown"; + +export function UpdateCard({ title, body, id, short }: { title: string; body: string; id: string; short?: boolean }) { + const [meta, ...rest] = body.split("\n"); + const [date, category] = meta.replace(/^Published /, "").split(" · "); + const text = rest.join("\n").trim(); + return ( +
+

+ {category} Published {date} +

+

{short ? {title} : title}

+ {!short &&
} +
+ ); +} diff --git a/apps/trust/app/apple-icon.png b/apps/trust/app/apple-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7df2cef06b235dd062062eab4d86fe5df4a983aa GIT binary patch literal 2723 zcmd6p`#TegAICYj_2l-gL|AUq+^INdBgM=nrd*1dOGIwXq1bR(xz2>SC8l_CJ8~ko z%_Wp;i5A(hVPrFR6V3gyuYNlJ!g-$e=kk0$&-41}^L(Cn%5{{r#BurKA|fIZNCeE` zs5bnFV?Q0`x|&R15s~9ANZ3^;eBm-X(l!UD*tfQ7DVk~7ps3a;Rt>W%aXDpo&)KxO z_LVI97K>lq=;EmB!Maobp_=-FadU*Rd}9^HegzPJtcSIB?9M zkYl=6A1vWJ8}zVq8(4H}KYsstvL`TduW-PC{}0+g)PxHc5$_h&`OgYBoSb|oN}0g6 z5N7_B0We$D{1vx2PT|!71dX;gamNMZ=Y*u)Y{_|5$^3%$`Wh^B{jq5=O;A@Py#PP7 z--bgO%$b3xOKuH}h?cntNyN-mbVaI(+9D4X?>0~A14&hmffW{K>MuLwbTqtW@fjW< zf`huyu^g}>LzKu+>{mVj-p3=kKtPYwB)EdIJnkEKxQ5S0PJ(4FJy|<&;v$s<;>X$~L6GSec1_{0x8S0C2V>y7h97z+3fiUl z@ED}hg9lnm`nsFNSFn}Nmo+!RoD659KbD9k5(HXLsRD##sY(~cc5IO23iTQtecJW| zp8YwbM+JStBg~b)ZbAA00YY7sq(}xHyY0{WKpZWiv7I1Om0fnV)Ett=1#J3h#V8XT^$Fm1 zyy+sctF7#V;;@&!eEA$y95NOU;m#sKre!B|oftZ_6iazNXi%Bmm1gXvBKfZt_Jess zTL!hiAZe^XW-VNauq8sE2(SEf;4$~wg|Cp-D-h>0s&1Xlv&k~N-I>4&t-Wz0lYV(m zXCX_GtD)K420F*v-w`{DAZsdk0ioT{1u zNvVwaQTvUMkQ+FlU#jnDHQPEvF?#!(ie^f3a^LW|4wvRI->LS)QnXe&_uDjRoJw%= z^t86&ak=%_m4bwXvQpH`$0e1Okq5gHy#{v?65c-E)DYp@FOD&*kvBYnH><(}I`vaY zB&1nyQj#L%!CN{#!^z6GqK-pltq>gduoO!EO2v+Yu%S|Yp~vPq=Cn5S~GKKe&uGaym8$Q$btKZ*7i&O z4s_RUnp~j~qtgR9CK3B40dXV`B82llS)=vu-;t-n!otvKG(uwJgf*6*tJv1DXv0aw zw7pFK%sA0^tE{Y4rA#aG(ju{h`p;MOJ!qZcB4 zEg@Zte^bY^y-*sNg7Y;W%dERg_gKvOm}h>Pg6mszqhV9(Qwj?9ychmu{#0=k~>Xuzmj6#DuN8>L>ljz4h(w?e-pne)T=Q@VuNH@<;Ut zFLA4r!j?a42?XC5$Wu;)wmPbCIZRG4|4!#zs%(cI3i$kWx=FEXgGPJ2`FrdUKPf3G zy8@NnsiBuHCaXVWe{@nP7v{{hJUxiJR&Q5lInnH=a2J~W`+@uU((usM+-VRzVw7^d zJ78|2`FmV^JU~L;$<FSe9DF ztwMp!9^T&GDLqe01t}|g z^^jo0`NmV2^0!>wbCdX>z`!UTW3<1YPrm#MK+4YeOw@+Mgn@hx{-ejl-efCIY76?i zJeSM;KH9PG`pB2;O<<|x=RbEPO9dX*>vW5mhHaC*m8dlno~M9Yonmqe0beTYKxqY+ zd|L32eEO2I94fz_5Km0B0!S$iKyV%tqga~%`V5le*K)ClcTyhGOQ-8Y_oh~Qd-xYG zs&dkdPr@@4?fT0L=I#?Ol1QZGh@G|f-=@2|{hD9C4CKGrnTp*ztNG#UJNh%oPKt?W zWpy<+`p(KMI58=Sr0}}*H#A-{ATn|%=>9B&p~|g5Nlp$a|KeT7$ZPbgg@s=FWuYk)+RA=JY~mOOj%b8>jWd~uXDa*{ zVsO&hDsg>{D0bj%6ZXc|*6LITVad61oYrB(YSz}) zu8Plw!C-$Q(Yl+Mi3D`nl+;;0U0pU!_>d{V7#)SWzZ)M{H!|8a?l^P~l7W;?nV?e+ zuKCS2Q;a(d^Sj~GL*|LhGeq6arx$!U9B<^5KoMa2Xw&@c$rkZY5wZV_mIy}ugt|T1* literal 0 HcmV?d00001 diff --git a/apps/trust/app/favicon.ico b/apps/trust/app/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..ebdc91c3513c45925fb8a20da0438a6d1d692169 GIT binary patch literal 2914 zcmaJ>c{J2*8~%-DNM@mtHO9X0>rnP(P`1#7WZ&YoX2>@7$d)7{%h)2jN|;PzNy2N- zR_;6bcP^ zY|Z5`ZajkBt8Hyy@0Iu6*^i3c!R{=a6BUfucwo~uZM-mrwU69AiM%N$!}%Lja=;P{ z*%WbaHiE8hU)TozJ??-9)L2;8ys2GY*Y-(TyD))Nku^fJ3e?H6Ec;bg~qn z65MA5Xf#l%5>fSev3z3IBsfByElSo5#>ww|)Qs zea=5Tezm`jzHH4!9U)yg<2|{q)`EvSNRn>bjOQnTUCoT(mB>d2XI=GRB%>txJ;dGY z`$i1fwjMqZ0b7}YcueKvIdf#UTK_tEIG`lzaC>@M4U65$A2-)&pARMPXf5tw$w$SZ zFeWOOzGgQ?T3i|zQf*jLTJsi~(SPW5rSQ+B^wg*A!|_jkmoc`Y(%$K&0fxbOz^OZ4 zUt6E+`mA?Z&hwXL!+lurAUeLXR;KR_YO0ZTS8!~YWuY~}&9xtcN~C_SQVu~F9`xjt zczx|~9g!{rq`u=D9j`oM8~}vVW%R0~aJ{DtCUjH$D79z5nKS$%&Ieuds1#Je=d6;` z=G39HiO0VJ1Ko`Z-WBStyn zTbc29I5nn)eXkNmIyTMRbf0Tl?h`%jl40HXAz1U8`YylKJ=+GL+eL!UWX0ff4}N$# z=xR{&W5hrr3-Xt&NFaC$DV8b5IXy!XPQPmgxbGl=z z+G8M5Pbb-~CV>IL$!QR{bEc-2<%O8Icv;1&(Ck*Y-AM#U;bWMb-4L@xbjGDAuu{%# z36AdNX74rFX%|=vU9l1!OD!{-w(j~DXOIk>HC?q`;G&64@THBgTiWSD0sUnH&jn(m zkESspryNgGoOfP_{n0p<+89%VseNT3B>R&Ud7SetWhiNhO*;sDJxE4T%yXq&XiVV| zHKUi5a~HsLrQFk;l;*tmT|V_vXBG!4;caCVgO#qNA+ zwW~h2uz|U`xz5BcwFO5`eg@;AGWx5>()}gv)wSqJno$3h_LUonUT`C zpzyb}uh9KU1pr3vf2EDTagomsfg3H30n9&d_l%ecp#3Vg3T+fBnNMZr+utkq$=DRQ zoOuGcKlG8wt}OI<==T|xhp9M@?^bzj)8gyijDe`KHy0S^=@La$6W+0$e%g6mRs@gNBxSd2`l-@Axp_!~zj%W-&p z-J)9n6?dPhdjIW8-9q;Rd_@$2?CnrZ2{p9@Y|965Y!1G=!-nggTGc;%&6qDAo<`w^ zrxle2NrF~skGL=%Wftj=uip92I;?jQ<&es0{iq|!W>#)eth|l{ z;u-hH4c%IH%u0`vtg>nJ5Ki)VZLf6oXU5RaVJv~|l45g#-u1p?zGQ=Pw7MG*rI0&A zFX(wXGcSDg;mPaqH_IAIGVB`b#JXdt4cs5#S4tXo!Ca8YJ0B`mOq_oH?9E|N`2>>W zgPK@hUfpZBQJ<3h{p&>^={m|S5{aNp%*0LNBh{-mn^v|c8~b0XJjV8$mOpwRgD3~{ z^F@Fr;SR{6x&kDxYF47>zQB=`WjD8Rz{)2A(c}DvMy@v=k=LO+|KjtjPJ;mBh!)d#mw|B$}}j=t@Slaq$iiqF#uy zl1xP``TDL*)$8Pmh=pCIlTZ{vc*CqBVac=3!RUr?pWG|TRm;tW^YlkfU&6d}KrGg5 z^d2w~$j6wvH?P+8(Ch`gh<#E$SC^-*YJa!zM)jAV8iABGwl1ubSkg*QwlgAWV7-bT z?bAgLy|B+cqH#ZmeWSw)9UbiF=Vxr8KMgz_&i7X0CR+c3JoxV{@Ev4nx7A@wrn$=Dn?O6f9&lUP1)Jm8N|fMj>s9_jaJ~wsO|q0dP!{cQ-mX! z9i0UnMnevx6Kx%1Pt-Ox+7II9w!(Wyig#VDZERSyOJS_wM4`yGBNnt^x?ARq)~{H9 z(wa(oT;bQjiH{*h_fu0-MLwpaq*#UDaf?JTFZ)$}US)N8IhxDzMnP>oO^TCKhvDoU zQH#dTPCjE}V~(N3dQh{PwDgVMT=0@m0|Wcm+}tVtQQ4}9lGI0!EX(txq@)s#k6^l% zqoRG^(-e426=ghuCu>S&EsF0rusg8`;tToi@rpo$P)haKbU437(E+BlldnK{#TY4f z`{~oCSZ>xz`h1tgm!Ak_%cSJ1UW#1)LEn~cj7@}?-Rnf$W&WV5sJMGULCvrb!V#;jiY!Yj~u=J!bmNBS8A0GW7 zje%n;?Oay9Ix0(x&Xj>8?i{Q$OZJNM?jwHh8a2L5&+TiQs0`8HboANs=7keaYkn&e zfWCeyE?#fhd{(UytG*lzKHCZ}l^1A-9L@3*A^@tN^w}~p!_W7-dTYR5l~}nDsmbtN z#(8M$L8+42M~ h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); } +.faq-q { background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; } +.faq-q summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; } +.faq-q summary::-webkit-details-marker { display: none; } +.faq-q summary::after { content: "+"; color: var(--muted); font-weight: 400; } +.faq-q[open] summary::after { content: "−"; } +.faq-q summary .anchor { position: static; opacity: 0; margin-left: auto; } +.faq-q summary:hover .anchor { opacity: 1; } +.faq-q .prose { padding: 0 16px 6px; } + +@media (max-width: 860px) { + .anchor { display: none; } + .topbar-links { gap: 12px; } + .hero h1 { font-size: 28px; } +} +@media (max-width: 520px) { + .topbar-links:not(.buttons) a:last-child { display: none; } + .trust .topbar-links .btn:nth-child(2) { display: none; } + .brand-sub { display: none; } + .cards { grid-template-columns: 1fr; } +} diff --git a/apps/trust/app/icon.svg b/apps/trust/app/icon.svg new file mode 100644 index 00000000..0f11bfa2 --- /dev/null +++ b/apps/trust/app/icon.svg @@ -0,0 +1 @@ + diff --git a/apps/trust/app/layout.tsx b/apps/trust/app/layout.tsx new file mode 100644 index 00000000..958bbe09 --- /dev/null +++ b/apps/trust/app/layout.tsx @@ -0,0 +1,55 @@ +import type { Metadata } from "next"; +import { Geist, Geist_Mono } from "next/font/google"; +import { Brand } from "./_components/Brand"; +import { TrustTabs } from "./_components/TrustTabs"; +import { DOCS_URL, ISSUES_URL, REPO_URL, SITE_URL, STATUS_URL } from "@/lib/site"; +import "./globals.css"; + +const geist = Geist({ subsets: ["latin"], variable: "--font-geist" }); +const geistMono = Geist_Mono({ subsets: ["latin"], variable: "--font-geist-mono" }); + +export const metadata: Metadata = { + metadataBase: new URL(SITE_URL), + title: { default: "HelloNear Trust Center", template: "%s · HelloNear Trust Center" }, + description: "What protects your data and funds on HelloNear, with a link to check each claim yourself.", + openGraph: { type: "website", siteName: "HelloNear Trust Center" }, + alternates: { types: { "text/plain": "/llms.txt" } }, +}; + +export default function RootLayout({ children }: { children: React.ReactNode }) { + return ( + + +
+
+ + +
+
+
+

Welcome to the HelloNear Trust Center

+

+ HelloNear lets an AI agent pay for you while the rules about money stay out of its reach. Here is what protects your data + and funds, and a link to check each claim yourself. +

+

+ Privacy · Security model ·{" "} + Receipts +

+
+
+ +
{children}
+
+ Everything here runs on NEAR testnet during NEAR HACKATHON (1 to 14 Nov 2026). Every page is also Markdown: add{" "} + .md to its path, or read llms.txt. +
+
+ + + ); +} diff --git a/apps/trust/app/llms.txt/route.ts b/apps/trust/app/llms.txt/route.ts new file mode 100644 index 00000000..0426e3f1 --- /dev/null +++ b/apps/trust/app/llms.txt/route.ts @@ -0,0 +1,7 @@ +import { llmsTxt } from "@/lib/content"; + +export const dynamic = "force-static"; + +export function GET() { + return new Response(llmsTxt(), { headers: { "content-type": "text/plain; charset=utf-8" } }); +} diff --git a/apps/trust/app/md/[[...slug]]/route.ts b/apps/trust/app/md/[[...slug]]/route.ts new file mode 100644 index 00000000..998bc182 --- /dev/null +++ b/apps/trust/app/md/[[...slug]]/route.ts @@ -0,0 +1,12 @@ +import { getPage, pageMarkdown, pages } from "@/lib/content"; + +// Every page as Markdown. Reached through proxy.ts: /.md, or any path asked for with Accept: text/markdown. +export const dynamicParams = false; +export const generateStaticParams = () => pages.map((p) => ({ slug: p.slug ? p.slug.split("/") : [] })); + +export async function GET(_req: Request, ctx: { params: Promise<{ slug?: string[] }> }) { + const { slug } = await ctx.params; + const page = getPage((slug ?? []).join("/")); + if (!page) return new Response("Not found\n", { status: 404, headers: { "content-type": "text/plain; charset=utf-8" } }); + return new Response(pageMarkdown(page), { headers: { "content-type": "text/markdown; charset=utf-8", vary: "Accept" } }); +} diff --git a/apps/trust/app/page.tsx b/apps/trust/app/page.tsx new file mode 100644 index 00000000..eb53bcc3 --- /dev/null +++ b/apps/trust/app/page.tsx @@ -0,0 +1,65 @@ +import type { Metadata } from "next"; +import Link from "next/link"; +import { getPage, sections } from "@/lib/content"; +import { render, renderMatrix } from "@/lib/markdown"; +import { UpdateCard } from "./_components/UpdateCard"; + +export const metadata: Metadata = { title: { absolute: "HelloNear Trust Center" }, description: getPage("")!.description }; + +export default function TrustOverview() { + const page = getPage("")!; + const top = sections(page.markdown, 2); + const scope = top.items.find((s) => s.title === "Scope and controls")!; + const controls = sections(top.items.find((s) => s.title === "Controls")!.body, 3); + const subs = sections(getPage("subprocessors")!.markdown, 3).items; + const updates = sections(getPage("updates")!.markdown, 3).items.slice(0, 3); + return ( + <> +
+ +
+

Scope and controls

+
+
+ +
+

Controls

+
+
+ {controls.items.map((c) => ( +
+

{c.title}

+
+
+ ))} +
+
+ +
+
+

Subprocessors

+ View all +
+
    + {subs.map((s) => ( +
  • + {s.title} +
  • + ))} +
+
+ +
+
+

Updates

+ View all +
+
+ {updates.map((u) => ( + + ))} +
+
+ + ); +} diff --git a/apps/trust/bun.lock b/apps/trust/bun.lock new file mode 100644 index 00000000..86fc0d93 --- /dev/null +++ b/apps/trust/bun.lock @@ -0,0 +1,203 @@ +{ + "lockfileVersion": 1, + "configVersion": 1, + "workspaces": { + "": { + "name": "@hellonear/trust", + "dependencies": { + "marked": "18.1.2", + "next": "16.4.4", + "react": "19.3.1", + "react-dom": "19.3.1", + }, + "devDependencies": { + "@types/node": "26.6.6", + "@types/react": "19.3.0", + "@types/react-dom": "19.3.0", + "tsx": "4.23.15", + "typescript": "6.0.3", + }, + }, + }, + "packages": { + "@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], + + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.28.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ=="], + + "@esbuild/android-arm": ["@esbuild/android-arm@0.28.2", "", { "os": "android", "cpu": "arm" }, "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg=="], + + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.28.2", "", { "os": "android", "cpu": "arm64" }, "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A=="], + + "@esbuild/android-x64": ["@esbuild/android-x64@0.28.2", "", { "os": "android", "cpu": "x64" }, "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q=="], + + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.28.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw=="], + + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.28.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw=="], + + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.28.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw=="], + + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.28.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg=="], + + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.28.2", "", { "os": "linux", "cpu": "arm" }, "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w=="], + + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.28.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug=="], + + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.28.2", "", { "os": "linux", "cpu": "ia32" }, "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ=="], + + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ=="], + + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA=="], + + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.28.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ=="], + + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA=="], + + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.28.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg=="], + + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.28.2", "", { "os": "linux", "cpu": "x64" }, "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ=="], + + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.28.2", "", { "os": "none", "cpu": "arm64" }, "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw=="], + + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.28.2", "", { "os": "none", "cpu": "x64" }, "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw=="], + + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.28.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ=="], + + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.28.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw=="], + + "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.28.2", "", { "os": "none", "cpu": "arm64" }, "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q=="], + + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.28.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g=="], + + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.28.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ=="], + + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.28.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA=="], + + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.2", "", { "os": "win32", "cpu": "x64" }, "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g=="], + + "@img/colour": ["@img/colour@1.1.0", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="], + + "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg=="], + + "@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.3.4" }, "os": "darwin", "cpu": "x64" }, "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw=="], + + "@img/sharp-freebsd-wasm32": ["@img/sharp-freebsd-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "os": "freebsd" }, "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw=="], + + "@img/sharp-libvips-darwin-arm64": ["@img/sharp-libvips-darwin-arm64@1.3.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw=="], + + "@img/sharp-libvips-darwin-x64": ["@img/sharp-libvips-darwin-x64@1.3.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ=="], + + "@img/sharp-libvips-linux-arm": ["@img/sharp-libvips-linux-arm@1.3.4", "", { "os": "linux", "cpu": "arm" }, "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw=="], + + "@img/sharp-libvips-linux-arm64": ["@img/sharp-libvips-linux-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A=="], + + "@img/sharp-libvips-linux-ppc64": ["@img/sharp-libvips-linux-ppc64@1.3.4", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ=="], + + "@img/sharp-libvips-linux-riscv64": ["@img/sharp-libvips-linux-riscv64@1.3.4", "", { "os": "linux", "cpu": "none" }, "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q=="], + + "@img/sharp-libvips-linux-s390x": ["@img/sharp-libvips-linux-s390x@1.3.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ=="], + + "@img/sharp-libvips-linux-x64": ["@img/sharp-libvips-linux-x64@1.3.4", "", { "os": "linux", "cpu": "x64" }, "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw=="], + + "@img/sharp-libvips-linuxmusl-arm64": ["@img/sharp-libvips-linuxmusl-arm64@1.3.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA=="], + + "@img/sharp-libvips-linuxmusl-x64": ["@img/sharp-libvips-linuxmusl-x64@1.3.4", "", { "os": "linux", "cpu": "x64" }, "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg=="], + + "@img/sharp-linux-arm": ["@img/sharp-linux-arm@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm": "1.3.4" }, "os": "linux", "cpu": "arm" }, "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ=="], + + "@img/sharp-linux-arm64": ["@img/sharp-linux-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64" }, "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ=="], + + "@img/sharp-linux-ppc64": ["@img/sharp-linux-ppc64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-ppc64": "1.3.4" }, "os": "linux", "cpu": "ppc64" }, "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA=="], + + "@img/sharp-linux-riscv64": ["@img/sharp-linux-riscv64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-riscv64": "1.3.4" }, "os": "linux", "cpu": "none" }, "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ=="], + + "@img/sharp-linux-s390x": ["@img/sharp-linux-s390x@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-s390x": "1.3.4" }, "os": "linux", "cpu": "s390x" }, "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA=="], + + "@img/sharp-linux-x64": ["@img/sharp-linux-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linux-x64": "1.3.4" }, "os": "linux", "cpu": "x64" }, "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog=="], + + "@img/sharp-linuxmusl-arm64": ["@img/sharp-linuxmusl-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" }, "os": "linux", "cpu": "arm64" }, "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg=="], + + "@img/sharp-linuxmusl-x64": ["@img/sharp-linuxmusl-x64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-linuxmusl-x64": "1.3.4" }, "os": "linux", "cpu": "x64" }, "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A=="], + + "@img/sharp-wasm32": ["@img/sharp-wasm32@0.35.5", "", { "dependencies": { "@emnapi/runtime": "^1.11.3" } }, "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ=="], + + "@img/sharp-webcontainers-wasm32": ["@img/sharp-webcontainers-wasm32@0.35.5", "", { "dependencies": { "@img/sharp-wasm32": "0.35.5" }, "cpu": "none" }, "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA=="], + + "@img/sharp-win32-arm64": ["@img/sharp-win32-arm64@0.35.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q=="], + + "@img/sharp-win32-ia32": ["@img/sharp-win32-ia32@0.35.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A=="], + + "@img/sharp-win32-x64": ["@img/sharp-win32-x64@0.35.5", "", { "os": "win32", "cpu": "x64" }, "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg=="], + + "@next/env": ["@next/env@16.4.4", "", {}, "sha512-6/3ZuELR0tPLgNigvv8d/LAmfLIo1IpNfvrI/AHCAl9w9D0DNVGQGvo+OLPzAWR+WMW3vVyO7HaW0kfL97huBg=="], + + "@next/swc-darwin-arm64": ["@next/swc-darwin-arm64@16.4.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-1KlZ5IJ7zcLBZvqG1q7nuRWm2LAAN4C3iBqqoBCRRl1UEv0A4k6Rek+x3j23UiWf8Gz+VsN+M/LylAWkxpm2mg=="], + + "@next/swc-darwin-x64": ["@next/swc-darwin-x64@16.4.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-Tb7efFdhbS/ph74RS7wob84gXGM58qxoO/WrkiMsTmy/JZktKOKBeiM45W0E/b8JfBzZJdexQqSmvedBwDK0PA=="], + + "@next/swc-linux-arm64-gnu": ["@next/swc-linux-arm64-gnu@16.4.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-wojSfLnH8RRImhtbcn3Dlx9JICh6aQHgDA33XDr+EPua2tt7Q/yjDn0FTAbqfNlLrBmOASAGhLh6NvBk9L3gzw=="], + + "@next/swc-linux-arm64-musl": ["@next/swc-linux-arm64-musl@16.4.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-zgxpGOZaR+2O6dOk5ZAUkKgH92ZtqNg3ohzyg2HmWc2N+AZH4dEpTwdpB0e5MR9YRVdVDUkEM5g6c3TWWn8g1g=="], + + "@next/swc-linux-x64-gnu": ["@next/swc-linux-x64-gnu@16.4.4", "", { "os": "linux", "cpu": "x64" }, "sha512-fg3Wr030Y3BDkCXi6HGsPz0BUPTGZJS8TZSrCO0tS3O/KBsCyx4eP6aeaizCpGmcUKhtb4l7JoMc88QO2qBl2g=="], + + "@next/swc-linux-x64-musl": ["@next/swc-linux-x64-musl@16.4.4", "", { "os": "linux", "cpu": "x64" }, "sha512-40cr71PSdCV9zU2g0B1XG27af10tYU+9g8F+FtF3qSguQg0jSZDoxn0NrAvgFQ0cy9s0ZBA/00P9g/XL1O43xg=="], + + "@next/swc-win32-arm64-msvc": ["@next/swc-win32-arm64-msvc@16.4.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-vFMiEbRZ+LYNeswslf4LuGuoPHE8JbtqV0GnmzbpnGNMs0uWaR2q98hu8M/UWGycNJERBXIUss+BGd3PIJ8VZg=="], + + "@next/swc-win32-x64-msvc": ["@next/swc-win32-x64-msvc@16.4.4", "", { "os": "win32", "cpu": "x64" }, "sha512-jy2P4V8BDZ+CFCzYABHYRZ1CmyFhfmYe22i8KA4uEafdYPrUjJ3Ot+lx265mLWLHiZRIfBzCn3V1F17m0vzl9Q=="], + + "@swc/helpers": ["@swc/helpers@0.5.23", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw=="], + + "@types/node": ["@types/node@26.6.6", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog=="], + + "@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="], + + "@types/react-dom": ["@types/react-dom@19.3.0", "", { "peerDependencies": { "@types/react": "^19.3.0" } }, "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q=="], + + "baseline-browser-mapping": ["baseline-browser-mapping@2.11.37", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-QYph+vfurmaxhNwi9FprfmtkT5cx2Keg8FzZ0vnjO8ukscIybVyZGMFwdllKGlTI6qyU8ck43OM9UXh+IFJihQ=="], + + "caniuse-lite": ["caniuse-lite@1.0.30001826", "", {}, "sha512-wTB+9tIbLro/BCXwLuNV1meHE4L9dS6dArMDwgYfNBPMYScqClHyGunhkCSDtHhe/69Xl0sHlKgBVZ+fNsYtWA=="], + + "client-only": ["client-only@0.0.1", "", {}, "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="], + + "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], + + "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], + + "esbuild": ["esbuild@0.28.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.2", "@esbuild/android-arm": "0.28.2", "@esbuild/android-arm64": "0.28.2", "@esbuild/android-x64": "0.28.2", "@esbuild/darwin-arm64": "0.28.2", "@esbuild/darwin-x64": "0.28.2", "@esbuild/freebsd-arm64": "0.28.2", "@esbuild/freebsd-x64": "0.28.2", "@esbuild/linux-arm": "0.28.2", "@esbuild/linux-arm64": "0.28.2", "@esbuild/linux-ia32": "0.28.2", "@esbuild/linux-loong64": "0.28.2", "@esbuild/linux-mips64el": "0.28.2", "@esbuild/linux-ppc64": "0.28.2", "@esbuild/linux-riscv64": "0.28.2", "@esbuild/linux-s390x": "0.28.2", "@esbuild/linux-x64": "0.28.2", "@esbuild/netbsd-arm64": "0.28.2", "@esbuild/netbsd-x64": "0.28.2", "@esbuild/openbsd-arm64": "0.28.2", "@esbuild/openbsd-x64": "0.28.2", "@esbuild/openharmony-arm64": "0.28.2", "@esbuild/sunos-x64": "0.28.2", "@esbuild/win32-arm64": "0.28.2", "@esbuild/win32-ia32": "0.28.2", "@esbuild/win32-x64": "0.28.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "marked": ["marked@18.1.2", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-DfOnvLAQ6WYeWxWO1u4RyFOeqyHup6dks5PPqnoFiooU7ipRvidO/2j8plhAHIiZg574E9ZlzSjUiPMLAzFkgg=="], + + "nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="], + + "next": ["next@16.4.4", "", { "dependencies": { "@next/env": "16.4.4", "@swc/helpers": "0.5.23", "baseline-browser-mapping": "^2.9.19", "caniuse-lite": "^1.0.30001579", "postcss": "8.5.23", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "16.4.4", "@next/swc-darwin-x64": "16.4.4", "@next/swc-linux-arm64-gnu": "16.4.4", "@next/swc-linux-arm64-musl": "16.4.4", "@next/swc-linux-x64-gnu": "16.4.4", "@next/swc-linux-x64-musl": "16.4.4", "@next/swc-win32-arm64-msvc": "16.4.4", "@next/swc-win32-x64-msvc": "16.4.4", "sharp": "^0.35.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-Hu4pOw2x0RQ0TQabNWbpsNg/3+SZf+rLQwvfhBLnptv98GS4dcIVMlfEyn9jb2/ZJDSahhnUKEs0YrfarjGX3A=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "postcss": ["postcss@8.5.23", "", { "dependencies": { "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg=="], + + "react": ["react@19.3.1", "", {}, "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw=="], + + "react-dom": ["react-dom@19.3.1", "", { "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { "react": "^19.3.1" } }, "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ=="], + + "scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], + + "semver": ["semver@7.8.6", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw=="], + + "sharp": ["sharp@0.35.5", "", { "dependencies": { "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", "semver": "^7.8.5" }, "optionalDependencies": { "@img/sharp-darwin-arm64": "0.35.5", "@img/sharp-darwin-x64": "0.35.5", "@img/sharp-freebsd-wasm32": "0.35.5", "@img/sharp-libvips-darwin-arm64": "1.3.4", "@img/sharp-libvips-darwin-x64": "1.3.4", "@img/sharp-libvips-linux-arm": "1.3.4", "@img/sharp-libvips-linux-arm64": "1.3.4", "@img/sharp-libvips-linux-ppc64": "1.3.4", "@img/sharp-libvips-linux-riscv64": "1.3.4", "@img/sharp-libvips-linux-s390x": "1.3.4", "@img/sharp-libvips-linux-x64": "1.3.4", "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", "@img/sharp-libvips-linuxmusl-x64": "1.3.4", "@img/sharp-linux-arm": "0.35.5", "@img/sharp-linux-arm64": "0.35.5", "@img/sharp-linux-ppc64": "0.35.5", "@img/sharp-linux-riscv64": "0.35.5", "@img/sharp-linux-s390x": "0.35.5", "@img/sharp-linux-x64": "0.35.5", "@img/sharp-linuxmusl-arm64": "0.35.5", "@img/sharp-linuxmusl-x64": "0.35.5", "@img/sharp-webcontainers-wasm32": "0.35.5", "@img/sharp-win32-arm64": "0.35.5", "@img/sharp-win32-ia32": "0.35.5", "@img/sharp-win32-x64": "0.35.5" } }, "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g=="], + + "source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="], + + "styled-jsx": ["styled-jsx@5.1.6", "", { "dependencies": { "client-only": "0.0.1" }, "peerDependencies": { "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0" } }, "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA=="], + + "tslib": ["tslib@2.9.1", "", {}, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="], + + "tsx": ["tsx@4.23.15", "", { "dependencies": { "esbuild": "~0.28.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "bin": { "tsx": "dist/cli.mjs" } }, "sha512-Yiex1Ovn8z2xPpOWckIiysV1SSyRMY9BkLF++q0yKiDxCqRhosKfMg3janKkiLBwZ5c/YryloKwGZcrEmtwxKw=="], + + "typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], + + "undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="], + } +} diff --git a/apps/trust/content/faq.md b/apps/trust/content/faq.md new file mode 100644 index 00000000..83a89b5c --- /dev/null +++ b/apps/trust/content/faq.md @@ -0,0 +1,65 @@ +--- +title: FAQ +description: Answers about security, data processing, model training, wallets and funds, taken only from what HelloNear's code does. +--- + +## Security + +### Can the AI pay someone the owner did not approve? +No payment tool runs without the owner's approval, unless the owner turned on a rule for small payments to listed addresses. Even after approval, OutLayer checks the wallet policy in a TEE before signing and refuses a payment over the limit or to an address not on the list. See [Wallet, limits and approvals](https://docs.hellonear.xyz/wallet-and-approvals). + +### How are API keys stored? +Encrypted with AES-256-GCM, bound to the owner and the key's name. They are never returned by the API, never put in prompts, and filled in only by the tool for the hosts the owner listed. See [Connections and keys](https://docs.hellonear.xyz/connections). + +### How are sessions stored? +Only the SHA-256 hash of the session token is stored. The cookie `hn_session` is `HttpOnly`, `SameSite=Lax` and `Secure` on the hosted demo. State-changing requests from an origin HelloNear does not list are refused (`403 bad_origin`). + +### Has the repository been checked for leaked keys? +Yes. On 13 Nov 2026 the full git history (all branches) was scanned for key-shaped strings. None were real: the matches are a 1Click quote signature in a test fixture and placeholder Telegram tokens in tests. Postgres credentials in the repository are for local development only. + +### Can someone else read my Mind or my runs? +Every route checks that the signed-in user owns the Mind or run. Another user's Mind answers `404`, never `403`, so ids cannot be probed. + +## Data processing + +### What does HelloNear store? +Chat history, the Mind's memory of its owner, encrypted keys, payments, and the proofs behind verified replies. The full table is on [Privacy](https://docs.hellonear.xyz/privacy). + +### Does the verification proof contain my conversation? +No. It holds signatures, hashes and Intel's TDX quote only, never the conversation text. + +### How do I delete my data? +Deleting a chat hides it at once, asks the engine to forget it, and removes it for good after 30 days. Memory can be edited or cleared in the Mind's settings. Guest accounts are deleted with all their Minds after 7 days. + +### Who sees my prompts while the model runs? +Nobody outside the TEE: not the cloud provider, not the model host, not NEAR AI. HelloNear's own backend does keep the chat, so the Mind can continue it. + +## Model training + +### Does HelloNear train models on my data? +No. HelloNear does not train or fine-tune any model. Replies come from models on NEAR AI Cloud, called inside a TEE. + +### Which models are used? +`z-ai/glm-5.3-flash` by default, `deepseek-ai/DeepSeek-V4.1-Flash-1017` for reasoning and `Qwen/Qwen3-Embedding-0.6B` for memory, all on NEAR AI Cloud. See [The agent](https://docs.hellonear.xyz/agent). + +## Wallet & funds + +### Is real money involved? +No. During the hackathon everything runs on NEAR testnet, whose tokens have no value. Cross-chain payments and Agent Market hiring are only quoted, since they need mainnet. See [Hackathon phase](https://docs.hellonear.xyz/hackathon-phase). + +### Who holds the Mind's wallet? +Each Mind's wallet is an OutLayer wallet. HelloNear stores its key encrypted, one wallet per Mind. The owner's own NEAR wallet signs the policy and Freeze, so those changes are transactions anyone can see. + +### What happens to funds when a Mind is deleted? +Deleting a Mind deletes the only copy of its wallet key, so HelloNear refuses (`409 wallet_not_empty`) while the wallet holds more than 0.001 NEAR, until the owner confirms they have seen the balance. + +### Is a refused payment on chain? +No. OutLayer refuses it in the TEE before signing, so there is no transaction. HelloNear never shows a transaction link for one. + +## Other + +### How do I report a security issue? +Open an issue on [GitHub](https://github.com/Hellonear-AI/hellonear/issues/new). Please do not include keys, personal data or a working exploit in a public issue; describe the problem and we will follow up. + +### Where can I see whether HelloNear is up? +On [status.hellonear.xyz](https://status.hellonear.xyz), checked every 5 minutes. See [Status](https://docs.hellonear.xyz/status). diff --git a/apps/trust/content/index.md b/apps/trust/content/index.md new file mode 100644 index 00000000..e57061e3 --- /dev/null +++ b/apps/trust/content/index.md @@ -0,0 +1,42 @@ +--- +title: Trust Center +description: How HelloNear keeps an AI agent's money rules out of the model's reach, with every claim linked to something you can check yourself. +--- + +HelloNear gives a person an AI agent that can pay, so the limits that matter sit outside the model: the owner approves, the wallet's policy is checked in a TEE before signing, and every reply carries a proof from NEAR AI Cloud's TEE. This Trust Center lists what is protected, how, and where to check it, without asking you to take our word for it. + +## Scope and controls + +What each part of HelloNear is covered by. Every "Yes" links to its proof. "N/A" means the control does not apply to that part. + +| Scope | TEE-verified | Policy enforced before signing | Source verified (NEP-330, SourceScan) | Source public | Testnet only | +|---|---|---|---|---|---| +| Chat inference (NEAR AI Cloud) | [Yes](https://proof.t16z.com/reports/1b374e5b10031496c6c45bc7749038d7e7cd26a16996455f893b6b5dd44a9db2) | N/A | N/A | [Yes](https://github.com/Hellonear-AI/hellonear/blob/main/engine/src/verify.ts) | N/A | +| Mind wallet (OutLayer) | N/A | [Yes](https://testnet.nearblocks.io/txns/DhKqbLAX3zhH2tP3kJDx5Xsk8ZkMByfJbYLyWYyivXXZ) | N/A | [Yes](https://github.com/Hellonear-AI/hellonear/blob/main/apps/be/src/wallets.ts) | [Yes](https://github.com/Hellonear-AI/hellonear#hackathon-phase-testnet) | +| Mind registry contract | N/A | N/A | [Yes](https://testnet.nearblocks.io/address/hellonear-registry.testnet?tab=contract) | [Yes](https://github.com/Hellonear-AI/hellonear/tree/main/sc) | [Yes](https://testnet.nearblocks.io/address/hellonear-registry.testnet) | +| Swarm auction contract | N/A | N/A | [Yes](https://testnet.nearblocks.io/address/auction.hellonear-swarm.testnet?tab=contract) | [Yes](https://github.com/Hellonear-AI/hellonear/tree/main/sc/swarm) | [Yes](https://testnet.nearblocks.io/address/auction.hellonear-swarm.testnet) | +| Hosted demo (app and API) | N/A | N/A | N/A | [Yes](https://github.com/Hellonear-AI/hellonear) | [Yes](https://github.com/Hellonear-AI/hellonear#hackathon-phase-testnet) | + +"Source public" means the code is published to be read and run locally; the license is all rights reserved, not an open-source license ([LICENSE](https://github.com/Hellonear-AI/hellonear/blob/main/LICENSE)). The hosted API names the commit it runs at [api.hellonear.xyz/v1/health](https://api.hellonear.xyz/v1/health) (`revision`). + +## Controls + +HelloNear holds no compliance certification. These are the controls that exist in the code, each with where to check it. + +### Owner approval for every payment +Nothing is paid until the owner approves, in the app or in Telegram, unless the owner turned on a rule for small payments to listed addresses. See [Wallet, limits and approvals](https://docs.hellonear.xyz/wallet-and-approvals). + +### Wallet policy checked in a TEE +Per-payment limit, daily limit and allowed addresses are stored on NEAR and checked by OutLayer in a TEE before signing. A refused payment has no transaction. [Policy tx](https://testnet.nearblocks.io/txns/DhKqbLAX3zhH2tP3kJDx5Xsk8ZkMByfJbYLyWYyivXXZ). + +### Freeze in one signature +The owner signs one transaction and every later payment ends `wallet_frozen`. [Freeze tx](https://testnet.nearblocks.io/txns/HHGf2pqGRGTEJuA7wn4R18swFC4ssL6XMyXyogFHkDgu). + +### Verified replies +Each reply's signature is checked against NEAR AI Cloud's TEE attestation before the badge shows, and the proof opens on Phala's TEE Explorer. See [Verified replies](https://docs.hellonear.xyz/verified-replies). + +### Secrets the model never sees +API keys are encrypted with AES-256-GCM and filled in only by the tool, for the hosts the owner listed. A test scans every table for them. See [Connections and keys](https://docs.hellonear.xyz/connections). + +### Verified contract source +Both contracts were built reproducibly and verified through SourceScan, so anyone can rebuild them and compare the code hash. See [Receipts and smart contracts](https://docs.hellonear.xyz/contracts). diff --git a/apps/trust/content/resources.md b/apps/trust/content/resources.md new file mode 100644 index 00000000..82601306 --- /dev/null +++ b/apps/trust/content/resources.md @@ -0,0 +1,33 @@ +--- +title: Resources +description: Documents and commands to check HelloNear's claims yourself, grouped by verification, contracts, API and security. +--- + +## Verification + +- [Receipts: check them yourself](https://github.com/Hellonear-AI/hellonear#receipts-check-them-yourself): every on-chain claim with its transaction. +- [A verified reply's TEE Explorer report](https://proof.t16z.com/reports/1b374e5b10031496c6c45bc7749038d7e7cd26a16996455f893b6b5dd44a9db2): reads VERIFIED. +- [Verified replies](https://docs.hellonear.xyz/verified-replies): badge levels and what the proof holds. +- [How the NEAR Intents quotes are checked](https://github.com/Hellonear-AI/hellonear#near-intents-quotes-signed-by-1click): 1Click's signature, checked with the official SDK. + +## Contracts + +- [Registry contract: verify it without a browser](https://docs.hellonear.xyz/contracts#the-registry-contracts-source-is-verified): three RPC commands that print the code hash, the build info and SourceScan's record. +- [Registry contract interface](https://github.com/Hellonear-AI/hellonear/blob/main/sc/README.md): methods, events and upgrade rules. +- [Swarm auction rules](https://github.com/Hellonear-AI/hellonear/blob/main/sc/swarm/RULES.md): the round, the bond and who can close. +- [Swarm auction safety choices](https://github.com/Hellonear-AI/hellonear/blob/main/sc/swarm/README.md): the 9 findings of the 13 Nov review and how each was fixed. +- [Swarm simulation report](https://github.com/Hellonear-AI/hellonear/blob/main/sc/swarm/simulation-report.md): 20 buyers, 5 sellers, money conserved every round. + +## API + +- [OpenAPI spec](https://github.com/Hellonear-AI/hellonear/blob/main/docs/openapi.json), rendered in the [API reference](https://docs.hellonear.xyz/api-reference). +- [API contract](https://github.com/Hellonear-AI/hellonear/blob/main/docs/api-contract.md): every route, field and event. +- [Streaming events](https://docs.hellonear.xyz/events) and [Errors](https://docs.hellonear.xyz/errors). +- [Status page](https://status.hellonear.xyz) and its data at [GET /v1/status](https://api.hellonear.xyz/v1/status). + +## Security + +- [Security model](https://github.com/Hellonear-AI/hellonear#security-model): the layers and how to see each one stop an attack. +- [What is private, and what HelloNear keeps](https://docs.hellonear.xyz/privacy). +- [Hosted demo setup](https://github.com/Hellonear-AI/hellonear/blob/main/deploy/README.md): firewall, tunnel, where keys live. +- [Report an issue](https://github.com/Hellonear-AI/hellonear/issues/new). diff --git a/apps/trust/content/subprocessors.md b/apps/trust/content/subprocessors.md new file mode 100644 index 00000000..478485a8 --- /dev/null +++ b/apps/trust/content/subprocessors.md @@ -0,0 +1,61 @@ +--- +title: Subprocessors +description: The third-party services HelloNear uses, what each one does, and what data it receives. +--- + +Services outside HelloNear that receive data when you use it. Each entry says what it is for and what it gets. + +### NEAR AI Cloud +- **Function:** language model and embeddings +- **Runs in:** a TEE; each reply is verified against the attestation +- **Used for:** every chat reply, workflow step and memory search. Prompts and replies are processed inside the TEE. + +### OutLayer +- **Function:** the Mind's wallet +- **Runs in:** a TEE; NEAR testnet (`testnet-api.outlayer.ai`) +- **Used for:** signing payments after the wallet policy is checked. Receives the payment's amount and recipient. + +### Composio +- **Function:** app connections (OAuth) +- **Runs in:** Composio's hosted service +- **Used for:** Gmail, Google Calendar and Meet, Sheets, Drive, Docs, Notion, Slack, Discord, Outlook, HubSpot and Zoom. Stores and refreshes the OAuth tokens; the tools read and write the owner's app data through it. + +### AgentMail +- **Function:** a Mind's own email inbox +- **Runs in:** AgentMail's hosted service +- **Used for:** only Minds with the `email-address` skill. Receives the emails that Mind sends and receives. + +### NEAR Intents (1Click) +- **Function:** cross-chain payment quotes +- **Runs in:** NEAR Intents' hosted API +- **Used for:** dry quotes only (`dry: true`); nothing is sent. Receives the amount, tokens, chains and addresses of the quote. + +### NEAR AI Agent Market +- **Function:** catalog of agents and their prices +- **Runs in:** market.near.ai +- **Used for:** the Hire on Agent Market skill. A search sends the search terms; a quote sends the job description to the chosen agent. Nothing is hired or paid. + +### FastNear RPC +- **Function:** NEAR testnet RPC +- **Runs in:** NEAR testnet (`test.rpc.fastnear.com`) +- **Used for:** account lookups, payment checks, the relayer and the status checks. Receives public account names and transaction hashes. + +### Phala TEE Attestation Explorer +- **Function:** public report for a TEE quote +- **Runs in:** proof.t16z.com +- **Used for:** only when the owner clicks **Check it in TEE Explorer**. Receives the Intel quote, no conversation text; the report is public. + +### Vercel +- **Function:** web hosting +- **Runs in:** Vercel +- **Used for:** status.hellonear.xyz, and this docs and trust site. + +### Cloudflare +- **Function:** DNS and tunnel +- **Runs in:** Cloudflare +- **Used for:** the public names `hellonear.xyz`, `app.hellonear.xyz` and `api.hellonear.xyz`, through a Cloudflare Tunnel to the hosted demo. + +### Telegram +- **Function:** chat bot (optional) +- **Runs in:** Telegram +- **Used for:** only Minds whose owner linked a bot. Receives the owner's messages to the bot, the Mind's replies and approval cards. diff --git a/apps/trust/content/updates.md b/apps/trust/content/updates.md new file mode 100644 index 00000000..311e1a2b --- /dev/null +++ b/apps/trust/content/updates.md @@ -0,0 +1,44 @@ +--- +title: Updates +description: Dated changes to HelloNear's security, verification and availability, each backed by the repository. +--- + +### Status page live, after two provider outages +Published 13 November 2026 · Availability + +[status.hellonear.xyz](https://status.hellonear.xyz) checks HelloNear and its providers every 5 minutes. It was built after two outages from outside HelloNear's code in one night: NEAR AI embeddings hung, and NEAR Intents 1Click quotes timed out. Minds now say plainly when a provider is down and point to the status page. + +### Swarm auction contract live and source-verified +Published 13 November 2026 · Contracts + +`auction.hellonear-swarm.testnet` was built reproducibly from commit `64c9278` and verified through SourceScan (code hash `6Wn9K6b3DtoH4TnoXs2jx6zFzihdzFDQGw4ae2dzcCv1`). The 9 findings of the 13 Nov review were fixed before it was deployed, and round 0 ran on testnet. See [Swarm auction](https://docs.hellonear.xyz/swarm-auction). + +### Gas relayer live on the hosted demo +Published 13 November 2026 · Wallet + +A NEP-366 relayer pays the gas for owners' `unequip_skill` and `set_wallet` calls to the registry, never a deposit, and refuses a bad request before sending it. See [Gas relayer](https://docs.hellonear.xyz/relayer). + +### Registry contract redeployed from a reproducible build +Published 12 November 2026 · Contracts + +`hellonear-registry.testnet` v0.3.0 was redeployed code-only from a reproducible build of commit `95c2b3d` and verified through SourceScan (code hash `GUxsMNJdJKoFq7VJawNeCwW7GjGZE6TpURPj13ojEnub`, tx [`DmidjQmo…`](https://testnet.nearblocks.io/txns/DmidjQmoN15bj2qctXaXDefAW5NGJZFBPqqPPFJoa6Qb)). + +### Check a verified reply on Phala's TEE Explorer +Published 12 November 2026 · Verification + +**Check it in TEE Explorer** uploads a run's Intel quote and opens a report that reads VERIFIED. Only the quote leaves, no conversation text. + +### View proof behind the Verified badge +Published 11 November 2026 · Verification + +Every verified reply keeps its proof (signatures, hashes and Intel's TDX quote), and the owner can open it from the badge. + +### Daily limit proven on testnet +Published 10 November 2026 · Wallet + +A daily spending cap in the wallet policy was tested on a throwaway wallet: over the cap, OutLayer refuses before signing with no transaction; exactly at the cap goes through; a refused request does not count. + +### Demo wallet replaced after its key was exposed +Published 8 November 2026 · Security + +The demo Mind wallet's key was exposed, so the demo now uses a new wallet with a new key (`83e05486…`). The new key is kept only in gitignored `.env` files. diff --git a/apps/trust/lib/content.ts b/apps/trust/lib/content.ts new file mode 100644 index 00000000..a622867b --- /dev/null +++ b/apps/trust/lib/content.ts @@ -0,0 +1,67 @@ +import generated from './generated/pages.json' +import { SITE_URL } from './site' +import { TABS } from './tabs' + +export { TABS } + +export type Page = { slug: string; title: string; description: string; markdown: string } + +export const pages: Page[] = generated +const bySlug = new Map(pages.map((p) => [p.slug, p])) + + +/** A page by slug ('' is the Overview), or undefined. Accepts '/x', 'x.md' and 'x/'. */ +export function getPage(path: string): Page | undefined { + return bySlug.get(normalize(path)) +} + +export function normalize(path: string): string { + let p = path.trim() + try { + if (/^https?:\/\//.test(p)) p = new URL(p).pathname + } catch {} + p = p.split(/[?#]/)[0].replace(/^\/+|\/+$/g, '').replace(/\.md$/, '') + return p === 'index' ? '' : p +} + +export const pageUrl = (slug: string) => `/${slug}` +export const markdownUrl = (slug: string) => (slug ? `/${slug}.md` : '/index.md') + +/** The page as one Markdown document: what /.md returns. */ +export function pageMarkdown(p: Page): string { + return `# ${p.title}\n\n> ${p.description}\n\n${p.markdown}` +} + +export function llmsTxt(base = SITE_URL): string { + const list = TABS.map((t) => bySlug.get(t.slug)!) + .map((p) => `- [${p.title}](${base}${markdownUrl(p.slug)}): ${p.description}`) + .join('\n') + return `# HelloNear Trust Center\n\n> ${bySlug.get('')!.description}\n\nEverything runs on NEAR testnet during NEAR HACKATHON (1 to 14 Nov 2026). Every page below is Markdown; the HTML version is the same path without \`.md\`. The product docs are at https://docs.hellonear.xyz.\n\n## Pages\n\n${list}\n` +} + +/** Splits Markdown at headings of one level: the text before the first one, then each section. */ +export function sections(markdown: string, level: 2 | 3): { intro: string; items: { title: string; id: string; body: string }[] } { + const mark = '#'.repeat(level) + ' ' + const intro: string[] = [] + const items: { title: string; id: string; body: string }[] = [] + let inFence = false + for (const line of markdown.split('\n')) { + if (line.startsWith('```')) inFence = !inFence + if (!inFence && line.startsWith(mark)) { + const title = line.slice(mark.length).trim() + items.push({ title, id: slugify(title), body: '' }) + } else if (items.length) items[items.length - 1].body += line + '\n' + else intro.push(line) + } + return { intro: intro.join('\n').trim(), items: items.map((i) => ({ ...i, body: i.body.trim() })) } +} + +/** GitHub-style heading ids, so README anchors keep working. */ +export function slugify(text: string): string { + return text + .toLowerCase() + .replace(/<[^>]+>/g, '') + .replace(/[^\p{L}\p{N}\s_-]/gu, '') + .trim() + .replace(/\s/g, '-') +} diff --git a/apps/trust/lib/markdown.ts b/apps/trust/lib/markdown.ts new file mode 100644 index 00000000..e498fc10 --- /dev/null +++ b/apps/trust/lib/markdown.ts @@ -0,0 +1,34 @@ +import { Marked } from 'marked' +import { slugify } from './content' + +const marked = new Marked({ + gfm: true, + renderer: { + heading({ tokens, depth, text }) { + const id = slugify(text) + const inner = this.parser.parseInline(tokens) + return `${inner}\n` + }, + link({ href, title, tokens }) { + const inner = this.parser.parseInline(tokens) + const external = /^https?:\/\//.test(href) + const t = title ? ` title="${title}"` : '' + return external ? `${inner}` : `${inner}` + }, + }, +}) + +/** Markdown from content/ (ours, trusted) to HTML. */ +export function render(markdown: string): string { + const html = marked.parse(markdown, { async: false }) as string + // Wide tables scroll inside their own box, never the page. + return html.replace(//g, '
').replace(/<\/table>/g, '
') +} + +/** The trust overview's scope table: "Yes" cells become a check mark, "N/A" cells are dimmed. */ +export function renderMatrix(markdown: string): string { + return render(markdown) + .replace(/]*)>]*)>Yes<\/a><\/td>/g, ' Yes') + .replace(/]*)>Yes<\/td>/g, ' Yes') + .replace(/]*)>N\/A<\/td>/g, 'N/A') +} diff --git a/apps/trust/lib/site.ts b/apps/trust/lib/site.ts new file mode 100644 index 00000000..e2f3875b --- /dev/null +++ b/apps/trust/lib/site.ts @@ -0,0 +1,5 @@ +export const SITE_URL = 'https://trust.hellonear.xyz' +export const DOCS_URL = 'https://docs.hellonear.xyz' +export const REPO_URL = 'https://github.com/Hellonear-AI/hellonear' +export const ISSUES_URL = `${REPO_URL}/issues/new` +export const STATUS_URL = 'https://status.hellonear.xyz' diff --git a/apps/trust/lib/tabs.ts b/apps/trust/lib/tabs.ts new file mode 100644 index 00000000..9ed0f44d --- /dev/null +++ b/apps/trust/lib/tabs.ts @@ -0,0 +1,8 @@ +/** The Trust Center's tabs, in order; '' is the Overview. Every page in content/ is one of them (a test checks it). */ +export const TABS: { slug: string; label: string }[] = [ + { slug: '', label: 'Overview' }, + { slug: 'resources', label: 'Resources' }, + { slug: 'subprocessors', label: 'Subprocessors' }, + { slug: 'faq', label: 'FAQ' }, + { slug: 'updates', label: 'Updates' }, +] diff --git a/apps/trust/next-env.d.ts b/apps/trust/next-env.d.ts new file mode 100644 index 00000000..a419cbe4 --- /dev/null +++ b/apps/trust/next-env.d.ts @@ -0,0 +1,7 @@ +/// +/// +import "./.next/dev/types/routes.d.ts"; +import "./.next/dev/types/root-params.d.ts"; + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/apps/trust/next.config.ts b/apps/trust/next.config.ts new file mode 100644 index 00000000..527d6391 --- /dev/null +++ b/apps/trust/next.config.ts @@ -0,0 +1,10 @@ +import type { NextConfig } from "next"; + +const nextConfig: NextConfig = { + async headers() { + // Agents find the Markdown index from any page (llms.txt convention). + return [{ source: "/:path*", headers: [{ key: "Link", value: '; rel="llms-txt"' }] }]; + }, +}; + +export default nextConfig; diff --git a/apps/trust/package.json b/apps/trust/package.json new file mode 100644 index 00000000..d6f37229 --- /dev/null +++ b/apps/trust/package.json @@ -0,0 +1,33 @@ +{ + "name": "@hellonear/trust", + "version": "0.1.0", + "private": true, + "engines": { + "node": "^22.22.2 || >=24.0.0" + }, + "scripts": { + "content": "node scripts/build-content.mjs", + "predev": "node scripts/build-content.mjs", + "dev": "next dev --port 3400", + "prebuild": "node scripts/build-content.mjs", + "build": "next build", + "start": "next start --port 3400", + "pretypecheck": "node scripts/build-content.mjs", + "typecheck": "tsc --noEmit", + "pretest": "node scripts/build-content.mjs", + "test": "node --import tsx --test tests/*.test.ts" + }, + "dependencies": { + "marked": "18.1.2", + "next": "16.4.4", + "react": "19.3.1", + "react-dom": "19.3.1" + }, + "devDependencies": { + "@types/node": "26.6.6", + "@types/react": "19.3.0", + "@types/react-dom": "19.3.0", + "tsx": "4.23.15", + "typescript": "6.0.3" + } +} diff --git a/apps/trust/proxy.ts b/apps/trust/proxy.ts new file mode 100644 index 00000000..60c52d2f --- /dev/null +++ b/apps/trust/proxy.ts @@ -0,0 +1,34 @@ +import { NextResponse, type NextRequest } from "next/server"; + +/** Whether the client prefers Markdown over HTML (Accept lists text/markdown, and before text/html if both). */ +export function wantsMarkdown(accept: string | null): boolean { + if (!accept) return false; + const a = accept.toLowerCase(); + const md = a.indexOf("text/markdown"); + if (md < 0) return false; + const html = a.indexOf("text/html"); + return html < 0 || md < html; +} + +/** Where a request should be served from, or null to serve it as is: /faq.md and Markdown-preferring requests read /md/faq. */ +export function rewriteTarget(path: string, accept: string | null): string | null { + const p = path.replace(/\/+$/, "") || "/"; + if (p.endsWith(".md")) { + const slug = p.slice(0, -3).replace(/^\/(index)?$/, "/"); + return `/md${slug === "/" ? "" : slug}`; + } + if (wantsMarkdown(accept) && !p.includes(".") && !p.startsWith("/md")) return `/md${p === "/" ? "" : p}`; + return null; +} + +export function proxy(request: NextRequest) { + const target = rewriteTarget(request.nextUrl.pathname, request.headers.get("accept")); + if (!target) return NextResponse.next(); + const url = request.nextUrl.clone(); + url.pathname = target; + return NextResponse.rewrite(url); +} + +export const config = { + matcher: ["/((?!_next/|api/|icon.svg|favicon.ico|apple-icon.png|llms).*)"], +}; diff --git a/apps/trust/scripts/build-content.mjs b/apps/trust/scripts/build-content.mjs new file mode 100644 index 00000000..04614a5f --- /dev/null +++ b/apps/trust/scripts/build-content.mjs @@ -0,0 +1,37 @@ +// Turns content/*.md into lib/generated/pages.json, the one source every route reads (HTML, .md export, llms.txt), +// so nothing reads the file system at request time. +import { mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs' +import { dirname, join } from 'node:path' +import { fileURLToPath } from 'node:url' + +const root = join(dirname(fileURLToPath(import.meta.url)), '..') +const contentDir = join(root, 'content') + +export function parsePage(file, text) { + const m = /^---\n([\s\S]*?)\n---\n/.exec(text) + if (!m) throw new Error(`${file}: missing frontmatter`) + const meta = Object.fromEntries( + m[1].split('\n').filter(Boolean).map((line) => { + const i = line.indexOf(':') + if (i < 0) throw new Error(`${file}: bad frontmatter line "${line}"`) + return [line.slice(0, i).trim(), line.slice(i + 1).trim()] + }), + ) + if (!meta.title || !meta.description) throw new Error(`${file}: title and description are required`) + const slug = file.replace(/\.md$/, '').replace(/^index$/, '') + return { slug, title: meta.title, description: meta.description, markdown: text.slice(m[0].length).trim() + '\n' } +} + +const pages = readdirSync(contentDir) + .filter((name) => name.endsWith('.md')) + .map((name) => parsePage(name, readFileSync(join(contentDir, name), 'utf8'))) + .sort((a, b) => a.slug.localeCompare(b.slug)) + +for (const p of pages) { + if (/[–—]/.test(p.markdown + p.title + p.description)) throw new Error(`content/${p.slug || 'index'}.md: no en or em dashes`) +} + +// lib/generated/ is gitignored: make it on a fresh checkout. +mkdirSync(join(root, 'lib/generated'), { recursive: true }) +writeFileSync(join(root, 'lib/generated/pages.json'), JSON.stringify(pages, null, 1) + '\n') +console.log(`content: ${pages.length} pages`) diff --git a/apps/trust/tests/content.test.ts b/apps/trust/tests/content.test.ts new file mode 100644 index 00000000..ff94c1bb --- /dev/null +++ b/apps/trust/tests/content.test.ts @@ -0,0 +1,81 @@ +import assert from 'node:assert/strict' +import { test } from 'node:test' +import { TABS, getPage, llmsTxt, normalize, pageMarkdown, pages, sections, slugify } from '../lib/content' +import { render, renderMatrix } from '../lib/markdown' +import { rewriteTarget, wantsMarkdown } from '../proxy' + +test('every content page is a tab exactly once', () => { + const listed = TABS.map((t) => t.slug) + assert.equal(new Set(listed).size, listed.length, 'a tab is listed twice') + assert.deepEqual([...listed].sort(), pages.map((p) => p.slug).sort()) +}) + +test('pages load with title, description and body, and no en or em dashes or emoji', () => { + assert.equal(pages.length, 5) + for (const p of pages) { + assert.ok(p.title && p.description && p.markdown.trim(), p.slug) + assert.doesNotMatch(p.markdown + p.title + p.description, /[–—]/, p.slug) + assert.doesNotMatch(p.markdown, /\p{Extended_Pictographic}/u, `${p.slug}: no emoji`) + } +}) + +test('no compliance badges and no audit claim anywhere', () => { + for (const p of pages) assert.doesNotMatch(p.markdown, /SOC ?2|ISO ?27001|ISO ?42001|HIPAA|\baudited\b/i, p.slug) +}) + +test('links are absolute or point at a trust page; none point at old docs-relative paths', () => { + const tabs = new Set(TABS.map((t) => t.slug)) + for (const p of pages) { + for (const [, href] of p.markdown.matchAll(/\]\(([^)\s]+)/g)) { + if (/^https?:\/\//.test(href) || href.startsWith('#')) continue + assert.ok(tabs.has(normalize(href)), `${p.slug || 'index'} links to ${href}, not a trust page or a full URL`) + } + } +}) + +test('every Yes in the scope table links to its proof', () => { + const scope = sections(getPage('')!.markdown, 2).items.find((s) => s.title === 'Scope and controls')! + const yes = [...scope.body.matchAll(/\|\s*(\[Yes\]\([^)]+\)|Yes)\s*(?=\|)/g)].map((m) => m[1]) + assert.ok(yes.length > 0) + for (const y of yes) assert.match(y, /^\[Yes\]\(https?:\/\//, `unlinked Yes: ${y}`) +}) + +test('getPage accepts paths, .md suffixes and full URLs', () => { + assert.equal(normalize('/faq.md'), 'faq') + assert.equal(normalize('https://trust.hellonear.xyz/faq#security'), 'faq') + assert.equal(normalize('/index.md'), '') + assert.equal(getPage('/')?.title, 'Trust Center') + assert.equal(getPage('subprocessors/')?.title, 'Subprocessors') + assert.equal(getPage('nope'), undefined) +}) + +test('llms.txt lists every page as a .md link', () => { + const txt = llmsTxt('https://x.test') + assert.match(txt, /^# HelloNear Trust Center\n\n> /) + for (const p of pages) assert.ok(txt.includes(`https://x.test${p.slug ? `/${p.slug}.md` : '/index.md'}`), p.slug) + assert.ok(pageMarkdown(getPage('faq')!).startsWith('# FAQ\n\n> ')) +}) + +test('headings get GitHub-style ids; sections split at one level and ignore code fences', () => { + assert.equal(slugify("The registry contract's source is verified"), 'the-registry-contracts-source-is-verified') + assert.match(render('## Hello, world'), /

/) + const s = sections('intro\n\n## A\none\n```\n## not a heading\n```\n## B\ntwo', 2) + assert.equal(s.intro, 'intro') + assert.deepEqual(s.items.map((i) => i.title), ['A', 'B']) +}) + +test('the scope table renders Yes as a linked check and N/A dimmed', () => { + const html = renderMatrix('| Scope | X | Y |\n|---|---|---|\n| Chat | [Yes](https://e.test) | N/A |') + assert.match(html, /class="cell-yes">]*class="check"/) + assert.match(html, /class="cell-na">N\/A { + assert.equal(rewriteTarget('/faq.md', null), '/md/faq') + assert.equal(rewriteTarget('/index.md', null), '/md') + assert.equal(rewriteTarget('/', 'text/markdown'), '/md') + assert.equal(rewriteTarget('/updates', 'text/markdown, text/html;q=0.5'), '/md/updates') + assert.equal(rewriteTarget('/updates', 'text/html,application/xhtml+xml'), null) + assert.equal(rewriteTarget('/faq', null), null) + assert.equal(wantsMarkdown('text/html, text/markdown'), false) +}) diff --git a/apps/trust/tsconfig.json b/apps/trust/tsconfig.json new file mode 100644 index 00000000..1a0ca4a3 --- /dev/null +++ b/apps/trust/tsconfig.json @@ -0,0 +1,41 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": false, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "react-jsx", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": [ + "./*" + ] + } + }, + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts", + ".next/dev/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} From ed70eb9138ee7c110b31a4fc375481e96b7986e1 Mon Sep 17 00:00:00 2001 From: Lexirieru Date: Fri, 13 Nov 2026 05:10:12 +0700 Subject: [PATCH 2/4] feat(docs): docs.hellonear.xyz moves to Mintlify; the Next.js docs app and its /trust are removed Axel set up a Mintlify project (Starter) connected to this repo. apps/docs is now that project: the 29 docs pages as .mdx with the same text and the same sidebar order, docs.json (Stone & Lime colors, HelloNear logo and favicon from design/logo, navbar Trust / Status / GitHub), and an Endpoints tab Mintlify generates from docs/openapi.json on main through its raw GitHub URL (Mintlify refuses ../ paths, and a copy would drift). Links to the old app's own files (/openapi.json, /trust, /llms.txt, /skill.md, /mcp) now point at GitHub, trust.hellonear.xyz and Mintlify's generated equivalents. The Next.js app, Swagger UI and our MCP server are gone; Mintlify serves llms.txt, Markdown per page, skill.md and a search MCP. The Trust Center lives in apps/trust (previous commit). CI docs.yml now runs mint validate and broken-links --check-anchors (mint 4.2.1184). Tests: bunx mint@4.2.1184 validate: build passed, validation passed; broken-links --check-anchors: no broken links; mint dev on :3333: all docs pages 200, Endpoints tab lists 63 operations, an endpoint page shows its playground against https://api.hellonear.xyz (checked in Chrome). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e --- .github/workflows/docs.yml | 12 +- apps/docs/.gitignore | 6 - apps/docs/AGENTS.md | 9 - apps/docs/CLAUDE.md | 37 ++-- .../agent-market.md => agent-market.mdx} | 4 +- apps/docs/{content/agent.md => agent.mdx} | 4 +- .../api-reference.md => api-reference.mdx} | 6 +- apps/docs/{content/api.md => api.mdx} | 4 +- apps/docs/app/(docs)/[[...slug]]/page.tsx | 69 ------ apps/docs/app/(docs)/layout.tsx | 19 -- apps/docs/app/.well-known/mcp/route.ts | 23 -- apps/docs/app/_components/Brand.tsx | 13 -- apps/docs/app/_components/Faq.tsx | 31 --- apps/docs/app/_components/Sidebar.tsx | 24 -- apps/docs/app/_components/Swagger.tsx | 37 ---- apps/docs/app/_components/TrustTabs.tsx | 20 -- apps/docs/app/_components/UpdateCard.tsx | 17 -- apps/docs/app/apple-icon.png | Bin 2723 -> 0 bytes apps/docs/app/favicon.ico | Bin 2914 -> 0 bytes apps/docs/app/globals.css | 187 ---------------- apps/docs/app/layout.tsx | 23 -- apps/docs/app/llms-full.txt/route.ts | 5 - apps/docs/app/llms.txt/route.ts | 5 - apps/docs/app/mcp/route.ts | 32 --- apps/docs/app/md/[[...slug]]/route.ts | 12 - apps/docs/app/skill.md/route.ts | 5 - apps/docs/app/trust/[section]/page.tsx | 95 -------- apps/docs/app/trust/layout.tsx | 41 ---- apps/docs/app/trust/page.tsx | 65 ------ .../{content/autopilot.md => autopilot.mdx} | 4 +- apps/docs/bun.lock | 208 ------------------ .../connections.md => connections.mdx} | 4 +- .../{content/connectors.md => connectors.mdx} | 4 +- apps/docs/content/trust/faq.md | 65 ------ apps/docs/content/trust/index.md | 42 ---- apps/docs/content/trust/resources.md | 33 --- apps/docs/content/trust/subprocessors.md | 61 ----- apps/docs/content/trust/updates.md | 44 ---- .../contract-check.md => contract-check.mdx} | 4 +- .../{content/contracts.md => contracts.mdx} | 4 +- apps/docs/docs.json | 119 ++++++++++ apps/docs/{content/errors.md => errors.mdx} | 4 +- apps/docs/{content/events.md => events.mdx} | 4 +- apps/docs/{app/icon.svg => favicon.svg} | 0 ...hackathon-phase.md => hackathon-phase.mdx} | 4 +- .../{content/haggling.md => haggling.mdx} | 4 +- .../how-it-works.md => how-it-works.mdx} | 4 +- apps/docs/{content/index.md => index.mdx} | 10 +- apps/docs/lib/content.ts | 116 ---------- apps/docs/lib/markdown.ts | 34 --- apps/docs/lib/mcp.ts | 94 -------- apps/docs/lib/nav.ts | 21 -- apps/docs/lib/site.ts | 7 - apps/docs/lib/skill.ts | 41 ---- apps/docs/logo/dark.svg | 1 + apps/docs/logo/light.svg | 1 + apps/docs/{content/minds.md => minds.mdx} | 4 +- apps/docs/next-env.d.ts | 7 - apps/docs/next.config.ts | 18 -- apps/docs/package.json | 34 --- .../payments-csv.md => payments-csv.mdx} | 4 +- apps/docs/{content/privacy.md => privacy.mdx} | 4 +- apps/docs/proxy.ts | 42 ---- .../{content/quickstart.md => quickstart.mdx} | 4 +- apps/docs/{content/relayer.md => relayer.mdx} | 4 +- .../run-locally.md => run-locally.mdx} | 4 +- apps/docs/scripts/build-content.mjs | 50 ----- apps/docs/{content/skills.md => skills.mdx} | 4 +- apps/docs/{content/status.md => status.mdx} | 4 +- .../swarm-auction.md => swarm-auction.mdx} | 4 +- .../{content/tech-stack.md => tech-stack.mdx} | 4 +- .../{content/telegram.md => telegram.mdx} | 4 +- apps/docs/tests/content.test.ts | 98 --------- apps/docs/tests/mcp.test.ts | 48 ---- apps/docs/{content/tracks.md => tracks.mdx} | 4 +- apps/docs/tsconfig.json | 41 ---- ...rified-replies.md => verified-replies.mdx} | 4 +- ...-approvals.md => wallet-and-approvals.mdx} | 4 +- 78 files changed, 200 insertions(+), 1936 deletions(-) delete mode 100644 apps/docs/.gitignore delete mode 100644 apps/docs/AGENTS.md rename apps/docs/{content/agent-market.md => agent-market.mdx} (84%) rename apps/docs/{content/agent.md => agent.mdx} (99%) rename apps/docs/{content/api-reference.md => api-reference.mdx} (60%) rename apps/docs/{content/api.md => api.mdx} (98%) delete mode 100644 apps/docs/app/(docs)/[[...slug]]/page.tsx delete mode 100644 apps/docs/app/(docs)/layout.tsx delete mode 100644 apps/docs/app/.well-known/mcp/route.ts delete mode 100644 apps/docs/app/_components/Brand.tsx delete mode 100644 apps/docs/app/_components/Faq.tsx delete mode 100644 apps/docs/app/_components/Sidebar.tsx delete mode 100644 apps/docs/app/_components/Swagger.tsx delete mode 100644 apps/docs/app/_components/TrustTabs.tsx delete mode 100644 apps/docs/app/_components/UpdateCard.tsx delete mode 100644 apps/docs/app/apple-icon.png delete mode 100644 apps/docs/app/favicon.ico delete mode 100644 apps/docs/app/globals.css delete mode 100644 apps/docs/app/layout.tsx delete mode 100644 apps/docs/app/llms-full.txt/route.ts delete mode 100644 apps/docs/app/llms.txt/route.ts delete mode 100644 apps/docs/app/mcp/route.ts delete mode 100644 apps/docs/app/md/[[...slug]]/route.ts delete mode 100644 apps/docs/app/skill.md/route.ts delete mode 100644 apps/docs/app/trust/[section]/page.tsx delete mode 100644 apps/docs/app/trust/layout.tsx delete mode 100644 apps/docs/app/trust/page.tsx rename apps/docs/{content/autopilot.md => autopilot.mdx} (90%) delete mode 100644 apps/docs/bun.lock rename apps/docs/{content/connections.md => connections.mdx} (92%) rename apps/docs/{content/connectors.md => connectors.mdx} (95%) delete mode 100644 apps/docs/content/trust/faq.md delete mode 100644 apps/docs/content/trust/index.md delete mode 100644 apps/docs/content/trust/resources.md delete mode 100644 apps/docs/content/trust/subprocessors.md delete mode 100644 apps/docs/content/trust/updates.md rename apps/docs/{content/contract-check.md => contract-check.mdx} (86%) rename apps/docs/{content/contracts.md => contracts.mdx} (98%) create mode 100644 apps/docs/docs.json rename apps/docs/{content/errors.md => errors.mdx} (94%) rename apps/docs/{content/events.md => events.mdx} (98%) rename apps/docs/{app/icon.svg => favicon.svg} (100%) rename apps/docs/{content/hackathon-phase.md => hackathon-phase.mdx} (97%) rename apps/docs/{content/haggling.md => haggling.mdx} (90%) rename apps/docs/{content/how-it-works.md => how-it-works.mdx} (94%) rename apps/docs/{content/index.md => index.mdx} (76%) delete mode 100644 apps/docs/lib/content.ts delete mode 100644 apps/docs/lib/markdown.ts delete mode 100644 apps/docs/lib/mcp.ts delete mode 100644 apps/docs/lib/nav.ts delete mode 100644 apps/docs/lib/site.ts delete mode 100644 apps/docs/lib/skill.ts create mode 100644 apps/docs/logo/dark.svg create mode 100644 apps/docs/logo/light.svg rename apps/docs/{content/minds.md => minds.mdx} (94%) delete mode 100644 apps/docs/next-env.d.ts delete mode 100644 apps/docs/next.config.ts delete mode 100644 apps/docs/package.json rename apps/docs/{content/payments-csv.md => payments-csv.mdx} (82%) rename apps/docs/{content/privacy.md => privacy.mdx} (92%) delete mode 100644 apps/docs/proxy.ts rename apps/docs/{content/quickstart.md => quickstart.mdx} (98%) rename apps/docs/{content/relayer.md => relayer.mdx} (87%) rename apps/docs/{content/run-locally.md => run-locally.mdx} (95%) delete mode 100644 apps/docs/scripts/build-content.mjs rename apps/docs/{content/skills.md => skills.mdx} (92%) rename apps/docs/{content/status.md => status.mdx} (95%) rename apps/docs/{content/swarm-auction.md => swarm-auction.mdx} (93%) rename apps/docs/{content/tech-stack.md => tech-stack.mdx} (98%) rename apps/docs/{content/telegram.md => telegram.mdx} (92%) delete mode 100644 apps/docs/tests/content.test.ts delete mode 100644 apps/docs/tests/mcp.test.ts rename apps/docs/{content/tracks.md => tracks.mdx} (98%) delete mode 100644 apps/docs/tsconfig.json rename apps/docs/{content/verified-replies.md => verified-replies.mdx} (90%) rename apps/docs/{content/wallet-and-approvals.md => wallet-and-approvals.mdx} (93%) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 238418ef..3f658ae8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -# Docs and Trust Center CI: typecheck, unit tests (content, llms, search, MCP, proxy) and a production build. No secrets. +# Docs CI (Mintlify): docs.json and every page build, and no internal link or anchor is broken. No secrets. name: docs on: @@ -16,7 +16,7 @@ permissions: contents: read jobs: - build: + mintlify: runs-on: ubuntu-latest timeout-minutes: 15 defaults: @@ -30,9 +30,5 @@ jobs: - uses: oven-sh/setup-bun@v2 with: bun-version: 1.3.9 - - run: bun install --frozen-lockfile - - run: bun run typecheck - - run: bun run test - - run: bun run build - env: - NEXT_TELEMETRY_DISABLED: '1' + - run: bunx mint@4.2.1184 validate + - run: bunx mint@4.2.1184 broken-links --check-anchors diff --git a/apps/docs/.gitignore b/apps/docs/.gitignore deleted file mode 100644 index ecf83ecc..00000000 --- a/apps/docs/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -tsconfig.tsbuildinfo -.vercel -.env* -lib/generated/ -public/openapi.json -public/swagger/ diff --git a/apps/docs/AGENTS.md b/apps/docs/AGENTS.md deleted file mode 100644 index af3b7c84..00000000 --- a/apps/docs/AGENTS.md +++ /dev/null @@ -1,9 +0,0 @@ - - -## This is NOT the Next.js you know - -This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. - -This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. - - diff --git a/apps/docs/CLAUDE.md b/apps/docs/CLAUDE.md index b2ea2e5c..cc5df487 100644 --- a/apps/docs/CLAUDE.md +++ b/apps/docs/CLAUDE.md @@ -1,37 +1,26 @@ # CLAUDE.md — apps/docs -The docs site, **docs.hellonear.xyz**, and the Trust Center, **trust.hellonear.xyz**: one Next.js app, one Vercel project (`hellonear-docs`). Built 13 Nov 2026. Owner: Axel. Root rules in `/CLAUDE.md` also apply. +The docs site, **docs.hellonear.xyz**, a **Mintlify** project (Starter plan) connected to this repository. Moved from a Next.js app to Mintlify on 13 Nov 2026; the Trust Center moved out to `apps/trust` at the same time. Owner: Axel. Root rules in `/CLAUDE.md` also apply. -**Update this file in the same PR whenever you change setup, commands, routes, content rules or where it is deployed.** +**Update this file in the same PR whenever you change pages, navigation, the Mintlify settings or where it is deployed.** ## How it works -- **One source:** every page is a Markdown file in `content/` (frontmatter `title`, `description`). `scripts/build-content.mjs` turns them into `lib/generated/pages.json` (gitignored; runs before `dev`, `build`, `typecheck` and `test`) and copies `../../docs/openapi.json` to `public/openapi.json` and Swagger UI to `public/swagger/` (both gitignored). The HTML pages, the `.md` export, `/llms.txt`, `/llms-full.txt` and the MCP tools all read that JSON, so nothing reads files at request time. The build fails on an en or em dash. -- **Content is true to the repo.** Most pages were sliced from `README.md` and `docs/api-contract.md` §3 on 13 Nov (README images stripped, relative links pointed at GitHub); they do not update by themselves, so change the page when the README section changes. Never invent features, numbers or claims; link proof (tx, report, file) where you can. -- **Sidebar order** is `lib/nav.ts`. A test fails if a page in `content/` is missing from it or listed twice; the trust pages are the `TRUST_TABS`. -- **Routes:** `app/(docs)/[[...slug]]` (docs pages; `api-reference` adds Swagger UI from `/openapi.json`, client-only: `swagger-ui-dist`'s prebuilt bundle copied to `public/swagger/` by the content script and loaded with `next/script`, because swagger-ui-react bundled by Turbopack throws `OpenApi3_1Element.refract is not a function` and an opened operation never loads), `app/trust` (Trust Center: Overview, `resources`, `subprocessors`, `faq`, `updates`, each built from its Markdown by heading: `###` sections become cards, FAQ `##` categories and `###` questions become `
`), `app/md/[[...slug]]` (Markdown), `app/llms.txt`, `app/llms-full.txt`, `app/skill.md` (`lib/skill.ts`, an Agent Skill), `app/mcp` and `app/.well-known/mcp`. -- **`proxy.ts`** (Next 16's middleware): `/.md` and requests that prefer `Accept: text/markdown` are served from `/md/`; on a `trust.*` host, `/`, `/resources`, `/subprocessors`, `/faq` and `/updates` are served from `/trust/...`. `next.config.ts` adds `Link: ; rel="llms-txt"` to every response. -- **MCP** (`lib/mcp.ts`): stateless Streamable HTTP, one JSON-RPC message per POST, JSON answers, no sessions. `initialize`, `ping`, `tools/list`, `tools/call` with `search_docs` (`search()` in `lib/content.ts`: keyword scoring, title > description > body) and `read_page`. Read-only, CORS `*`; GET answers 405. -- **Trust Center rules (Axel, 13 Nov):** no compliance badges or certifications (HelloNear has none), no "audit" as a claim, no team members' names, no emoji. Every "Yes" in the scope table links to its proof; "N/A" where a control does not apply. Updates only for what git log or the README proves. -- Styles: plain CSS (`app/globals.css`) with the web app's Stone & Lime tokens, light and dark by `prefers-color-scheme`. Sidebar on desktop, a `
` menu on phones (no JavaScript needed), 16px gutters, no horizontal scroll (checked at 390 px). +- **Pages:** one `.mdx` file per page in this folder (frontmatter `title`, `description`), `index.mdx` is the introduction. Most text was sliced from `README.md` and `docs/api-contract.md` §3 on 13 Nov; it does not update by itself, so change the page when the README section changes. Never invent features, numbers or claims; link proof (tx, report, file) where you can. No en or em dashes. MDX: `{`, `}` and `<` outside code are JSX, keep them in backticks. +- **`docs.json`** is the whole configuration: theme, Stone & Lime colors (primary `#3E5C00`, lime `#D8F04A` in dark mode), logo (`logo/`, copied from `design/logo/`), favicon, navbar (Trust, Status, GitHub) and navigation. A new page must be added to `navigation` or it does not show in the sidebar. +- **API reference:** the **Endpoints** tab is generated by Mintlify from `docs/openapi.json` on `main`, referenced by its raw GitHub URL. Mintlify refuses paths outside this folder (`../` is not allowed), and a copy here would drift from the one source the backend maintains. So an endpoint change shows on the site once it is on `main` and Mintlify rebuilds (any push that changes `apps/docs`, or a manual redeploy in the dashboard). Each endpoint has a playground that calls `servers` from the spec (the hosted API). `api-reference.mdx` is the prose page in the sidebar. +- **For agents, from Mintlify itself:** `/llms.txt`, `/llms-full.txt`, every page as Markdown at `.md`, `/skill.md` and a search MCP server at `/mcp`. Nothing to maintain here. +- **Deploys:** Mintlify's GitHub app watches `main`. Git settings in the Mintlify dashboard: repository `Hellonear-AI/hellonear`, branch `main`, "docs.json is in a subdirectory" on, path `/apps/docs`. Custom domain `docs.hellonear.xyz` is set in Mintlify's Domain setup; its `CNAME` in the `hellonear.xyz` Cloudflare zone (DNS only) is on the box owner's side (James), with Axel's approval. Pull requests get a Mintlify preview if the GitHub app is allowed to comment. +- The public repo `Hellonear-AI/docs` is Mintlify's onboarding starter, not used. ## Commands -```sh -bun install -bun run dev # http://localhost:3300 -bun run typecheck -bun run test # node:test: content, nav, links, llms, search, markdown, proxy, MCP -bun run build -``` - -Try the MCP server locally: +The Mintlify CLI is run with `bunx` at a pinned version (it needs Node 20.17+ and does not run on Node 25): ```sh -curl -s localhost:3300/mcp -H 'content-type: application/json' \ - -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_docs","arguments":{"query":"daily limit"}}}' +bunx mint@4.2.1184 dev --no-open --port 3333 # http://localhost:3333 +bunx mint@4.2.1184 validate +bunx mint@4.2.1184 broken-links --check-anchors ``` -## Deploy - -On **Vercel**, project `hellonear-docs` (created 13 Nov), deployed by Axel with the Vercel CLI from this folder. **Build locally and upload the result** (`vercel build --prod` then `vercel deploy --prebuilt --prod`): the content script copies `../../docs/openapi.json`, which a plain `vercel deploy` from this folder does not upload, so a remote build fails with ENOENT. Domains on the project: `docs.hellonear.xyz` and `trust.hellonear.xyz`, each a `CNAME` in the `hellonear.xyz` Cloudflare zone to the target Vercel gives (DNS only, not proxied). The DNS change is on the box owner's side (James), with Axel's approval. No env vars. +Never run `mint signup`, `mint deploy` or `mint claim`: the project already exists and deploys from Git. CI: `.github/workflows/docs.yml` runs `validate` and `broken-links --check-anchors`. diff --git a/apps/docs/content/agent-market.md b/apps/docs/agent-market.mdx similarity index 84% rename from apps/docs/content/agent-market.md rename to apps/docs/agent-market.mdx index dc4ad178..b1e013a1 100644 --- a/apps/docs/content/agent-market.md +++ b/apps/docs/agent-market.mdx @@ -1,6 +1,6 @@ --- -title: Hire on Agent Market -description: How a Mind searches the NEAR AI Agent Market, gets each agent's price for a job and recommends the cheapest within budget, without hiring. +title: "Hire on Agent Market" +description: "How a Mind searches the NEAR AI Agent Market, gets each agent's price for a job and recommends the cheapest within budget, without hiring." --- **Track:** `agents`. **Skill:** Hire on Agent Market (`agent-market`), in the General Assistant template. **Tools:** `market_search`, `market_quote`. diff --git a/apps/docs/content/agent.md b/apps/docs/agent.mdx similarity index 99% rename from apps/docs/content/agent.md rename to apps/docs/agent.mdx index 953bc3b7..ddfd1fca 100644 --- a/apps/docs/content/agent.md +++ b/apps/docs/agent.mdx @@ -1,6 +1,6 @@ --- -title: The agent -description: How each Mind runs on Mastra and NEAR AI Cloud: design, every tool, every skill, and how it is tested. +title: "The agent" +description: "How each Mind runs on Mastra and NEAR AI Cloud: design, every tool, every skill, and how it is tested." --- This is the core of HelloNear, and the part a judge can read end to end in `engine/`. diff --git a/apps/docs/content/api-reference.md b/apps/docs/api-reference.mdx similarity index 60% rename from apps/docs/content/api-reference.md rename to apps/docs/api-reference.mdx index ecc777d4..84f52c83 100644 --- a/apps/docs/content/api-reference.md +++ b/apps/docs/api-reference.mdx @@ -1,9 +1,9 @@ --- -title: API reference -description: Every route of the HelloNear backend API, rendered from the OpenAPI spec, with the hosted server at https://api.hellonear.xyz. +title: "API reference" +description: "How the HelloNear backend API is described: the OpenAPI spec, the server, auth, errors and streams. Every route is in the Endpoints tab." --- -The HelloNear backend API is described by an OpenAPI 3 spec, kept in the repository at [`docs/openapi.json`](https://github.com/Hellonear-AI/hellonear/blob/main/docs/openapi.json) and served here at [/openapi.json](/openapi.json). The prose contract, with every field and event, is [`docs/api-contract.md`](https://github.com/Hellonear-AI/hellonear/blob/main/docs/api-contract.md). +The HelloNear backend API is described by an OpenAPI 3 spec, kept in the repository at [`docs/openapi.json`](https://github.com/Hellonear-AI/hellonear/blob/main/docs/openapi.json) and rendered from it in the **Endpoints** tab of this site, where each route has a playground that can call the hosted API. The prose contract, with every field and event, is [`docs/api-contract.md`](https://github.com/Hellonear-AI/hellonear/blob/main/docs/api-contract.md). - **Server:** `https://api.hellonear.xyz` (NEAR testnet), or `http://localhost:4000` when you [run it locally](/run-locally). - **Auth:** every route except health, status and auth needs the session cookie `hn_session`. Get one as a guest with `POST /v1/auth/demo`, or sign in with a NEAR wallet (NEP-413). diff --git a/apps/docs/content/api.md b/apps/docs/api.mdx similarity index 98% rename from apps/docs/content/api.md rename to apps/docs/api.mdx index 36b62690..75fce77a 100644 --- a/apps/docs/content/api.md +++ b/apps/docs/api.mdx @@ -1,6 +1,6 @@ --- -title: API overview -description: How the public HTTP API works, every route, and where the OpenAPI spec lives. +title: "API overview" +description: "How the public HTTP API works, every route, and where the OpenAPI spec lives." --- The web app is a client of a public HTTP API, and everything it does can be done with `curl`. The full spec is **[`docs/openapi.json`](https://github.com/Hellonear-AI/hellonear/blob/main/docs/openapi.json)** (OpenAPI 3.1, 63 operations): open it in [Swagger Editor](https://editor.swagger.io/?url=https://raw.githubusercontent.com/Hellonear-AI/hellonear/main/docs/openapi.json) or any OpenAPI viewer to read every route and try it against the hosted API. Every server-sent event type is described in [`docs/api-contract.md`](https://github.com/Hellonear-AI/hellonear/blob/main/docs/api-contract.md) §3. diff --git a/apps/docs/app/(docs)/[[...slug]]/page.tsx b/apps/docs/app/(docs)/[[...slug]]/page.tsx deleted file mode 100644 index 1b6bcbbc..00000000 --- a/apps/docs/app/(docs)/[[...slug]]/page.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import type { Metadata } from "next"; -import Link from "next/link"; -import { notFound } from "next/navigation"; -import { getPage, markdownUrl, orderedSections, pages } from "@/lib/content"; -import { render } from "@/lib/markdown"; -import { REPO_URL } from "@/lib/site"; -import { NavList } from "../../_components/Sidebar"; -import { Swagger } from "../../_components/Swagger"; - -type Props = { params: Promise<{ slug?: string[] }> }; - -export const dynamicParams = false; - -export function generateStaticParams() { - return pages.filter((p) => !p.slug.startsWith("trust")).map((p) => ({ slug: p.slug ? p.slug.split("/") : [] })); -} - -async function pageOf(props: Props) { - const { slug } = await props.params; - const page = getPage((slug ?? []).join("/")); - if (!page || page.slug.startsWith("trust")) notFound(); - return page; -} - -export async function generateMetadata(props: Props): Promise { - const page = await pageOf(props); - return { - title: page.slug ? page.title : { absolute: "HelloNear Docs" }, - description: page.description, - alternates: { canonical: `/${page.slug}`, types: { "text/markdown": markdownUrl(page.slug) } }, - }; -} - -export default async function DocPage(props: Props) { - const page = await pageOf(props); - const flat = orderedSections().flatMap((s) => s.pages).filter((p) => !p.slug.startsWith("trust")); - const i = flat.findIndex((p) => p.slug === page.slug); - const prev = flat[i - 1]; - const next = flat[i + 1]; - return ( - - ); -} diff --git a/apps/docs/app/(docs)/layout.tsx b/apps/docs/app/(docs)/layout.tsx deleted file mode 100644 index b8e6e2fc..00000000 --- a/apps/docs/app/(docs)/layout.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import Link from "next/link"; -import { Brand } from "../_components/Brand"; -import { REPO_URL, STATUS_URL } from "@/lib/site"; - -export default function DocsLayout({ children }: { children: React.ReactNode }) { - return ( - <> -
- -
- Trust - Status - GitHub -
-
- {children} - - ); -} diff --git a/apps/docs/app/.well-known/mcp/route.ts b/apps/docs/app/.well-known/mcp/route.ts deleted file mode 100644 index cad812ba..00000000 --- a/apps/docs/app/.well-known/mcp/route.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { SERVER_INFO, TOOLS } from "@/lib/mcp"; -import { SITE_URL } from "@/lib/site"; - -export const dynamic = "force-static"; - -// Discovery for agents that look for an MCP server at a well-known path. -export const GET = () => - Response.json( - { - servers: [ - { - name: SERVER_INFO.name, - title: SERVER_INFO.title, - description: "Read-only search and reading of the HelloNear docs and Trust Center.", - url: `${SITE_URL}/mcp`, - transport: "streamable-http", - authentication: "none", - tools: TOOLS.map((t) => ({ name: t.name, description: t.description })), - }, - ], - }, - { headers: { "access-control-allow-origin": "*" } }, - ); diff --git a/apps/docs/app/_components/Brand.tsx b/apps/docs/app/_components/Brand.tsx deleted file mode 100644 index 522f0228..00000000 --- a/apps/docs/app/_components/Brand.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import Link from "next/link"; - -export function Brand({ href, label }: { href: string; label: string }) { - return ( - - {/* eslint-disable-next-line @next/next/no-img-element */} - - - HelloNear {label} - - - ); -} diff --git a/apps/docs/app/_components/Faq.tsx b/apps/docs/app/_components/Faq.tsx deleted file mode 100644 index ddc4599f..00000000 --- a/apps/docs/app/_components/Faq.tsx +++ /dev/null @@ -1,31 +0,0 @@ -"use client"; - -import { useEffect, useRef } from "react"; - -// Expand all / Collapse all for the FAQ's
, and open the one a #link points at. The answers are plain -//
, so they work without JavaScript. -export function FaqControls({ children }: { children: React.ReactNode }) { - const ref = useRef(null); - const setAll = (open: boolean) => ref.current?.querySelectorAll("details").forEach((d) => (d.open = open)); - useEffect(() => { - const openHash = () => { - const el = location.hash ? document.getElementById(decodeURIComponent(location.hash.slice(1))) : null; - if (el instanceof HTMLDetailsElement) { - el.open = true; - el.scrollIntoView({ block: "start" }); - } - }; - openHash(); - window.addEventListener("hashchange", openHash); - return () => window.removeEventListener("hashchange", openHash); - }, []); - return ( -
-
- - -
- {children} -
- ); -} diff --git a/apps/docs/app/_components/Sidebar.tsx b/apps/docs/app/_components/Sidebar.tsx deleted file mode 100644 index 890cd8a0..00000000 --- a/apps/docs/app/_components/Sidebar.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import Link from "next/link"; -import { orderedSections } from "@/lib/content"; - -// Server-rendered nav. On phones it sits inside a
menu, so it works without JavaScript. -export function NavList({ current }: { current: string }) { - return ( - - ); -} diff --git a/apps/docs/app/_components/Swagger.tsx b/apps/docs/app/_components/Swagger.tsx deleted file mode 100644 index 4d54f87f..00000000 --- a/apps/docs/app/_components/Swagger.tsx +++ /dev/null @@ -1,37 +0,0 @@ -"use client"; - -import Script from "next/script"; -import { useEffect, useRef, useState } from "react"; - -type SwaggerBundle = (options: Record) => unknown; -declare global { - interface Window { - SwaggerUIBundle?: SwaggerBundle; - } -} - -// Swagger UI only runs in the browser; the prose above it is server-rendered and readable without JavaScript. -// It loads swagger-ui-dist's prebuilt bundle from /swagger (copied by scripts/build-content.mjs), not through the -// bundler: Turbopack breaks swagger-ui-react's OpenAPI resolver, so an opened operation never finished loading. -export function Swagger({ url }: { url: string }) { - const node = useRef(null); - const [ready, setReady] = useState(false); - - useEffect(() => { - if (window.SwaggerUIBundle) setReady(true); - }, []); - - useEffect(() => { - if (!ready || !node.current || !window.SwaggerUIBundle) return; - window.SwaggerUIBundle({ url, domNode: node.current, docExpansion: "list", defaultModelsExpandDepth: 0, tryItOutEnabled: false }); - }, [ready, url]); - - return ( -
- -