- Chat mode: AIUI loads in sandboxed iframe at /dashboard/chat with transparent bg - Mode switcher: Easy + Pro tabs only, Chat is a launcher button - Keyboard shortcuts: Cmd+1 (Easy), Cmd+2 (Pro), Cmd+3 (Chat), Cmd+M (cycle) - Directional transitions: chat slides from/to left, dashboard from/to right - Context broker: postMessage protocol for quarantined AIUI communication - AI permissions store: user-controlled toggles for data access categories - Settings UI: AI Data Access section with per-category toggles - AIUI container manifest and nginx proxy config for /aiui/ - Deploy script builds AIUI with /aiui/ base path - Overnight loop infrastructure (loop.sh, prepare.sh, plan.md, prompt.md) - Security hooks for autonomous overnight runs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4.2 KiB
4.2 KiB
You are integrating AIUI (AI chat interface) into Archipelago (Archy) as its Chat mode. Read these files first:
loop/plan.md— Your task checklist (mark items- [x]as you complete them)CLAUDE.md— Archy project conventions, architecture, coding standards/Users/dorian/Projects/AIUI/CLAUDE.md— AIUI conventions and Archy integration rules
Architecture Overview
AIUI runs in an iframe at /dashboard/chat. Communication happens via window.postMessage() through a ContextBroker (Archy side) and archyBridge (AIUI side). AIUI is quarantined — it never directly accesses Archy APIs.
AIUI (iframe) ←→ postMessage ←→ ContextBroker (Archy) ←→ Pinia stores / RPC
Key Files — Archy Side
neode-ui/src/services/contextBroker.ts— Message handler, permission checks, data fetching/sanitizationneode-ui/src/types/aiui-protocol.ts— TypeScript types for postMessage protocolneode-ui/src/stores/aiPermissions.ts— User permission toggles (what AIUI can access)neode-ui/src/views/Chat.vue— Iframe container with close buttonneode-ui/src/views/Settings.vue— AI permissions UI sectionneode-ui/src/api/rpc-client.ts— Backend RPC endpointsneode-ui/src/api/container-client.ts— Container operationsneode-ui/src/stores/app.ts— Main app state (packages, server info, metrics)
Key Files — AIUI Side (read-only reference, AIUI agent handles these)
/Users/dorian/Projects/AIUI/packages/app/src/services/archyBridge.ts— AIUI's postMessage client/Users/dorian/Projects/AIUI/packages/app/src/composables/useArchy.ts— Vue composable wrapping archyBridge/Users/dorian/Projects/AIUI/packages/app/src/composables/contentExtraction.ts— Content tag extraction pipeline/Users/dorian/Projects/AIUI/packages/app/src/composables/useContentPanel.ts— Content panel state
Coordination with AIUI Agent
A separate Claude agent is working on the AIUI repo simultaneously. Your job is the Archy side only:
- Expand the ContextBroker to serve real data for all categories
- Add new context categories for media, search, and local AI
- Wire up real store/RPC data instead of placeholders
- Deploy and test on the live server at 192.168.1.228
- DO NOT edit files in /Users/dorian/Projects/AIUI/ — the other agent handles that
Content Handshake Protocol
AIUI's content pipeline uses [[tag:data]] syntax in AI responses to surface content. The AI needs context about what's available on the node to generate these tags. The handshake works like this:
- AIUI sends
context:requestwith category (e.g.,media,apps,files) - Archy's ContextBroker checks permissions, fetches from stores/RPC, sanitizes
- Returns data to AIUI which injects it into the AI's system prompt
- AI generates responses with appropriate
[[film:id]],[[song:id]]tags referencing actual library content - AIUI's content extraction pipeline renders the tagged content in panels
For each task in loop/plan.md:
- Find the first unchecked
- [ ]item - Read the task description carefully
- Read the relevant source files before making changes
- Implement following CLAUDE.md conventions (glass styling, TypeScript strict, etc.)
- Run
cd neode-ui && npm run type-check— fix all errors before continuing - Run
cd neode-ui && npm run build— must succeed - Deploy to live server:
./scripts/deploy-to-target.sh --live - Commit:
type: description(conventional commits) - Mark it done
- [x]inloop/plan.md - Move to the next unchecked task immediately
Rules
- Never skip a build/typecheck gate — if it fails, fix before moving on
- If a task is proving difficult, make at least 30 genuine attempts before moving on
- Always deploy after completing a task — changes must be live at 192.168.1.228
- Do NOT edit AIUI files — only Archy files
- Build AIUI when needed:
cd /Users/dorian/Projects/AIUI && rm -rf .turbo packages/app/.turbo packages/core/.turbo packages/app/dist packages/core/dist && VITE_BASE_PATH=/aiui/ pnpm build - Deploy AIUI dist:
sshpass -p 'EwPDR8q45l0Upx@' scp -o StrictHostKeyChecking=no -r /Users/dorian/Projects/AIUI/packages/app/dist/* archipelago@192.168.1.228:/opt/archipelago/aiui/ - Do not stop until all tasks are checked or you are rate limited