# AGENTS.md — lib

## Scope
This directory contains 40 files and 3 subdirectories.

This is a **shared utilities** directory. Each file exports helper functions.

## Key Files

| File | Purpose | Exports |
|------|---------|---------|
| secure-route.ts | Wraps a route handler with security midd... | SecureRouteHandler, withSec... |
| admin.ts | Exports: isAdminEmail | isAdminEmail |
| alerts.ts | alerts.ts — Webhook alerting for critica... | AlertSeverity, AlertPayload... |
| app-url.ts | Exports: APP_URL, buildAppUrl | APP_URL, buildAppUrl |
| auth.ts | Exports: authOptions | authOptions |
| builder-code.ts | Exports: wagmiConfig, walletClient | wagmiConfig, walletClient |
| csrf.ts | Exports: CSRFToken, generateCSRFToken, v... | CSRFToken, generateCSRFToke... |
| eas.ts | Verify an EAS attestation exists for a g... | EAS_CONTRACTS, HUMAN_VERIFI... |
| email.ts | Exports: sendEmail, sendWelcomeEmail, se... | sendEmail, sendWelcomeEmail... |
| gateway-proxy.ts | Gateway Proxy — calls OpenClaw gateway t... | invokeGatewayTool, gatewayH... |
| gateway-token.ts | Exports: readSharedGatewayToken | readSharedGatewayToken |
| getAuthSession.ts | Unified auth session helper. | getAuthSession |
| init-deep.ts | init-deep.ts — Hierarchical AGENTS.md ge... | InitDeepOptions, DirectoryC... |
| intent.ts | intent.ts — Intent Analysis System (Inte... | IntentAnalysis, analyzeInte... |
| node-wallet-monitor.ts | Exports: WalletStatus, getWalletMonitorC... | WalletStatus, getWalletMoni... |
| ... | *25 more files* | |

## Subdirectories

- **hashline/** — See hashline/AGENTS.md
- **orchestration/** — See orchestration/AGENTS.md
- **webauthx/** — See webauthx/AGENTS.md

## Conventions

- Use camelCase for utility files
- Use kebab-case for route/config files
- TypeScript-first: prefer .ts/.tsx over .js

## Key Dependencies

- Prisma
- Next.js
- Stripe
- React

---
*Generated by init-deep — 2026-04-04*