Commit Graph

160 Commits

Author SHA1 Message Date
Dorian
98b2c098aa test: add CI-compatible test runner script
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:56:10 +00:00
Dorian
0301274054 test: add identity module unit tests (9 test cases)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:55:11 +00:00
Dorian
615ce4f939 test: add auth and session unit tests (20 test cases)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:54:14 +00:00
Dorian
05ed3b7bcf test: add backend integration test scaffolding with 3 RPC tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:51:22 +00:00
Dorian
7c09c19e8e test: add router guards unit tests with 9 test cases
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:38:39 +00:00
Dorian
d214ba38c6 test: add container store unit tests with 8 test cases
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:37:41 +00:00
Dorian
fe0413a124 test: add app store unit tests with 11 test cases
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:36:42 +00:00
Dorian
5b08aa515d test: add RPC client unit tests with 13 test cases
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:35:26 +00:00
Dorian
e6cd18d8ea test: install Vitest and configure frontend test runner
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:34:14 +00:00
Dorian
d69c0d6724 changes for build for sxsw 2026-03-10 23:29:05 +00:00
Dorian
dbd4cf59d2 fix: skip JSON body parsing for filebrowser upload routes
express.json() middleware was consuming the binary file body before the
upload handler could drain it, causing 404/parse errors on file uploads.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 21:27:26 +00:00
Dorian
7aa59d8072 fix: AIUI mobile — auto-switch to content tab when clicking chat bubbles
Removed !isEmbedded guard from mobile tab auto-switch watchers in
ChatPage.vue. When running embedded in Archy iframe on mobile,
clicking a chat bubble now correctly switches to the content panel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 21:20:57 +00:00
Dorian
62cdddfab0 fix: ensure client_max_body_size 0 via entrypoint script
The entrypoint now injects client_max_body_size 0 at runtime if missing,
as a safety net against Docker layer caching of the nginx config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 20:21:01 +00:00
Dorian
718dceb0ca fix: set client_max_body_size 0 at http level in demo nginx
Location-level override wasn't sufficient. Setting at http block
disables the body size limit globally for the demo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 20:13:14 +00:00
Dorian
a6c1820a83 fix: mobile onboarding viewport + filebrowser demo fixes
Onboarding:
- Fixed viewport to use dvh units with position:fixed container
- All views use scrollable glass containers that fit within viewport
- Responsive typography and spacing (mobile-first breakpoints)
- Tighter padding/margins on small screens
- RootRedirect checks localStorage first for instant redirect
- Spinner only appears after 500ms delay to avoid flash

Filebrowser:
- Fix CloudFolder null initialPath crash (watch both useNativeUI + section)
- Remove unused `host` computed (was causing TS error)
- Add mock GET /app/filebrowser/ landing page
- Increase express.json limit to 50mb

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 19:32:28 +00:00
Dorian
4bc0c4b483 fix: use proxy paths for filebrowser URLs to avoid mixed content on HTTPS
Mock backend lan-address now uses localhost so hostname replacement works
correctly. CloudFolder external URLs use origin-relative proxy paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:49:20 +00:00
Dorian
e7b1a772b7 fix: demo filebrowser uploads — increase nginx body size limit and add mock handlers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:12:28 +00:00
Dorian
a2aa9657b1 fix: prevent My Apps crash when installing apps + add filebrowser to demo
The My Apps page went blank after installing apps because pkg['static-files'].icon
was accessed without optional chaining on dynamically installed packages that lack
the static-files property.

- Make static-files optional in PackageDataEntry type
- Add defensive ?.icon access with fallback in Apps.vue and AppDetails.vue
- Add filebrowser to mock backend staticDevApps (enables Cloud page in demo)
- Expand portMappings and marketplaceMetadata for all marketplace apps
- installPackage now uses staticApp() format for consistent data shape

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 17:09:59 +00:00
Dorian
9c7ffbb263 feat: enrich mock backend for demo — add all missing RPC handlers and demo data
Fixes "Method not found: identity.create" on demo onboarding. Adds handlers
for all identity, nostr, content, network, router, and peer RPC methods so
no method-not-found errors occur anywhere in the demo. Expands marketplace
from 2 to 12 apps, adds 5 static dashboard apps, randomizes metrics, and
populates peer/message data for a richer demo experience.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 13:03:53 +00:00
Dorian
0fb373273a fix: disable HTTP keep-alive and update nginx proxy config
- Set http1_keep_alive(false) on hyper server to prevent connection
  reuse issues with nginx reverse proxy
- Clean up nginx proxy config: remove upstream block, use direct
  proxy_pass to 127.0.0.1:5678
- Update AppLauncherOverlay and appLauncher store with UI fixes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 09:54:15 +00:00
Dorian
0cf71c4115 fix: zero-amount invoices, identity.verify DID extraction, tor service permissions
- Allow zero-amount Lightning invoices (BOLT11 "any amount") by changing
  validation from amount_sats < 1 to amount_sats < 0
- identity.verify now extracts pubkey directly from did:key format instead
  of requiring the DID to belong to a local identity
- tor.create-service writes config to data_dir/tor-config/ instead of
  /var/lib/archipelago/tor/ (owned by debian-tor, not archipelago user)
- Add E2E test script (scripts/run-e2e-tests.sh) covering 47 RPC endpoints
- Add testing plan with results (loop/testing.md)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 09:53:36 +00:00
Dorian
e3aa95a103 fix: prevent tokio runtime deadlock in credential issue/verify
The credential issuance and verification handlers used
Handle::block_on() directly inside the tokio runtime, causing a
deadlock. Wrapped with block_in_place() to properly yield the
runtime thread.

Also completed full feature verification across all 25 test groups
(~175 checks) on live server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 07:43:12 +00:00
Dorian
5ce8b7965c fix: add dependency checks for LND, BTCPay, Mempool, Fedimint
All apps with Bitcoin dependencies now check for running Bitcoin Knots
before install. Mempool also requires Electrs. BTCPay logs a warning
when installed without LND (Lightning payments unavailable).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 00:33:03 +00:00
Dorian
9f7b0a76f3 chore: mark APP-103 through APP-106 as verified
All PORT_TO_PROXY mappings match nginx config (APP-103).
First-boot creates all marketplace app containers (APP-104).
get_app_config handles all 24 apps (APP-105).
get_app_metadata has entries for all 24 apps (APP-106).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 00:24:12 +00:00
Dorian
b581fb4126 fix: protocol-aware iframe vs new-tab behavior for all apps
Apps with absolute-path redirects (Jellyfin, Portainer, PhotoPrism,
OnlyOffice, Uptime Kuma, Fedimint) now correctly open in new tab on
HTTPS where subpath proxy breaks their redirects, but still use iframe
on HTTP where direct port access works fine.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 00:22:41 +00:00
Dorian
c45de13752 fix: add 6 missing apps to first-boot and fix penpot icon path
Added searxng, onlyoffice, filebrowser, nginx-proxy-manager, portainer,
and tailscale to first-boot-containers.sh so fresh ISO installs have all
marketplace apps ready. Fixed penpot icon path in Marketplace.vue to use
the correct app-icons directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 00:18:28 +00:00
Dorian
e8a0e1af19 feat: add Ollama proxy timeouts, SSH key migration, polish skills, and demo content
- Update all skill SSH commands from sshpass to key-based auth (~/.ssh/archipelago-deploy)
- Add proxy_connect_timeout 120s to nginx Ollama location blocks
- Add new polish/sweep skills for overnight automation
- Add demo content (documents, photos) for demo stack
- Add .ssh/ to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:06:52 +00:00
Dorian
d3f0f1192e docs: expand app integration checklist with full file-by-file guide
Replaces the brief 4-item checklist with a comprehensive file-level
checklist covering backend, frontend, nginx, deploy, first-boot, and
ISO build. Ensures no file is missed when adding or modifying apps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:32:15 +00:00
Dorian
caefe1ca4e fix: add electrs-ui to ISO build and first-boot for flawless installs
- Add electrs-ui to ISO capture patterns (captured from live server)
- Bundle nginx:alpine base image in ISO for UI container builds
- Copy docker UI source files (bitcoin-ui, lnd-ui, electrs-ui) into ISO
- First-boot: create electrs-ui container from pre-built image or source
- First-boot: create bitcoin-ui and lnd-ui containers (same pattern)
- Installer: copy docker/ source dir to target for first-boot fallback
- Nginx: minor config sync from linter changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:27:58 +00:00
Dorian
a5757d27f1 feat: electrs standalone install with bitcoin dependency + progress UI
- Add electrs to marketplace as standalone installable app
- Add dependency check: refuse install if no bitcoin node is running
- Use container DNS (bitcoin-knots:8332) on archy-net instead of host IP
- Auto-create bitcoin.conf with txindex + RPC on bitcoin-knots install
- Auto-build and start electrs-ui container post-install
- Show index size and estimated progress during initial sync
- Add /electrs-status and /health nginx proxy routes
- Remove Tailwind CDN from electrs-ui, use inline styles

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:16:02 +00:00
Dorian
825d082003 feat: add Ollama (local AI) integration for AIUI
- Create Ollama provider plugin in AIUI (ollama-provider.ts)
- Register Ollama alongside Claude in plugin system
- Auto-detect installed models via /api/tags endpoint
- Add Ollama proxy in mock backend (forwards to localhost:11434)
- Add nginx proxy rules for /aiui/api/ollama/ (both HTTP and HTTPS)
- Rebuild AIUI dist with Ollama provider included
- Qwen 2.5 Coder 3B installed on dev server via Ollama

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 01:48:23 +00:00
Dorian
00ad7a42f5 fix: map AIUI model IDs and add node-list-peers stub
- Map claude-haiku-4.5 → claude-haiku-4-5-20251001 in proxy
- Map claude-sonnet-4.5 → claude-sonnet-4-5-20250514 in proxy
- Add node-list-peers RPC stub (returns empty array)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:27:34 +00:00
Dorian
2938d8159b fix: strip AIUI-specific fields from Claude API proxy requests
Remove webSearch, webResults, context fields before forwarding to
Anthropic API — these are AIUI-internal and cause 400 errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:21:38 +00:00
Dorian
0264920e33 fix: add DNS config to demo backend container for API access
Explicit Google/Cloudflare DNS prevents resolution failures when
the Docker host's DNS is unavailable or misconfigured.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:21:01 +00:00
Dorian
4bbae540ed fix: workbox precache conflict + clean up duplicate API routes
- Exclude assets/icon/** from workbox globPatterns (already in includeAssets)
- Remove duplicate /api/* and /aiui/api/web-search routes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:02:37 +00:00
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