Dev Changelog โ 2026-04-27 (v0.1.0) โ
Added โ Lantern Chat (Admin AI Assistant) โ
A floating Claude-powered chat assistant for the admin portal. Soft-glow lantern bubble at bottom-right opens a slide-up panel. The assistant answers questions contextually and may, when it decides it's needed, read repo files (docs/code), grep the repo, list directories, list registered API services, or query a small allow-list of Firestore collections.
New Cloud Run service: services/api/assistant/ (port 8086) โ
POST /assistant/chatโ agentic Claude endpoint (admin-authed, rate-limited 30/5min/user)GET /health,GET /openapi.json,GET /api-docsโ public, follows the API service convention- Sandboxed tools (allow-list of repo prefixes, deny-list of secrets, 200 KB / 100-match / 200-entry caps)
- Default model
claude-sonnet-4-5(override viaASSISTANT_MODEL) - Stateless: full conversation passed each turn; server-side agentic loop runs until non-
tool_usestop
Admin UI โ
- New
<LanternChat />component (only rendered for admin users) - Floating amber bubble with
lantern-glowpulse animation; 420ร640 panel - Persists last 30 messages to
localStorage - Sends current page route as context every turn
- Markdown rendering, collapsible tool-call disclosures, AbortController-cancellable in-flight requests
Wiring โ
- Registered in
packages/shared/services/index.jsโ auto-appears in admin API Reference npm run assistant-api:dev,apis:dev,apis:kill,kill:portsupdated- VS Code extension
PORT_MAP+DEV_SERVER_SCRIPTSupdated - Vite proxy
/api/assistantโASSISTANT_API_ORIGIN - New env vars:
ANTHROPIC_API_KEY(required),ASSISTANT_API_ORIGIN,VITE_ASSISTANT_API_URL, optionalASSISTANT_MODEL/ASSISTANT_MAX_TOKENS
Verified โ
npm installclean- ESLint clean on all new code
- Boot smoke test:
/health,/openapi.json,/assistant/chat401 paths all pass npm run build -w apps/admingreen
Deferred โ
- Merchant-portal access (separate system prompt + tighter tool allow-list)
- Deploy script must populate
repo-snapshot/beforegcloud run deploy(sanitized copy of the repo, no secrets / node_modules / build artifacts) - Real-API smoke test pending an
ANTHROPIC_API_KEYin dev env
Files โ
See docs/worklog/2026-04-27_ADMIN_AI_ASSISTANT_COMPLETE.md for the full file list and architecture notes.