tools/check-eligibility.ts registers as check-eligibility, and widgets/select-plan/ registers as select-plan. Nothing has to be listed in a registry, so no widget can sit defined and unwired.
The app folder imports
@waniwani/kit, plus @waniwani/sdk when it uses flows, and nothing else. Skybridge, transports and build configuration all stay outside it.
Each folder in depth
App config
waniwani.config.ts: name, title, the overview the host reads at connect, search and tracking options.Tools
One file per tool, with Zod shapes for input and output.
Widgets
Why a widget is two files, and the hooks
ui.tsx gets.Flows
A compiled SDK flow, default-exported and registered as is.
Endpoints
api/ for the widget’s own server calls, well-known/ for the root of the domain.Styling
Tailwind utilities in
ui.tsx, with the tokens coming from the template’s stylesheet.What lives outside the folder
.waniwani/ is build output, the way .next/ is. Every command regenerates it and it stays out of git. Your .env and .env.local sit next to waniwani.config.ts and are read before any command runs; see Deploy.