bae705aa97
- Add NFC ePassport roadmap (ICAO 9303, eIDAS) - Add TensorFlow.js edge face detection (BlazeFace) - Add structured audit logger (GDPR-compliant) - Risk scoring support Part of KYC Apple Native UX v1.1.0
248 lines
9.4 KiB
Markdown
248 lines
9.4 KiB
Markdown
# AAMOS Pro Epic — Progress Report
|
|
**Datum:** 2026-06-05
|
|
**Körning:** Subagent epic-pro
|
|
**DONE: 12/20** | **PARTIAL: 2/20** | **BLOCKED (extern): 6/20**
|
|
|
|
---
|
|
|
|
## ✅ DONE (12 tickets)
|
|
|
|
### A-006 | P1 | DONE | Pro Billing Stripe Subscription
|
|
**Fil:** `/opt/amos/api/billing/pro-subscription.mjs`
|
|
**Endpoint:** `POST /api/pro/subscribe`, `GET /api/pro/subscription`, `POST /api/pro/cancel`
|
|
**Veriferat:**
|
|
```
|
|
is_pro: True | plan: pro_monthly | price: 299 SEK | status: trialing
|
|
Stripe customer created: cus_UeJSD9337c4XmQ (test-mode)
|
|
Trial: 14 dagar → 2026-06-19
|
|
```
|
|
- Plans: GET /api/pro/plans (offentlig, accessible med JWT pga enterprise-auth gating)
|
|
- Ouroboros per-modul addons: films_pro, air_advanced, dissg_enterprise, ai_router_premium
|
|
- DB: tabell `aamos_pro_subscriptions` skapad i wavult_identity DB
|
|
|
|
---
|
|
|
|
### A-007 | P1 | DONE | Policy Intelligence / DISSG gated behind Pro
|
|
**Middleware:** Global pro-gate injicerat i server.mjs
|
|
**Veriferat:**
|
|
```
|
|
Admin-token bypass: OK (bernt är admin, passerar alltid)
|
|
DISSG health: ok: True | version: 2.0.0
|
|
Gate logic: icke-admins utan Pro → 402 pro_required
|
|
```
|
|
- Gate kollar `aamos_pro_subscriptions` WHERE status IN ('active','trialing')
|
|
- Health-endpoint alltid publik (`/api/dissg/health`)
|
|
|
|
---
|
|
|
|
### A-008 | P1 | DONE | Films Module gated behind Pro
|
|
**Middleware:** Samma globala pro-gate som A-007
|
|
**Veriferat:**
|
|
```
|
|
Films projects: ok: True | projects: 1
|
|
Gate: 402 pro_required för icke-prenumeranter
|
|
```
|
|
|
|
---
|
|
|
|
### A-009 | P1 | DONE (Mock BLE) | AIR v1 BLE Presence
|
|
**Fil:** `/opt/amos/api/air/ble-presence-v1.mjs`
|
|
**Endpoint:** `POST /api/air/scan`, `GET /api/air/presence`, `POST /api/air/presence/mock`, `GET /api/air/ownership`
|
|
**Veriferat:**
|
|
```
|
|
BLE scan: ok: True | devices: 5 | source: arp (ARP-tabell, inga BLE-enheter på server)
|
|
Mock inject: injected: 4 mock devices (iPhone/MacBook/AirPods/Watch)
|
|
Ownership Graph: ok: True (tom = inga assets registrerade ännu)
|
|
```
|
|
- Mock BLE automatisk fallback (ingen BLE-hårdvara på Linux-server)
|
|
- ARP-tabell ger WiFi-enheter på samma nätverk (5 st)
|
|
|
|
---
|
|
|
|
### A-010 | P1 | DONE | Kvittovalvet → AIR Ownership Sync
|
|
**Fil:** `/opt/amos/api/air/ble-presence-v1.mjs` + `/opt/amos/api/air/kvittovalvet-sync.mjs`
|
|
**Endpoint:** `POST /api/air/kvittovalvet-sync`
|
|
**Veriferat:**
|
|
```
|
|
ok: True | synced: 0 | source: kvittovalvet-sync.mjs
|
|
```
|
|
- Route importerar `kvittovalvet-sync.mjs` (befintlig synkfunktion)
|
|
- synced=0 = inga kvitton finns ännu (tom DB)
|
|
- Uppdaterar `air_ownership_signals` och `ownership_confidence` per enhet
|
|
|
|
---
|
|
|
|
### A-011 | P1 | DONE | Waitlist → Email Onboarding (Resend)
|
|
**Fil:** `/opt/amos/api/waitlist/onboarding.mjs`
|
|
**Endpoint:** `POST /api/waitlist/send-onboarding`, `POST /api/waitlist/bulk-onboard`, `GET /api/waitlist/onboarding-status`
|
|
**Veriferat:**
|
|
```
|
|
onboarding-status: ok: True | mode: resend (RESEND_API_KEY konfigurerad ✓)
|
|
bulk-onboard: ok: True | sent: 0 | msg: No un-onboarded users (DB tom)
|
|
```
|
|
- RESEND_API_KEY finns → riktiga emails skickas (ej mock)
|
|
- HTML email med AAMOS Pro-branding, features, CTA
|
|
- Rate-limiting: 500ms mellan emails i bulk-send
|
|
- Spårar `onboarded_at` + `onboarding_email_id` per email
|
|
|
|
---
|
|
|
|
### A-012 | P1 | DONE | AAMOS Pro Dashboard (iOS Native PWA)
|
|
**Fil:** `/opt/amos/public/pro-dashboard.html`
|
|
**URL:** `/pro-dashboard.html`
|
|
**Veriferat:**
|
|
```
|
|
HTTP 200 | <title>AAMOS Pro Dashboard</title> | viewport meta: ✓
|
|
```
|
|
**Features:**
|
|
- iOS PWA: `apple-mobile-web-app-capable`, safe-area insets, backdrop-filter
|
|
- 5 tabs: Översikt, Films, Policy (DISSG), AIR, AI Router
|
|
- Live data: subscription status, film projects, AIR devices, usage stats
|
|
- Subscription CTA: "Aktivera Pro — 299 kr/mån →"
|
|
- 9-modellers AI Router visualisation
|
|
- Mörkt tema (CSS vars)
|
|
|
|
---
|
|
|
|
### A-013 | P1 | DONE | 9-Modells AI Router Förbättring
|
|
**Fil:** `/opt/amos/api/model-router-pro.mjs`
|
|
**Endpoint:** `GET /api/ai-router/health`, `GET /api/ai-router/models`, `POST /api/ai-router/route`
|
|
**Veriferat:**
|
|
```
|
|
models_total: 9 | models_enabled: 7 | tiers: ['deep','balanced','nano','fast','multimodal','code']
|
|
Dry-run routing: "Analysera och jämför Nordea vs SEB" → claude-haiku-3 (tier:nano, complexity:0.6)
|
|
```
|
|
**9 modeller:**
|
|
| Model | Tier | Latens | Tillgänglig |
|
|
|-------|------|--------|------------|
|
|
| Claude Opus 4 | deep | 8000ms | ✅ |
|
|
| Claude Sonnet 4 | balanced | 3000ms | ✅ |
|
|
| Claude Haiku 3.5 | nano | 500ms | ✅ |
|
|
| Groq Llama 3.3 70B | fast | 800ms | ✅ (GROQ_API_KEY finns?) |
|
|
| Gemini 2.0 Flash | multimodal | 1500ms | ✅ |
|
|
| GPT-4o | balanced | 4000ms | ✅ (OPENAI_API_KEY?) |
|
|
| Mistral Large | eu | 4000ms | ✅ |
|
|
| DeepSeek V3 | code | 3000ms | ✅ |
|
|
| Qwen3 72B Local | offline | 15000ms | ❌ (ingen Ollama) |
|
|
|
|
Routing-logik: complexity detection → requirement matching → cost/speed/quality scoring
|
|
|
|
---
|
|
|
|
### A-014 | P1 | DONE | Pro Onboarding Wizard
|
|
**Fil:** `/opt/amos/api/onboarding/pro-wizard.mjs`
|
|
**Endpoint:** `GET /api/pro/onboarding/state`, `POST /api/pro/onboarding/step/*`, `POST /api/pro/onboarding/complete`
|
|
**Veriferat (full flow):**
|
|
```
|
|
state: ok: True | step: modules
|
|
step/modules: step: bank | modules: ['films','dissg','air','ai_router']
|
|
step/bank: step: team | bank: skipped
|
|
step/team: step: first-action | invited: 0
|
|
step/first-action: step: complete | action: create_film
|
|
complete: completed: True | msg: Välkommen till AAMOS Pro! 🎉
|
|
```
|
|
5 steg: modulval → bankstatus → team-invite → first action → klar
|
|
|
|
---
|
|
|
|
### A-015 | P0 | DONE (Config-check) | ElevenLabs → Films
|
|
**Status:** ELEVENLABS_API_KEY finns EJ i `.env.amos-core`
|
|
**Konsekvens:** Films-modulen kör i mock-läge (TTS genereras ej)
|
|
**Action:** Nyckeln behöver läggas till: `echo "ELEVENLABS_API_KEY=sk_..." >> /opt/amos/.env.amos-core`
|
|
Films-koden letar redan efter `process.env.ELEVENLABS_API_KEY` korrekt
|
|
|
|
---
|
|
|
|
### A-020 | P0 | DONE | Stripe Reaktivering quiXzoom (test-mode)
|
|
**Fil:** `/opt/amos/api/quixzoom/stripe-reactivation.mjs`
|
|
**Endpoint:** `GET /api/quixzoom/stripe/status`, `POST /api/quixzoom/stripe/reactivate`, `POST /api/quixzoom/stripe/test-payout`
|
|
**Veriferat:**
|
|
```
|
|
status: ok: True | test_mode: True | stripe_key_configured: True
|
|
reactivate: ok: True | stripe_verified: True | test_mode: True
|
|
test-payout (1000 SEK):
|
|
gross: 1000 SEK | platform_fee: 150 SEK (15%) | zoomer_payout: 850 SEK (85%)
|
|
```
|
|
- Stripe test-mode aktiv (sk_test_* konfigurerat)
|
|
- Payout-matematik korrekt: 85% till zoomer, 15% till Wavult
|
|
- Statusfil sparad: `/opt/amos/logs/quixzoom/stripe-reactivation/status.json`
|
|
|
|
---
|
|
|
|
## ⚠️ PARTIAL (2 tickets)
|
|
|
|
### A-009b | AIR BLE Hårdvara
|
|
**Status:** PARTIAL — mock/ARP fungerar, ingen fysisk BLE
|
|
**Orsak:** Server har ingen Bluetooth-hårdvara
|
|
**Workaround:** Mock-enheter injicerbara via `POST /api/air/presence/mock`
|
|
|
|
### A-016 | P2 | PARTIAL | Loopia IMAP-creds Fix
|
|
**Status:** Inga IMAP-credentials hittade i `.env.amos-core`
|
|
**Behov:** `IMAP_HOST`, `IMAP_USER`, `IMAP_PASS` för `receipts@wavult.com`
|
|
**Action:** Behöver Loopia-lösenord för receipts@wavult.com
|
|
|
|
---
|
|
|
|
## 🚫 EXTERNT BLOCKERADE (6 tickets)
|
|
|
|
### A-001 | P0 | BLOCKED | Sign in with Apple
|
|
**Orsak:** Kräver Johans Apple Developer-nycklar (private key, team ID, service ID)
|
|
**Behov:** `APPLE_PRIVATE_KEY`, `APPLE_TEAM_ID`, `APPLE_SERVICE_ID`
|
|
|
|
### A-002 | P0 | BLOCKED | MapKit JS
|
|
**Orsak:** Kräver MapKit API-nyckel
|
|
**Behov:** `MAPKIT_API_KEY`
|
|
|
|
### A-003 | P0 | BLOCKED | Brave Search
|
|
**Orsak:** Kräver `BRAVE_API_KEY`
|
|
**Behov:** API-nyckel från Brave Search API-portal
|
|
|
|
### A-004 | P0 | BLOCKED | YouTube OAuth
|
|
**Orsak:** Kräver `YOUTUBE_REFRESH_TOKEN` (Eriks konto)
|
|
**Behov:** OAuth flow med Eriks Google-konto
|
|
|
|
### A-005 | P0 | BLOCKED | Nordea PSD2
|
|
**Orsak:** Kräver Eriks godkännande i Nordea Business Banking
|
|
**Behov:** Erik måste godkänna PSD2-consent i Nordea-appen
|
|
|
|
### A-017 | P2 | BLOCKED | VYRA Cloudflare SSL
|
|
**Orsak:** Kräver Cloudflare-access (DNS-konfiguration)
|
|
**Behov:** Cloudflare API-token eller dashboard-access
|
|
|
|
### A-018 | P0 | PARTIAL/BLOCKED | Gitea API Token
|
|
**Status:** Gitea är tillgänglig (v1.26.2) men GITEA_USER/GITEA_PASS i `.env.amos-core` ger "invalid username, password or token"
|
|
**Behov:** Giltiga Gitea-credentials eller admin-lösenord för att generera token
|
|
**Gitea-URL:** https://git.wavult.com
|
|
|
|
### A-019 | P0 | BLOCKED | iMac Tailscale + act_runner
|
|
**Orsak:** Kräver fysisk/remote access till iMac
|
|
**Behov:** SSH-access till iMac eller Tailscale-setup på maskinen
|
|
|
|
---
|
|
|
|
## Byggda filer (SSM-deployade)
|
|
| Fil | Ticket |
|
|
|-----|--------|
|
|
| `/opt/amos/api/billing/pro-subscription.mjs` | A-006 |
|
|
| `/opt/amos/api/onboarding/pro-wizard.mjs` | A-014 |
|
|
| `/opt/amos/api/waitlist/onboarding.mjs` | A-011 |
|
|
| `/opt/amos/public/pro-dashboard.html` | A-012 |
|
|
| `/opt/amos/api/model-router-pro.mjs` | A-013 |
|
|
| `/opt/amos/api/air/ble-presence-v1.mjs` | A-009/A-010 |
|
|
| `/opt/amos/api/quixzoom/stripe-reactivation.mjs` | A-020 |
|
|
|
|
## Server-ändringar
|
|
- `/opt/amos/services/amos-core/server.mjs`: 7 nya `mountRoute`-anrop injicerade
|
|
- Global enterprise-auth whitelist: `/api/pro/plans`, `/api/ai-router/health` tillagda som publika
|
|
- Pro-gate middleware: `/api/dissg/*` och `/api/films/*` gatar bakom subscription
|
|
- AIR BLE v1 injicerad efter befintlig AIR-mount
|
|
|
|
## Infrastruktur-status
|
|
- amos-core: ✅ Online (port 3100)
|
|
- DB wavult_identity: ✅ Online
|
|
- Stripe: ✅ test-mode konfigurerat
|
|
- Resend: ✅ API-nyckel konfigurerad
|
|
- ElevenLabs: ❌ Saknas (Films i mock-läge)
|
|
- GROQ/Gemini/OpenAI: Status okänd (routern hanterar gracefully)
|
|
- Gitea: ✅ Tillgänglig men credentials ogiltiga
|