125 Commits

Author SHA1 Message Date
Dorian
255d0c2a78 chore: rebuild AIUI dist + add TMDB/API catch-all stubs for demo
- Rebuild AIUI with latest changes (haiku model fix, recipe panel, image fallbacks)
- Add /api/tmdb/* stub returning empty results
- Add /api/* catch-all returning JSON 404 (prevents HTML fallback errors)
- Improve Claude proxy error messages (include err.code fallback)
- Strip film images from dist to keep under 5MB

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:58:08 +00:00
Dorian
fabc7c78f7 fix: add web search stub and API catch-all for demo deployment
- Add /api/web-search stub returning empty results in demo mode
- Add /aiui/api/* catch-all returning JSON 404 instead of HTML fallback
- Fix nginx proxy to catch all /api/ routes (not just /aiui/api/web-search)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:24:27 +00:00
Dorian
87602f7887 fix: add max_tokens default and mock web-search endpoint for demo
- Inject max_tokens: 4096 in Claude API proxy when AIUI omits it
- Add /aiui/api/web-search stub returning empty results (no search backend in demo)
- Add nginx proxy rule for web-search endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:22:30 +00:00
Dorian
f8e5e947ec fix: route Claude API through backend instead of nginx envsubst
- Add Claude API proxy in mock-backend.js (reads ANTHROPIC_API_KEY from env)
- Supports SSE streaming via pipe
- Move ANTHROPIC_API_KEY to backend service in docker-compose.demo.yml
- Remove envsubst from entrypoint (no longer needed)
- nginx-demo.conf proxies /aiui/api/claude/ to backend

This fixes the 401 error when Portainer doesn't pass env vars to
nginx correctly — the Node.js backend reads process.env directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 23:07:38 +00:00
Dorian
08eb3b61e0 feat: add mock FileBrowser API and WebSocket fixes for demo
- Mock FileBrowser endpoints: login, list directories, read text files
- Demo content: Music (17 tracks), Documents, Photos, Videos
- Proxy /app/filebrowser/ to backend in nginx-demo.conf
- Add node-messages-received RPC stub (stops console errors)
- WebSocket heartbeat every 45s (prevents 60s disconnect loop)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:50:05 +00:00
Dorian
95a3687f0a fix: add missing RPC methods and WebSocket heartbeat to mock backend
- Add node-messages-received, node.messages, node.notifications stubs
- Send WebSocket heartbeat every 45s to prevent client disconnect at 60s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:36:45 +00:00
Dorian
b62635874f chore: rebuild AIUI dist with latest changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:20:51 +00:00
Dorian
39cf5f2a2b feat: update AIUI dist (guide as default route) + fix marketplace heading clip
- Rebuild AIUI with guide page as default route (/ -> guide, /chat -> chat)
- Content and context panels start empty
- Fix App Store heading clipped by removing double md:-mt-4 negative margins

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 21:49:08 +00:00
Dorian
35be32711f fix: quote API key header in nginx-demo.conf to prevent empty-value crash
- Wrap ${ANTHROPIC_API_KEY} in quotes so envsubst produces valid nginx
  directive even when the variable is empty
- Skip Docker container polling when runtime is unavailable (stops
  log spam in demo/Portainer deployments)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:53:02 +00:00
Dorian
a576b92ef6 fix: use SSH key auth and skip AIUI rebuild in deploy script
- Switch from sshpass to SSH key (~/.ssh/archipelago-deploy)
- Use pre-built AIUI dist instead of rebuilding on every deploy
- Removes password-based auth dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:16:14 +00:00
Dorian
3613ca9325 fix: revert nginx.conf to non-demo config, finalize demo compose
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 20:02:53 +00:00
Dorian
1427dd47a3 feat: demo deployment with AIUI chat, SSH key auth, Quick Start fix
- Add AIUI pre-built dist to demo/ for Portainer deployment
- Add nginx-demo.conf with Claude API proxy (envsubst for API key)
- Add docker-entrypoint.sh for runtime API key injection
- Update Dockerfile.web to include AIUI and Claude proxy
- Update docker-compose.demo.yml with ANTHROPIC_API_KEY env var
- Switch deploy script from sshpass to SSH key auth
- Fix Quick Start Goals animating before other cards (stagger 5, opacity guard)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:52:33 +00:00
Dorian
5f51194e12 chore: gitignore loop artifacts and mark ISO-001 complete
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:08:38 +00:00
Dorian
5ae8708ff5 fix: correct app icon paths and add missing icons
- Fix 9 wrong/placeholder icon paths in backend (docker_packages.rs)
- Vaultwarden, Jellyfin, PhotoPrism, Immich: placeholder → correct icons
- Grafana, Morphos, Ollama, Penpot: wrong directory → app-icons/
- InDeeHub: external URL → local icon (CSP-safe)
- Add Tor app metadata entry with new icon
- Fix InDeeHub icon in Marketplace.vue

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 18:05:25 +00:00
Dorian
589adb8b18 fix: alpha release hardening — onboarding, security, and ISO build
- Convert "Choose Your Path" screen to informative (read-only cards)
- Harden "Choose Your Setup" (gray out Coming Soon options, auto-select Fresh Start)
- Auto-fetch DID on mount with retry and auto-advance after success
- Improve backup download for mobile compatibility
- Add retry logic to verify step with graceful skip option
- Route verify → done → login for complete onboarding flow
- Add AIUI install confirmation via custom event (SEC-001)
- Add file path whitelist for AIUI file access (SEC-002)
- Add log redaction for container logs sent to AIUI (SEC-003)
- Add Secure flag to session cookie in production (SEC-004)
- Fix ISO build script to handle zstd compression errors gracefully
- Sync archipelago.service from live server

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 13:00:28 +00:00
Dorian
e55fd3baf0 feat: add TOTP 2FA, API key switcher, login progress bar, and alpha hardening plan
- TOTP 2FA: full setup/confirm/disable/login flow with Argon2id + ChaCha20-Poly1305
  encrypted secret storage, QR code generation, and bcrypt-hashed backup codes
- API key switcher: OAuth vs personal API key toggle in AIUI chat settings with
  status indicator, key validation, and help text
- Login progress bar: server startup detection with health check polling, form
  disabled until server is ready
- AI quarantine docs: comprehensive HTML page documenting all 6 security layers
- Settings: AI Data Access permission toggles with per-category control
- Alpha hardening plan: 28-task overnight automation plan across 7 phases
  (onboarding, login, app install, AIUI, UI polish, security, ISO build)
- Backlog: node discovery spatial map feature for alpha demo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:23:57 +00:00
Dorian
0b3c23ff76 chore: add pentest-fix prompt and wire verification into loop.sh
- loop/prompt-pentest-fix.md: dedicated prompt for pentest fix overnight
  runs, instructs Claude to run verify-pentest-fixes.sh as final step
- loop/loop.sh: automatically runs verification script when all plan
  tasks are complete (runs for any plan, not just pentest)

Usage: PROMPT_FILE=loop/prompt-pentest-fix.md caffeinate -i ./loop/loop.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 03:53:36 +00:00
Dorian
5feb4ce799 chore: add pentest verification script and wire into overnight loop
- scripts/verify-pentest-fixes.sh: 26-check automated verification
  that tests all 21 pentest findings against the live server
- loop/plan.md: add permanent post-fix verification section
- scripts/overnight-loop.sh: accept plan file arg, run verification
  after all fixes complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 03:50:50 +00:00
Dorian
6656d2f1d9 fix: implement 22 security pentest remediation fixes
Server-side session management with SHA-256 hashed tokens and HttpOnly
cookies. Auth middleware gating all RPC/WS/proxy routes with method
allowlist. Login rate limiting (5/60s per IP). CORS restricted to
config origin. Docker registry allowlist. App ID and path validation.
P2P message sanitization (HTML + log injection). Onion address and
known-peer validation. Nginx security headers (CSP, X-Frame-Options,
etc.) and AIUI proxy auth. Systemd hardening (non-root, NoNewPrivileges,
ProtectSystem).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 03:26:56 +00:00
Dorian
6623dbc4ab chore: add security pentest reports and remediation plan
Overnight pentest run produced recon, analysis, exploitation reports,
and a full security assessment. Plan.md updated with 22 prioritized
fix items for auth, SSRF, injection, XSS, and hardening.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 03:08:14 +00:00
Dorian
0837b24a4b fix: replace Enable All text buttons with toggle card in AI Data Access
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 01:11:06 +00:00
Dorian
2818fe90fc fix: overhaul PWA icons with v2 suffix to bust all cache layers
- Redesign favicon SVG with gradient border matching splash screen
- Rename all icon files with -v2 suffix to bypass browser/SW/PWA caches
- Delete 9 old/duplicate icon files (~13MB removed)
- Add nginx cache-control headers for icons and manifest
- Rename assets-cache to assets-cache-v2 to orphan stale SW cache
- Update all HTML, manifest, and component icon references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 01:11:00 +00:00
Dorian
dfb81c0348 chore: mark AIUI node capabilities plan fully complete (Task 4 — LND deep data)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 14:00:43 +00:00
Dorian
ddf3f73df5 feat: wire bitcoin.getinfo and lnd.getinfo RPC routes + AIUI bitcoin context (Task 3)
Register bitcoin.rs and lnd.rs modules in mod.rs and add route entries
for bitcoin.getinfo and lnd.getinfo. Add bitcoinInfo ref and context
display to AIUI useArchy.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 13:56:29 +00:00
Dorian
75c424874e feat: add AIUI tail-logs helper and context hint (Task 2)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 13:52:52 +00:00
Dorian
1bb72dc87e feat: add AIUI node capabilities — file reading, log tailing, bitcoin/lnd deep data
Add readFileAsText() to filebrowser client, read-file and tail-logs action
handlers to context broker, bitcoin.getinfo and lnd.getinfo RPC enrichment
for context categories, and update AIUI protocol types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 13:50:40 +00:00
Dorian
11cee9dc70 fix: resolve content clipping on mobile by moving tab padding to scroll container
Moves dynamic pt-20/pt-40 padding from perspective-container-wrapper (which
shrank the content area) to the inner scroll container via computed style.
Removes spacer divs in CloudFolder, AppDetails, MarketplaceAppDetails.
Reduces excessive bottom padding in Marketplace. Hides Cloud/Network tabs
in CloudFolder detail view. Teleports mobile back buttons to body to escape
CSS transform containing block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 10:14:10 +00:00
Dorian
255b52eb6d fix: teleport mobile close button to body to escape CSS transform
The mobile close button uses position: fixed, which breaks inside
a CSS transform containing block. Wrapping in <Teleport to="body">
ensures correct fixed positioning relative to the viewport.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:56:23 +00:00
Dorian
cb3fea5303 chore: mark all plan tasks complete (Tasks 23-25 research)
All 25 tasks in the overnight loop plan are now [DONE].
Phase 4 research (Capacitor/TWA, StartOS comparison, roadmap)
was documented inline during plan creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:50:08 +00:00
Dorian
d7c9f4917a docs: add security audit report for new features (Task 22)
Audited cloud file upload, AIUI iframe, context broker, FileBrowser
proxy, and RPC endpoints. Key findings:
- XSS: safe (Vue template escaping)
- Context broker: properly validates origins
- FileBrowser: medium risk path traversal (client-side), token in URLs
- CSRF: high risk (no tokens, but mitigated by JSON content type)
- Nginx: missing security headers

Full report: docs/security-audit-2026-03-05.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:49:22 +00:00
Dorian
54c672943a chore: mark AIUI re-integration test loop as done (Task 21)
Verified all four integration points on live server:
- AIUI loads in iframe (HTTP 200, embedded mode with postMessage)
- Claude proxy responds (streaming API call successful)
- Context broker sends real data (all 10 categories wired)
- Close button works on mobile (bottom bar) and desktop (top-right pill)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:42:09 +00:00
Dorian
1b2021cece chore: sync ISO build configs with live server state
- Add nginx snippets (PWA, HTTPS app proxies) to image-recipe/configs/
- Update build script Dockerfile to install openssl, generate self-signed
  SSL cert, copy nginx snippets, and create Cloud dummy directories
- Ensures fresh ISO installs have working HTTPS, PWA installability,
  and pre-created Cloud storage folders

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:34:53 +00:00
Dorian
0bc7251e22 feat: add container security hardening and Fedimint setup wizard
Add --cap-drop=ALL, --security-opt=no-new-privileges:true to all
non-privileged containers. Per-app capability grants for apps needing
CHOWN/SETUID/SETGID. Read-only root filesystem with tmpfs for
compatible apps (searxng, grafana, uptime-kuma, filebrowser,
photoprism, vaultwarden). Add Fedimint "Create a Community" goal
with 4-step wizard. Fix deploy script cp -rf for audio directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:24:56 +00:00
Dorian
da3bf44cdb feat: add DID creation and copy functionality to Web5 page
Create DID button generates a did:key identity (tries backend RPC first,
falls back to client-side Web Crypto P-256 key generation). DID stored in
localStorage. Copy DID button for sharing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:14:47 +00:00
Dorian
cc47e17c1c feat: add --frontend-only flag, SSH pre-flight check, and section timing to deploy script
- --frontend-only skips Rust build and container rebuilds (35s vs 130s)
- SSH connectivity check fails fast if server is unreachable
- Each section now prints elapsed time

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:12:55 +00:00
Dorian
36627ae1ac feat: wire context broker files category to FileBrowser, fix media state check
- sanitizeFiles() now fetches real data from FileBrowser (usage, folders, recent files)
- Fixed media state check to include 'running' and 'stopped' states, not just 'installed'
- Removed unused bottomPosition variable in CloudFolder.vue

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:09:45 +00:00
Dorian
a49dd83c5c feat: add local search filter to My Apps view
Adds a search input to the Apps page that filters installed apps by title,
description, or app ID. Styled consistently with the Marketplace search bar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:06:07 +00:00
Dorian
f6cce7c82e feat: add missing nginx app proxies to HTTP block for full app wiring
Added proxy configurations for Grafana (3000), Jellyfin (8096), Uptime Kuma
(3001), Portainer (9000), OnlyOffice (9980), and all remaining apps (SearXNG,
LND, Mempool, PhotoPrism, Fedimint, Tailscale, Ollama, Bitcoin UI, Electrs,
Endurain, Nginx Proxy Manager, BTCPay, Home Assistant) to the HTTP server
block. Previously these were only available via HTTPS. Also added
client_max_body_size and proxy_request_buffering to the HTTPS filebrowser
snippet for large file uploads.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:53:04 +00:00
Dorian
1c797da908 feat: wire Home Network card to real app store data
Replace hardcoded "All Running", "Connected", "12" in the Network
overview card with computed values from useAppStore. Services status
reflects actual running/total app counts, connectivity uses WebSocket
connection state, and running apps count is live.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:43:40 +00:00
Dorian
62aa3be63d feat: add Dashboard/Setup tab bar to Home view for all UI modes
Unified the Easy and Pro mode home views into a single tabbed interface.
Both modes now show Dashboard and Setup tabs, replacing the mode-specific
conditional rendering. Added missing homeTab ref that was referenced in
template but never declared.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:36:43 +00:00
Dorian
70bc71d035 feat: wire CMD-K spotlight search to installed apps
Dynamically builds searchable items from installed packages so typing
an app name in CMD-K finds and launches it via the app launcher overlay.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:27:43 +00:00
Dorian
064da257da fix: preserve route on page refresh by removing timeout from background session check
When localStorage confirms auth, the background revalidation now uses
store.checkSession() directly instead of the 8-second timeout wrapper.
This prevents premature redirects to /login on slow networks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:22:20 +00:00
Dorian
621d74bfb3 feat: add drag-and-drop file upload to Cloud folders
Drag files over the native file browser area to see a drop zone overlay
with dashed orange border. Dropping files triggers the existing upload
handler. Uses debounced dragleave to prevent flicker between children.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:08:57 +00:00
Dorian
37105e6be6 feat: wire Cloud card on Home to real FileBrowser data
Add getUsage() method to filebrowser-client that fetches root directory
and returns total size and folder count. Home.vue Cloud card now shows
real storage used and folder count instead of hardcoded values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:05:14 +00:00
Dorian
dfe96cdb6f chore: verify mobile back button positioning (task 6)
Confirmed data-mobile-tab-bar attribute is present on Dashboard tab bar,
useMobileBackButton composable correctly calculates positioning, and all
views (CloudFolder, Chat, Marketplace, AppDetails) use it properly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:02:05 +00:00
Dorian
e85da61670 fix: hide Marketplace header on mobile, reduce Home welcome margin
Marketplace header container now hidden md:flex to save mobile space.
Home welcome header uses mb-4 on mobile, mb-8 on desktop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:35:09 +00:00
Dorian
a6364145e7 fix: remove conflicting static manifest.json, VitePWA generates it
All PWA icon files verified present. VitePWA plugin handles
manifest.webmanifest generation and injection automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:33:04 +00:00
Dorian
e079d7143e fix: prevent mobile viewport scaling, keyboard pushes content up
Add maximum-scale=1.0, user-scalable=no, interactive-widget=resizes-content
to viewport meta for proper mobile keyboard behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:30:59 +00:00
Dorian
d911c90675 feat: mobile close button at bottom of chat view for thumb reach
Hide top-right pill on mobile, add bottom-positioned close button
using useMobileBackButton composable for proper tab bar clearance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:29:11 +00:00
Dorian
4463a54e98 fix: increase AIUI close button mobile margin from 0.75rem to 1.25rem
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 23:27:03 +00:00