惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
量子位
Recent Announcements
Recent Announcements
T
The Blog of Author Tim Ferriss
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
V
Visual Studio Blog
博客园 - 聂微东
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
U
Unit 42
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
L
LangChain Blog

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders
GitHub - fellwork/aihu: Durable Web Components your AI ag...
srmcguirt · 2026-06-18 · via Hacker News - Newest: "AI"

Aihu — agentic discovery and interaction, for human purpose.

Say EYE-hoo · 爱护 (àihù) · "to cherish and protect."

Aihu builds durable Web Components your AI agent can read and drive — not disposable UI it has to generate. An agent inspects a real component through its llms.txt + MCP manifest and calls its actions on the live, on-screen instance. The thing the user sees is the thing the agent drives, not a throwaway interface regenerated every turn.

An AI agent relabeling, restyling, and adding tasks to a live aihu component over a scoped capability bridge — and the state surviving a page refresh

npx create-aihu my-app --template agent   # a durable component an AI can drive — running in one command

You author .aihu single-file components; a Rust compiler emits standards-based Web Components plus the machine-readable agent manifest — no separate API layer to build.

Generative UI vs. durable components. Most "agent UI" today is disposable: the model emits HTML or JSON that renders once and vanishes (MCP Apps, generated iframes). Aihu is the inverse — real, inspectable, reusable custom elements an agent drives over a server-mediated capability bridge, with the server holding auth and policy. Durable wins when the UI has to be trusted, styled, and reused.

Under the hood it's a complete meta-framework — routing, SSR, auth, data loading, and cloud adapters included. The runtime is sub-2 kB, output is vanilla custom elements (no lock-in, no hydration step), with zero runtime dependencies, and reactive updates run 122× faster than vanilla DOM on targeted writes (benchmarks below).

Status: actively developed and shipping in v1.0.x releases — the reactive runtime, compiler, router, server, agent surface, CLI, styling engine, and UI primitives all work today. See Project status.

CI release @aihu/signals on npm tests packages llms.txt MCP Agent Ready


Quickstart

# The agent showcase — a durable <task-list> a human AND an AI agent drive
npx create-aihu my-app --template agent
cd my-app && bun install
bun run dev      # component on http://localhost:5108 · agent bridge on :5208

# …or a minimal app
npx create-aihu my-app

# …or run the canonical examples portfolio in parallel
git clone https://github.com/fellwork/aihu
cd aihu && bun install
bun run dev:examples

For an SFC tour, see examples/live-counter/ (~40 LOC) or jump to the example portfolio.


What it is

You write a component in a single .aihu file — markup, state, styles, and (optionally) its agent interface, all in one place. The compiler turns it into a plain custom element that runs anywhere Web Components run. What you get:

  • A tiny reactive core — signals, computeds, and effects in under 2 kB, with direct DOM updates and no virtual DOM (@aihu/signals + @aihu/arbor).
  • A real Rust compiler — pre-built per platform, plus a WebAssembly build for in-browser playgrounds.
  • Agent-callable by default — declare a component's @agent interface and the compiler emits a matching AI tool schema (MCP), alongside A2A and ACP protocol support.
  • A complete app framework — file-based routing, server-side rendering, loaders, cookies, and server actions (@aihu/router + @aihu/server).
  • Batteries included — auth, data loading, context, a plugin system, and accessible UI primitives — all dependency-free.
  • Deploy anywhere — first-party Cloudflare and Vercel adapters.
  • A real toolchain — a CLI for scaffolding and builds (aihu app/page/component/plugin/dev/build) and a VS Code extension.

The output is plain custom elements: nothing locks you in at the consumer boundary, there's no global runtime and no hydration step — and every component is, by construction, callable by an AI agent.

How it compares

Most component libraries give you a way to build components. Aihu gives you a way to build apps — routing, server-side rendering, data, and deployment are first-class, not add-ons.

Aihu is to Lit what Next.js is to React: a full app framework built on a small Web Components runtime. Solid is a single reactive package; Lit is templating plus a base class; Vue ships its own scheduler and virtual DOM. Aihu layers cleanly — use just the signals, just the runtime, or the whole framework — and it's the only one where every component is also an AI-callable tool, built into the file format itself.


Features

Reactive runtime

  • Push-based signals, computeds, and effects with batched writes (@aihu/signals, ~1.8 kB gz)
  • Direct DOM updates, no virtual DOM (@aihu/arbor, ~2.1 kB gz — 122× faster than vanilla on targeted updates)
  • Synchronous mount with predictable teardown
  • Compiled components register as standard custom elements (@aihu/runtime)

Compiler & toolchain

  • Rust-native compiler — reads .aihu files and emits standard custom-element classes
  • Pre-built binaries for Linux, macOS, Windows, and ARM64 Linux (SHA256-verified), via npm install @aihu/compiler
  • WebAssembly build for in-browser playgrounds (target: under 200 ms to compile a 50-line component)
  • Scoped styles, slots, list/conditional rendering, type-checked templates, error boundaries, hot reload, islands, and full hydration

AI-agent surface (built in)

  • An @agent block declares a component's exposed state and actions; the compiler emits a matching MCP tool schema next to the Web Component
  • A2A and ACP agent protocols included (@aihu/agent-a2a, @aihu/agent-acp)
  • Auto-generates llms.txt, an MCP Server Card, and robots.txt for any app — no manual config (@aihu-plugin/agent-readiness)

Full-stack capabilities

  • File-based routing with nested routes and layouts (@aihu/router)
  • Server-side rendering, streaming, loaders, cookies, and hydration (@aihu/server)
  • Request-scoped context plus a reactive data/loader layer (@aihu/context, @aihu-plugin/data)
  • Accessible UI primitives — guards, live regions, focus traps, links, and outlets
  • Cloud adapters for Cloudflare and Vercel

Developer experience

  • aihu CLI for scaffolding and builds (app / page / component / plugin / dev / build)
  • VS Code extension — syntax highlighting today, full language server in progress
  • An example portfolio you can run in parallel with bun run dev:examples
  • Built on Bun, Rolldown, Biome, and Vitest

Standards & compliance

  • llms.txt — every app is discoverable by AI tools out of the box
  • MCP — Model Context Protocol compatible (Server Card, tool schemas, resources)
  • Agent-ready — every component an app ships has an agent interface
  • Accessibility — WCAG-oriented primitives (live regions, focus traps, skip links)

Project status

Aihu is under active development and ships in v1.0.x releases. The reactive runtime, compiler, router, server, agent surface, CLI, styling engine (@aihu/css-engine — a Tailwind v4-style utility engine with scoped, zero-browser-byte output), and accessible UI primitives (@aihu/primitives — dialog, tooltip, button, and more) all work today. The v1.0.0 milestone tag is held for one remaining piece:

  • Rich-text / markdown support, shipping as a plugin.

A copy-paste UI registry built on the engine is also in progress.

Packages version independently (most are in the 0.x range during early access), so you can adopt any piece on its own. Aihu is dependency-free at runtime — every browser-shipped package has an empty dependencies list. It's a research-driven codebase: each layer is pinned by a written spec before code lands, and performance regressions block merges.

Migrating between grammar versions is mechanical — run npx aihu migrate <file>, and compiler errors point you at the exact fix. See docs/cli.md for the migration reference.


Performance

All results from bench/. Measured with mitata + Bun 1.3.8. p50 latencies shown. Full tables in bench/signals/RESULTS.md and bench/arbor/RESULTS.md.

@aihu/signals vs SOTA reactive libraries

Source: bench/signals/RESULTS.md. p50 latency shown for each competitor.

Workload @aihu/signals alien-signals @preact/signals-core @vue/reactivity solid-js s-js
cellx 807.33 ns 1.21 µs 1.14 µs 1.69 µs 2.97 µs 1.40 µs
batched-writes-100 5.07 µs 8.10 µs 7.20 µs 15.43 µs 12.80 µs 5.75 µs
dynamic-deps 1.09 µs 2.78 µs 1.78 µs 7.08 µs 1.93 µs 1.33 µs
creation-1to1000 69.02 µs 90.01 µs 64.53 µs 92.97 µs 139.98 µs 107.53 µs
deep-propagation-100 3.25 µs 3.97 µs 3.87 µs 7.34 µs 11.86 µs 4.12 µs

@aihu/arbor vs SOTA DOM-binding libraries

Source: bench/arbor/RESULTS.md. JSDOM workloads, p50 latency.

Workload @aihu/arbor lit-html solid-js @vue/runtime-dom preact vanilla
mount-10k-leaves 49.04 ms 8.21 s 107.10 ms 139.42 ms
mount-deep-100x10 4.32 ms 82.33 ms 12.32 ms 28.92 ms
mount-wide-1000 12.69 ms 92.01 ms 14.78 ms 17.38 ms
update-1-of-10k-leaves 28.63 ns 743.62 µs 2.33 ms 4.36 µs
krausest-1k-cycle 31.16 ms 114.20 ms 30.71 ms 25.17 ms

Auto-generated — run bun scripts/sync-readme.ts to update.

The update-1-of-10k-leaves 122× win comes from arbor's leaf() binding to textNode.nodeValue (direct property set) vs. vanilla's element.textContent (child-list walk). This is not a measurement artifact — it reflects the bind-target choice in materialize.ts.

solid-js and @vue/runtime-dom ERROR in all JSDOM workloads (client-only API / SVGElement not defined). Browser-native comparison deferred to Round N+2 Playwright runner.

Bundle size (gz)

Per-package gates enforced by bun run size:

Package Size (gz) Limit Status
@aihu/context 300 B no dist
@aihu/signals 1970 B no dist
@aihu/arbor 2800 B no dist
@aihu/runtime 3900 B no dist
@aihu/agent 200 B no dist
@aihu-plugin/data 800 B no dist
@aihu-plugin/kindly-note 1850 B no dist
@aihu/router 2400 B no dist
@aihu/agent-service 1400 B no dist
@aihu/agent-acp 600 B no dist
@aihu/agent-a2a 750 B no dist
@aihu/app 1750 B no dist
@aihu/css-engine/runtime/cn 1 KB no dist
@aihu/css-engine/runtime/progressive 3 KB no dist
@aihu/primitives/context 1 KB no dist
@aihu/primitives/presence-gate 4 KB no dist
@aihu/primitives/form-control 4 KB no dist
@aihu/primitives/config-provider 4 KB no dist
@aihu/primitives/roving-focus 4 KB no dist
@aihu/primitives/collection 4 KB no dist
@aihu/primitives/dialog 4 KB no dist
@aihu/primitives/tooltip 4 KB no dist
@aihu/primitives/button 4 KB no dist
@aihu/primitives/separator 4 KB no dist
@aihu/primitives/label 4 KB no dist
@aihu/primitives/input 4 KB no dist
@aihu/primitives/textarea 4 KB no dist
@aihu/primitives/checkbox 4 KB no dist
@aihu/primitives/switch 4 KB no dist
@aihu/primitives/radio-group 4 KB no dist
@aihu/auth 1.5 KB no dist
@aihu/magna 1.8 KB no dist
@aihu/magna/codegen 1.2 KB no dist

Auto-generated — run bun scripts/sync-readme.ts to update.

Per-package rows are the contract; combined is reported, not budgeted. The pre-v1 "≤ 3.46 kB combined" target was retired at v1 cutover (Plan 7.1) — packages grew to support hydration, islands, error boundaries, and reconciliation. Each row in .size-limit.json is the binding gate. See .size-limit.README.md.


Layout

Publish status: packages publish independently at 0.x early-access (see Project status). A few internal packages stay private until their designs settle.

See packages/ for all packages on disk. By tier:

  • Browser runtime (sized, ships to client): @aihu/signals, @aihu/arbor, @aihu/runtime, @aihu/context, @aihu/agent.
  • Server / edge / data (sized): @aihu/router, @aihu-plugin/data, @aihu/agent-service, @aihu/agent-acp, @aihu/agent-a2a. Plus @aihu/server (SSR + back-compat router alias), @aihu-plugin/agent-readiness (llms.txt, MCP Server Card, robots, Vite plugin), @aihu/app (top-level integration).
  • Cloud adapters (in-tree): @aihu/adapter-cloudflare, @aihu/adapter-vercel.
  • Build-time only (not shipped): @aihu/compiler (Rust SFC compiler), @aihu/cli (aihu app, aihu dev, aihu build), @aihu/plugin (plugin contract types).
  • Editor: vscode-aihu (TextMate grammar + snippets; Volar LSP in M2).

Packages

Package Version Description
@aihu-plugin/agent-readiness 2.0.4 Discovery + readiness manifest emitter so agents can introspect aihu apps.
@aihu-plugin/data 2.0.1 Reactive data loaders and resource primitives for aihu.
@aihu-plugin/drizzle 0.1.1 Drizzle ORM data adapter for aihu — typed createResource fetchers and defineLoader helpers (Postgres / SQLite / libSQL).
@aihu-plugin/kindly-note 0.2.1 Runtime syntax highlighting + markdown rendering for aihu — / custom elements + signal-aware highlight()/renderMarkdown() helpers, powered by published @kindly-note/* packages with lazy loading.
@aihu/adapter-cloudflare 4.0.2 Cloudflare Workers/Pages deployment adapter for @aihu/app.
@aihu/adapter-vercel 4.0.2 Vercel deployment adapter for @aihu/app.
@aihu/agent 0.1.0 Agent primitives — the foundation of aihu agent-readiness.
@aihu/agent-a2a 0.1.2 A2A (Agent-to-Agent) protocol bindings for @aihu/agent-service.
@aihu/agent-acp 0.1.2 ACP (Agent Control Protocol) bindings for @aihu/agent-service.
@aihu/agent-readiness 2.0.2 [MOVED] This package has moved to @aihu-plugin/agent-readiness.
@aihu/agent-server 0.3.0 Server-side glue: mount an aihu component server-side and let an MCP client drive it through the agent-service live-dispatch gate, forwarding approved invocations to a browser bridge.
@aihu/agent-service 0.2.0 Service-side agent runtime (server-hosted agent endpoints).
@aihu/ai 0.1.0 Thin adapters from AI SDK stream types to ReadableStream for aihu $stream collections.
@aihu/app 3.0.2 Top-level app integration — wires runtime, router, and adapters into a Vite app.
@aihu/arbor 1.0.0 Reactive component tree (the rendering layer that consumes @aihu/signals).
@aihu/auth 1.0.0 JWT scope checks, ScopeSignal, and server middleware for aihu auth.
@aihu/cli 0.8.2 Aihu CLI (aihu, create-aihu) — scaffolding, dev, build commands.
@aihu/compiler 0.9.9 Single File Component (.aihu) compiler — Rust binary + JS glue.
@aihu/context 0.1.0 Async-context-friendly request/SSR context primitives for aihu.
@aihu/css-engine 0.4.3 aihu CSS engine — Tailwind v4 hard fork with WC-native scoped output.
@aihu/data 2.0.1 [MOVED] This package has moved to @aihu-plugin/data.
@aihu/language-server 0.2.16 Cross-editor Language Server (aihu-language-server) for .aihu Single File Components — diagnostics, hover, completion, and quick-fix code actions.
@aihu/magna 0.2.1 aihu bridge for Magna GraphQL — dep-free fetch, resource composition, JWT relay
@aihu/mcp 0.1.0 MCP server for aihu — exposes aihu_example and aihu_validate tools via stdio transport.
@aihu/plugin 0.1.0 Plugin substrate shared by @aihu/server and the meta-framework — runtime hook surface.
@aihu/plugin-demo 0.1.1 Canonical proof-of-life for the @aihu/plugin API — exercises macros, middleware, and transforms.
@aihu/primitives 0.1.0 aihu headless behavior primitives — WAI-ARIA APG patterns as vanilla custom elements, zero CSS.
@aihu/router 0.2.2 File-based router for the aihu meta-framework.
@aihu/runtime 1.1.0 Single File Component (.aihu) runtime — registers custom elements compiled by @aihu/compiler.
@aihu/scraping 0.1.0 O(1) sliding-window rate limiter and bot-detection middleware for aihu agent services.
@aihu/seo 0.2.1 aihu SEO plugin: sitemap.xml, robots.txt, llms.txt, JSON-LD injection via afterParse hook.
@aihu/server 0.2.1 Server runtime + native renderer (napi-rs) for aihu SSR.
@aihu/signals 0.2.0 Tiny reactive signals — the reactive primitive at the core of aihu.
@aihu/templates-cf-team 3.0.1 Cloudflare Workers + monorepo (bun workspaces + moon) team template for Aihu
@aihu/ui 0.1.0 aihu styled-recipe registry — copy-paste .aihu recipes distributed as source via aihu add (no runtime bundle).
create-aihu 0.1.3 Scaffold a new Aihu app — the npm create aihu / npx create-aihu entry point. Thin delegator to @aihu/cli.
vscode-aihu 1.0.0 Syntax highlighting, snippets, and language support for .aihu Single File Components

Auto-generated — run bun scripts/sync-readme.ts to update.


Examples

13-example portfolio under examples/. Six are M1-polished with full @agent surfaces, dark-mode tokens, and smoke tests:

# Folder What it teaches Port
01 agent-driven-demo/ An external agent reads a component's metadata and drives the real, visible component instance over a real WebSocket — gated server-s... 5108
02 agent-hub/ no README 5107
03 auth-magna-seo/ A server-only worked example that proves the 3-package integration contract@aihu/auth + @aihu/magna + @aihu/seo — using **on...
04 blog-loader/ A server-rendered post page demonstrating aihu's loader pattern, @aihu/context as a parallel data channel, and an @agent block for ag...
05 blog-router/ A 3-page blog demonstrating aihu's file-based routing.
06 cf-adapter/ no README 5110
07 color-theme/ $reactive(...) in @style plus $global { } to propagate tokens beyond component scope — and $media macro for responsive breakpoint... 5105
08 css-engine-demo/ Demonstrates all three browser-facing surfaces of the published @aihu/css-engine package: 5114
09 css-engine-utility/ When @aihu/css-engine is installed (as a dependency or peer), the compiler plugin that viteAihuPlugin composes will: 5118
10 css-pluggability/ A worked example showing how to plug Tailwind CSS into a aihu app, plus documented swap paths to UnoCSS, Pico CSS, and **vani...
11 currency-converter/ the second @agent flagship, with enum-typed inputs. Demonstrates how a TypeScript union type (`'USD' 'EUR'
12 hacker-news/ A aihu port of the canonical Hacker News reader. Hits the live HN API. M1 polish: dark-mode token pass, @agent block on the index page,... 5108
13 layouts/ Runtime layout rendering + dynamic layout switching.
14 live-counter/ the smallest possible aihu component — state, event handlers, a reactive text node, and an agent surface, in one file. 5101
15 plugin-demo/ no README 5111
16 primitives-showcase/ Wires three WAI-ARIA APG patterns from the published @aihu/primitives package — each a vanilla custom elem... 5115
17 realtime-scores/ Live score board demonstrating WebSocket-driven signal updates, $lifecycle.mount/dispose, and createResource from @aihu-plugin/data... 5112
18 storefront/ no README 5113
19 temperature-converter/ two-way binding plus a computed-derived counterpart (7GUIs #2), and an agent surface that lets AI tools read and write the temperature on... 5102
20 timer/ lifecycle hooks, reactive derivations, and an agent surface that lets AI monitor timer progress and trigger resets on the human's behalf ... 5103
21 todo-mvc/ the canonical TodoMVC — list reactivity, filtering, computed derivations, keyed iteration, localStorage persistence, and an agent surface... 5104
22 weather-card/ the aihu-unique @agent block. Every signal you $expose becomes an MCP resource; every action you $action becomes an MCP tool. The s... 5106

Auto-generated — run bun scripts/sync-readme.ts to update.

Run all polished examples in parallel:


Toolchain

  • Runtime: Bun ≥ 1.3.0, Node ≥ 20.18.0. Both required (engines enforced).
  • Bundler: Rolldown — Rust-based, OXC ecosystem.
  • Test: Vitest + jsdom + fast-check (property tests).
  • Lint/format: Biome.
  • Task runner: Moonmoon run :build, moon run :typecheck.
  • Size budget: size-limit gates per-package gzipped bundles.
  • Tool versions: pinned via proto (.prototools).

Workspace dev loop

bun install
bun run build      # build all packages
bun run test       # TS + Rust suites (unit + integration + compliance)
bun run size       # per-package gzipped bundle gates
bun run check      # biome lint + format
bash scripts/check-boundary.sh   # AC-7: hard boundary (no client imports in server layer)
bash scripts/check-edge-safe.sh  # AC-6: no Node-only globals in dist bundles
bun run test:quality              # Lighthouse gate (≥ 90 on perf/a11y/best-practices/seo)

Run the bench suites:

cd bench/signals && bun src/runner.ts   # signals vs SOTA
cd bench/arbor   && bun src/runner.ts   # arbor vs SOTA (JSDOM)

Use the packages directly:

import { signal, computed, effect } from '@aihu/signals'
import { branch, leaf, mount } from '@aihu/arbor'
import { defineComponent } from '@aihu/runtime'
import { registerAgentMetadata } from '@aihu/agent'

const [count, setCount] = signal(0)
const tree = branch('div', null, [leaf([count, setCount])])
const scope = mount(tree, document.body)
setCount(1) // DOM updates synchronously via nodeValue
scope.dispose()

Edge / server (fetch-API, works on Cloudflare Workers, Deno, Bun) — request-router shape from @aihu/server. Two distinct routing APIs ship in aihu: @aihu/server.createRequestRouter builds a fetch-API request handler from an explicit route manifest (shown below), while @aihu/router.createRouter powers file-based routing via the v1 Vite plugin (viteRouterPlugin); see docs/site/routing-layouts.md.

import { createRequestRouter, defineRoute, json } from '@aihu/server'
import { createAgentReadinessRoutes } from '@aihu-plugin/agent-readiness'

const ar = createAgentReadinessRoutes({
  name: 'My App',
  endpoint: 'https://myapp.workers.dev/mcp',
  summary: 'A aihu-powered app.',
})

const router = createRequestRouter({
  routes: [
    defineRoute('/llms.txt', ar.llmsTxt),
    defineRoute('/.well-known/mcp/server-card.json', ar.mcpServerCard),
    defineRoute('/robots.txt', ar.robotsTxt),
    defineRoute('/api/hello', () => json({ hello: 'world' })),
  ],
})

// Cloudflare Worker
export default { fetch: router }
// Deno / Bun
// Deno.serve(router)  |  Bun.serve({ fetch: router })

Compliance

The agent-protocol badges are backed by real test gates in bun run test.

Gate Tests Status
llms.txt format (llmstxt.org spec) 9 tests in packages/plugin-agent-readiness/tests/compliance/llms-txt-spec.test.ts passing
MCP Server Card schema (SEP-1649) 14 tests in packages/plugin-agent-readiness/tests/compliance/mcp-server-card-schema.test.ts passing
robots.txt RFC 9309 7 tests in packages/plugin-agent-readiness/tests/compliance/robots-rfc9309.test.ts passing
isitagentready.com endpoint checklist 7 tests in packages/plugin-agent-readiness/tests/compliance/isitagentready.test.ts passing
SSR output structural checks 12 tests in packages/server/tests/compliance/ssr-output.test.ts passing
Lighthouse quality gate (≥ 90 all categories) bun run test:quality via scripts/lighthouse.ts passing

Run all compliance checks: bun run test && bun run test:quality


Reference

  • User guidedocs/site/: introduction, installation, getting started, authoring components, authoring agents, reactivity, SSR + hydration, routing + layouts, data fetching, deployment, API reference, and plugins.
  • CLI referencedocs/cli.md: create-aihu, aihu app / page / component / dev / build, and aihu migrate.
  • ContributingCONTRIBUTING.md: fork, branch, conventional commits, changesets, and the dependency-free thesis.
  • Releasingdocs/RELEASING.md: changeset workflow, release PR, npm publish pipeline.
  • Benchmarksbench/signals/ and bench/arbor/: harness + full results.

License

MIT