{"markdown":"# AMAE Enterprise Findom Engine — Comprehensive Operations Manual & User Guide\n\nThe **Autonomous Multi-Agent Engagement (AMAE) Enterprise Engine** is an enterprise-grade, sovereign digital asset management platform, multi-agent psychological conversational pipeline, automated browser account manager, Fooocus / Gradio photorealistic image synthesizer, video drip engine, Web3 tributary smart vault, and multi-processor financial payment verification infrastructure.\n\nThis guide provides an **exhaustive, feature-by-feature reference for every single tab, page, card, button, form, input, table, formula, data source, and backend engine** across the entire AMAE platform.\n\n---\n\n## 📑 Master Table of Contents\n\n1. [System Architecture & Core Engine](#1-system-architecture--core-engine)\n   - [3-Agent Triad Pipeline Core](#3-agent-triad-pipeline-core)\n   - [Multi-Database & Multi-Tenant Storage Hierarchy](#multi-database--multi-tenant-storage-hierarchy)\n   - [Global Top Bar, SSE Telemetry & Quick Stat Pills](#global-top-bar-sse-telemetry--quick-stat-pills)\n   - [Ergonomic Left Sidebar Navigation Controls](#ergonomic-left-sidebar-navigation-controls)\n   - [Global Keyboard Shortcuts Matrix](#global-keyboard-shortcuts-matrix)\n2. [Command Core (Tabs 1–3)](#2-command-core-tabs-13)\n   - [Tab 1: Overview Metrics (`#overview`)](#tab-1-overview-metrics-overview)\n   - [Tab 2: Live CRM & Chat (`#crm`)](#tab-2-live-crm--chat-crm)\n   - [Tab 3: Simulation Playground (`#playground`)](#tab-3-simulation-playground-playground)\n3. [Sovereign Financials (Tabs 4–7)](#3-sovereign-financials-tabs-47)\n   - [Tab 4: Debt Contracts & Vault (`#contracts`)](#tab-4-debt-contracts--vault-contracts)\n   - [Tab 5: Debt Syndicates & Gladiator Arena (`#gladiatorarena`)](#tab-5-debt-syndicates--gladiator-arena-gladiatorarena)\n   - [Tab 6: Web3 Shrine & Shadow Swarm (`#web3shrine`)](#tab-6-web3-shrine--shadow-swarm-web3shrine)\n   - [Tab 7: Churn Radar & VIP Loyalty (`#churnloyalty`)](#tab-7-churn-radar--vip-loyalty-churnloyalty)\n4. [Synthetic Media (Tabs 8–12)](#4-synthetic-media-tabs-812)\n   - [Tab 8: Persona Studio (`#personas`)](#tab-8-persona-studio-personas)\n   - [Tab 9: Media & Voice Studio (`#media`)](#tab-9-media--voice-studio-media)\n   - [Tab 10: Deepfake Video & Bespoke Drips (`#deepfakevideo`)](#tab-10-deepfake-video--bespoke-drips-deepfakevideo)\n   - [Tab 11: Tone A/B & 9:16 Reel Studio (`#reelstudio`)](#tab-11-tone-ab--916-reel-studio-reelstudio)\n   - [Tab 12: 24/7 Livestream & Live Chat (`#livestreamstudio`)](#tab-12-247-livestream--live-chat-livestreamstudio)\n5. [Intelligence & Swarms (Tabs 13–16)](#5-intelligence--swarms-tabs-1316)\n   - [Tab 13: Whale Swarm & Avatar (`#whales`)](#tab-13-whale-swarm--avatar-whales)\n   - [Tab 14: Persona Matrix & Account Vault (`#personamatrix`)](#tab-14-persona-matrix--account-vault-personamatrix)\n   - [Tab 15: Shadow Swarm & Telephony (`#shadowtelephony`)](#tab-15-shadow-swarm--telephony-shadowtelephony)\n   - [Tab 16: Content Scheduler (`#scheduler`)](#tab-16-content-scheduler-scheduler)\n6. [Safety & Infrastructure (Tabs 17–19)](#6-safety--infrastructure-tabs-1719)\n   - [Tab 17: Playwright Automation & Signups (`#playwright`)](#tab-17-playwright-automation--signups-playwright)\n   - [Tab 18: Compliance & Safety Studio (`#safetystudio`)](#tab-18-compliance--safety-studio-safetystudio)\n   - [Tab 19: OpSec & Safety Rules (`#settings`)](#tab-19-opsec--safety-rules-settings)\n7. [System Control & Tools (Tabs 20–23)](#7-system-control--tools-tabs-2023)\n   - [Tab 20: System Logs (`#logs`)](#tab-20-system-logs-logs)\n   - [Tab 21: Database Explorer (`#databaseditor`)](#tab-21-database-explorer-databaseditor)\n   - [Tab 22: System Setup (`#setuppage`)](#tab-22-system-setup-setuppage)\n   - [Tab 23: User Guide & Docs (`#userguide`)](#tab-23-user-guide--docs-userguide)\n8. [Multi-Processor Payment Webhook Infrastructure](#8-multi-processor-payment-webhook-infrastructure)\n9. [Comprehensive REST API & WebSocket Reference](#9-comprehensive-rest-api--websocket-reference)\n10. [Cloud Deployment & 24/7 Autonomous Operation](#10-cloud-deployment--247-autonomous-operation)\n\n---\n\n## 1. System Architecture & Core Engine\n\n### 3-Agent Triad Pipeline Core\n\nEvery inbound message (whether originating from Twitter/X DMs, Reddit chats, Fansly/OnlyFans DMs, web forms, or telephony transcripts) is processed sequentially through three autonomous AI agents before any response is dispatched.\n\n```mermaid\nflowchart TD\n    IN[\"Inbound Submissive Message\"] --> A1[\"Agent 1: Triage & Gatekeeper\"]\n    A1 -->|Tribute < Minimum| GK[\"GATEKEEP Barrier Triggered\"]\n    GK --> RESP_GK[\"Send Commanding Gatekeep Response + Payment Links\"]\n    A1 -->|Tribute >= Minimum| A2[\"Agent 2: Psych & Communication Engine\"]\n    A2 -->|Vector Memory + Persona Archetype| A3[\"Agent 3: OpSec & Compliance Firewall\"]\n    A3 -->|Pass Local Regex & Platform TOS| DISPATCH[\"Autonomous Dispatch Engine\"]\n    A3 -->|PII or TOS Breach| REDACT[\"Sanitize Copy / Reject Unsafe Tokens\"]\n    REDACT --> DISPATCH\n    DISPATCH --> OUT[\"Platform Delivery with Human Pacing Delay (15s–90s)\"]\n```\n\n1. **Agent 1: Triage & Gatekeeper (`amae/agents/triage.py`)**:\n   - **Tribute Ledger Check**: Queries `users` and `tributes` in `amae_memory.db` to determine the user's lifetime and recent tribute balance against the persona's `tribute_minimum` (default: $25.00).\n   - **Kink Classification**: Evaluates message keywords against psychological classification vectors (`debt_contract`, `chastity`, `wallet_drain`, `humiliation`, `worship`, `silent_drain`, `cfo_control`).\n   - **Decision**: Outputs `GATEKEEP` if unpaid or below threshold, or `PROCEED` if tribute minimum is satisfied.\n2. **Agent 2: Psych & Communication Engine (`amae/agents/psych_comm.py`)**:\n   - **Vector Memory RAG**: Queries in-memory FAISS/embedding vector space (`amae/vector_memory.py`) to retrieve the top 5 most relevant past interactions and psychological vulnerabilities.\n   - **4-Stage Funnel Progression**:\n     - *Stage 1 (Initial Contact / Probe)*: Cold, high-status boundary setting.\n     - *Stage 2 (Submissive Conditioning)*: Escalating psychological leverage and obedience demands.\n     - *Stage 3 (Tribute Extraction)*: Direct, commanding financial extractions and debt commitments.\n     - *Stage 4 (Whale Retention & Drain)*: Long-term psychological lock-in, recurring drips, and syndicate contracts.\n   - **Voice Synthesis**: Generates response copy strictly in character using the active Dominatrix persona's linguistic tone, vocabulary constraints, and boundary rules.\n3. **Agent 3: OpSec & Compliance Firewall (`amae/agents/opsec.py` & `amae/compliance.py`)**:\n   - **Regex PII Inspection**: Scans draft copy for personal phone numbers, physical street addresses, personal email addresses, SSNs, credit card numbers, and IP addresses.\n   - **Platform TOS Shield**: Filters prohibited terms that trigger financial processor freezes (CashApp, PayPal, Stripe, Wise) or social network bans.\n   - **Human-Likeness Verification**: Removes AI assistant artifacts (\"Certainly\", \"As an AI\", overly polite filler) to ensure natural human cadence.\n\n---\n\n### Multi-Database & Multi-Tenant Storage Hierarchy\n\nAMAE uses a high-performance multi-database architecture with SQLite Write-Ahead Logging (WAL) and optional zero-downtime replication to **Neon Lakebase Postgres**:\n\n| Database File | Primary Tables | Owning Subsystem |\n| :--- | :--- | :--- |\n| `amae_memory.db` | `personas`, `users`, `conversations`, `tributes`, `system_logs`, `scheduled_posts`, `account_signups`, `opsec_rules`, `custom_sites`, `system_settings`, `media_assets` | Command Core, CRM, Scheduler, OpSec, Setup |\n| `amae_debt.db` | `contracts`, `installments`, `collateral_vault`, `penalties`, `punishments` | Sovereign Debt Contracts & Escrow Vault |\n| `amae_gladiator_arena.db` | `arena_matches`, `arena_combatants`, `arena_tributes`, `arena_spectators` | Gladiator Tribute Arena |\n| `amae_debt_syndicate.db` | `syndicate_pools`, `syndicate_loans`, `syndicate_stakes`, `syndicate_repayments` | P2P Submissive Usury Lending |\n| `amae_debt_auction.db` | `auction_listings`, `auction_bids`, `auction_settlements` | Defaulted Debt Auction Block |\n| `amae_web3.db` | `smart_vaults`, `vault_drips`, `tokenized_bonds`, `altar_tributes` | Web3 Smart Vaults & 3D Altar |\n| `amae_churn_radar.db` | `churn_telemetry`, `churn_scores`, `decay_alerts` | Behavioral Decay & Churn Radar |\n| `amae_churn_reactivator.db` | `reactivation_drips`, `drip_templates`, `drip_executions` | 3-Tier Churn Reactivation Drips |\n| `amae_loyalty_vault.db` | `vip_tiers`, `sub_loyalty`, `loyalty_perks`, `streak_multipliers` | VIP Loyalty Tiers & Perks |\n| `amae_video.db` | `video_jobs`, `synthesis_queue`, `rendered_clips` | Deepfake Video Synthesis |\n| `amae_forensics.db` | `stego_watermarks`, `leak_hashes`, `forensic_penalties` | Forensic Watermarking & Leak Tracing |\n| `amae_homage.db` | `homage_submissions`, `cv_verifications`, `task_approvals` | Submissive Video Homage Validator |\n| `amae_multivariate_copywriter.db` | `copy_campaigns`, `copy_variants`, `variant_impressions` | Multi-Variate Tone A/B Testing |\n| `amae_tone_autotuner.db` | `bandit_arms`, `tone_rewards`, `autotuner_states` | Multi-Armed Bandit Tone Auto-Tuner |\n| `amae_vertical_reel_composer.db` | `reels`, `storyboards`, `audio_stems` | 9:16 Vertical Reel Composer |\n| `amae_social_reel_publisher.db` | `reel_dispatches`, `platform_metrics`, `dispatch_logs` | Social Reel Auto-Publisher |\n| `amae_livestream.db` | `stream_sessions`, `stream_telemetry`, `stream_overlays` | 24/7 Simulcast Broadcaster |\n| `amae_tribute_chat.db` | `chat_messages`, `paid_shouts`, `gatekeeper_rules` | Tribute-to-Speak Chat Gatekeeper |\n| `amae_tip_goals.db` | `tip_goals`, `wheel_punishments`, `milestones` | Tip Goal Ladder & Wheel of Punishment |\n| `amae_whales.db` | `whale_dossiers`, `whale_signals`, `whale_closing_pitches` | Whale Hunter & Infiltration Swarms |\n| `amae_archetypes.db` | `sub_archetypes`, `domme_archetypes`, `matching_weights` | Dominatrix Archetype Matcher |\n| `amae_prospector.db` | `prospect_leads`, `prospect_scrapes`, `intent_tiers` | Autonomous Submissive Prospector |\n| `amae_account_vault.db` | `vault_credentials`, `session_cookies`, `proxy_bindings` | Multi-Site Account Vault |\n| `amae_shadow_fingerprint.db` | `browser_fingerprints`, `canvas_noise`, `cadence_profiles` | Anti-Detection Fingerprints |\n| `amae_shadow_swarm.db` | `shadow_accounts`, `warming_schedules`, `health_scores` | Shadow Swarm Warming Hub |\n| `amae_telephony_bridge.db` | `telephony_calls`, `metered_balances`, `call_recordings` | Pay-Per-Minute Toll Telephony |\n| `amae_ivr_voice_cloner.db` | `ivr_menus`, `voice_prompts`, `cloned_stems` | IVR & Cloned Voice Studio |\n| `amae_crisis_interceptor.db` | `crisis_incidents`, `harm_evaluations`, `safeword_events` | Safety & Crisis Interceptor |\n| `amae_compliance_matrix.db` | `compliance_rules`, `audit_logs`, `mitigation_strategies` | Platform & Payment Compliance |\n| `amae_creator_wellbeing.db` | `burnout_logs`, `workflow_timers`, `away_mode_state` | Creator Well-Being & 15-Min Workflow |\n| `amae_privacy_firewall.db` | `salt_rotations`, `anonymized_hashes`, `pii_purge_logs` | Privacy Firewall & Daily Salt Vault |\n\n---\n\n### Global Top Bar, SSE Telemetry & Quick Stat Pills\n\nAt the top of every dashboard view:\n1. **Live Event Ticker Banner (`#liveTicker`)**:\n   - Displays real-time SSE messages streamed from `/api/v2/events/stream`.\n   - Flashes animated pulsing green indicators on live tributes, incoming leads, scraper hits, and completed video renders.\n2. **Active Persona Selector (`#personaSelect`)**:\n   - Dynamic dropdown containing all persona profiles configured in `personas`.\n   - Changing the selection immediately switches the global dominant persona, system tone rules, boundary set, payment links, and tribute minimums.\n3. **Top Quick Stat Pills**:\n   - **Total Tribute (`#topTotalTribute`)**: Live sum of verified payments.\n   - **Users (`#topTotalUsers`)**: Count of all indexed submissives.\n   - **Gatekeep Rate (`#topGatekeepRate`)**: Percentage of non-paying sessions currently locked.\n\n---\n\n### Ergonomic Left Sidebar Navigation Controls\n\n1. **Draggable Horizontal Resizing (`#sidebarResizer`)**:\n   - Click and drag the highlighted border between **180px and 450px**. Width preference is stored in browser `localStorage`.\n2. **Collapsible Accordion Groups (`[data-group]`)**:\n   - Click any section header (`Command Core`, `Sovereign Financials`, `Synthetic Media`, `Intelligence & Swarms`, `Safety & Infrastructure`, `System Control & Tools`) to expand or collapse.\n3. **Mini-Rail Mode Toggle (`#sidebarToggleBtn`)**:\n   - Collapses sidebar into a compact icon rail to maximize screen real estate on laptops and tablets.\n4. **Custom Menu Visibility Manager**:\n   - Individual menu items can be enabled or disabled under **⚙️ System Setup** (`#setuppage`).\n\n---\n\n### Global Keyboard Shortcuts Matrix\n\n| Shortcut Key | Action Performed | Scope |\n| :--- | :--- | :--- |\n| `Esc` | Closes any open modal dialog, editor drawer, or SQL console | Global |\n| `Ctrl + /` (or `Cmd + /`) | Instantly opens / closes the **Interactive SQL Console** | Global |\n| `Ctrl + K` (or `Cmd + K`) | Switches to **User Guide & Docs** and focuses the search input | Global |\n| `Ctrl + Shift + L` | Quick switches directly to **System Logs** (`#logs`) | Global |\n| `Ctrl + Shift + D` | Quick switches directly to **Database Explorer** (`#databaseditor`) | Global |\n\n---\n\n## 2. Command Core (Tabs 1–3)\n\n### Tab 1: Overview Metrics (`#overview`)\n\n#### Purpose & Capabilities\nThe **Overview Metrics** page is the command cockpit of AMAE, delivering real-time telemetry across revenue streams, pipeline throughput, predictive forecasts, and submissive LTV tiers.\n\n```mermaid\ngraph LR\n    API_M[\"/api/v2/metrics\"] --> HUD[\"Top 4 Metric Cards\"]\n    API_F[\"/api/v2/analytics/30d-forecast\"] --> FORECAST[\"30-Day Revenue Forecast\"]\n    API_T[\"/api/v2/users/top-spenders\"] --> LEADER[\"LTV Leaderboard Table\"]\n    API_E[\"/api/v2/email/recent\"] --> OTP_TAB[\"Recent Verification Events\"]\n```\n\n#### Detailed Breakdown of UI Components:\n\n1. **Top 4 Sovereign Metric Cards**:\n   - **Total Tributes Extracted (`#totalTributeValue`)**:\n     - *Meaning*: Cumulative financial sum of all verified tribute transactions across all payment processors and crypto chains.\n     - *Formula*: `SELECT COALESCE(SUM(amount), 0.0) FROM tributes WHERE status = 'confirmed';`\n     - *Backend Endpoint*: `GET /api/v2/metrics`\n     - *Data Source*: `amae_memory.db` `tributes` table.\n   - **Submissive Profiles Interacted (`#totalUsersValue`)**:\n     - *Meaning*: Total distinct submissive profiles created or discovered across social platforms, chats, and scrapers.\n     - *Formula*: `SELECT COUNT(*) FROM users;`\n     - *Backend Endpoint*: `GET /api/v2/metrics`\n     - *Data Source*: `amae_memory.db` `users` table.\n   - **Autonomous Pipeline Messages (`#totalMessagesValue`)**:\n     - *Meaning*: Total count of sanitized, AI-generated dominant responses dispatched to submissives.\n     - *Formula*: `SELECT COUNT(*) FROM conversations WHERE sender = 'persona';`\n     - *Backend Endpoint*: `GET /api/v2/metrics`\n     - *Data Source*: `amae_memory.db` `conversations` table.\n   - **Sovereign Gatekeep Rate (`#gatekeepRateValue`)**:\n     - *Meaning*: Proportion of interactions where non-tributed submissives were locked behind the payment barrier.\n     - *Formula*: `(gatekept_sessions / total_sessions) * 100.0`\n     - *Backend Endpoint*: `GET /api/v2/metrics`\n     - *Data Source*: `amae_memory.db` `users` & `system_logs`.\n\n2. **Autonomous 3-Agent Triad Pipeline Topology HUD**:\n   - Visual step-by-step indicator showing the live state of Agent 1 (Triage Gatekeeper), Agent 2 (Psych Engine & Vector Memory), Agent 3 (OpSec Firewall), and the Sovereign Settlement Vault.\n\n3. **30-Day Predictive Financial Revenue Forecast**:\n   - **Daily Velocity Badge (`#forecastVelocityBadge`)**: Displays average daily tribute velocity over the past 7 days (`$X.XX/day`).\n   - **30D Projection Card (`#forecast30dValue`)**: Calculates 30-day forward revenue based on velocity + whale recurring commitments.\n     - *Formula*: `30D Forecast = (7_day_average_daily_tribute * 30) + (whale_count * avg_whale_monthly_ltv)`\n   - **Whale Subs (>$500) (`#tierWhalesValue`)**: Count of high-net-worth submissives who have sent ≥ $500 lifetime tribute.\n   - **High-Potential ($100–$500) (`#tierHighValue`)**: Count of mid-tier submissives primed for escalation.\n   - **Standard / Free (`#tierStdValue`)**: Count of unpaid or low-tribute submissives.\n   - *Backend Endpoint*: `GET /api/v2/analytics/30d-forecast`\n\n4. **Top Submissive Spenders (LTV Leaderboard Table) (`#topSpendersTable`)**:\n   - *Columns*:\n     - `Submissive`: Username / Handle with profile link.\n     - `Platform`: Source network badge (Twitter/X, Reddit, Fansly, Web3, CashApp).\n     - `Tier`: Financial status (`Leviathan Whale`, `Whale`, `Dolphin`, `Standard`).\n     - `Total Tribute`: Exact settled amount formatted as currency (`$X,XXX.XX`).\n     - `Detected Kinks`: Badges for detected kinks (`#debt`, `#chastity`, `#drain`, `#humiliation`).\n   - *Data Source*: `amae_memory.db` `users` joined with `tributes`.\n\n5. **Recent Verification Stream & OTP Events Table (`#emailsOverviewTable`)**:\n   - *Columns*: `Recipient`, `Subject`, `Code / OTP` (highlighted 6-digit regex code), `Link` (clickable activation URL).\n   - *Backend Endpoint*: `GET /api/v2/email/recent`\n   - *Data Source*: `amae_memory.db` `account_signups` and temporary email forwarder logs.\n\n---\n\n### Tab 2: Live CRM & Chat (`#crm`)\n\n#### Purpose & Capabilities\nThe **Live CRM & Chat** tab provides real-time monitoring and manual intervention controls for ongoing conversations between AI personas and submissives.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Active Sessions Sidebar (`#crmSessionsList`)**:\n   - Lists submissives with active conversation sessions.\n   - Shows avatar, handle, platform icon, last active timestamp, tribute status badge (`PAID` vs `GATEKEPT`), and unread message indicators.\n   - *Backend Endpoint*: `GET /api/v2/crm/sessions`\n\n2. **Live Conversation Inspector & Chat Window**:\n   - **Header Bar**: Displays target submissive handle, platform source, verified tribute amount pill, and current psychological funnel stage badge (`Stage 1` to `Stage 4`).\n   - **Action Controls**:\n     - `+ Record $50 Tribute` (`#btnManualTribute`): Instantly increments the user's tribute ledger by $50.00 (`POST /tribute`), immediately unlocking gatekept sessions.\n     - `🔒 Gatekeep Session`: Manually locks the conversation and triggers an immediate commanding payment demand.\n     - `⚡ Demand Tribute`: Dispatches an authoritative payment demand tailored to the user's specific detected kinks.\n   - **Message Stream Container (`#crmMessagesContainer`)**:\n     - Visualizes submissive messages alongside agent deliberation blocks.\n     - Displays **Agent 1 Triage decision**, **Agent 2 psychological rationale & vector memories retrieved**, and **Agent 3 OpSec inspection stamp**.\n   - **Input Box & Dispatch (`#crmMessageInput`, `#btnSendMessage`)**:\n     - Allows human operators to send manual dominant replies or prompt the AI engine to generate an immediate turn.\n     - *Backend Endpoint*: `POST /chat/stream`\n\n3. **Submissive Intelligence Dossier Panel**:\n   - Displays real-time metadata from vector memory:\n     - **Psychological Archetype**: E.g. *Financial Slave*, *Chastity Paypig*, *Silent Cash Cow*.\n     - **Funnel Stage**: Current position in the 4-stage pipeline.\n     - **Lifetime Tribute ($)**: Total revenue extracted.\n     - **Outstanding Debt ($)**: Active unfulfilled debt contract balance.\n     - **Vulnerability Score**: 0–100 psychological compliance rating calculated by `amae/psychology.py`.\n\n---\n\n### Tab 3: Simulation Playground (`#playground`)\n\n#### Purpose & Capabilities\nThe **Simulation Playground** enables testing and debugging of the entire 3-agent triad pipeline, vector memory, safety filters, and state transformations offline without live network accounts.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Simulation Runner Harness**:\n   - **Button: `🚀 Execute 7-Scenario Simulation` (`#btnRunSimulation`)**:\n     - Triggers the complete 7-scenario integration test harness (`POST /api/v2/simulation/run`).\n   - **The 7 Automated Test Scenarios**:\n     1. *Scenario 1: Unpaid First-Contact Submissive*: Submissive says \"Hello mistress\". Agent 1 verifies $0 tribute balance, flags `GATEKEEP`, and dispatches payment demand with Throne/Wishtender links.\n     2. *Scenario 2: Paid Submissive*: Submissive submits $100 tribute. Agent 1 detects verified payment, allows pipeline advancement. Agent 2 moves submissive to Funnel Stage 2. Agent 3 approves draft.\n     3. *Scenario 3: Whale Submissive Infiltration*: High-net-worth lead ($1,500 budget) arrives. Agent 2 selects ultra-dominant luxury tone and establishes structured recurring tribute expectations.\n     4. *Scenario 4: OpSec Leak & PII Interception*: Submissive asks for phone number and personal address. Agent 3 intercepts PII violation, redacts response, and issues dominant deflection.\n     5. *Scenario 5: Humiliation & Debt Submission*: Submissive requests debt servitude. Agent 2 generates formal legalistic submission terms.\n     6. *Scenario 6: Disciplinary Escalation*: Submissive misses payment date. Debt enforcement engine applies 15% compounding penalty and issues disciplinary task.\n     7. *Scenario 7: Multi-Platform Lead Scraping*: Scraper harvests test prospect leads from X and Reddit, scoring intent and assigning initial kink tags.\n2. **Terminal Output Log Viewer (`#simulationLogConsole`)**:\n   - Color-coded stream displaying agent execution logs, decision states, regex validation passes, and memory mutations.\n\n---\n\n## 3. Sovereign Financials (Tabs 4–7)\n\n### Tab 4: Debt Contracts & Vault (`#contracts`)\n\n#### Purpose & Capabilities\nThe **Autonomous Debt Contracts & Sovereign Vault** page manages legally-styled Findom debt agreements, automated payment installments, digital cryptographic signatures, compounding late fees, and AES-256 encrypted collateral escrow.\n\n```mermaid\nflowchart TD\n    FORM[\"Issue Debt Contract Form\"] --> GEN[\"Contract Generator Engine\"]\n    GEN --> DB_DEBT[(\"amae_debt.db\")]\n    DB_DEBT --> INST[\"Installment Engine: Weekly/Bi-Weekly/Monthly\"]\n    DB_DEBT --> SIGN[\"Cryptographic Signature Block\"]\n    SUB_COL[\"Submissive Collateral Payload\"] --> VAULT[\"Collateral Vault: AES-256-GCM\"]\n    VAULT --> HASH[\"Compute SHA-256 Digest\"]\n    HASH --> DB_DEBT\n    PAY[\"Incoming Tribute Payment\"] --> RECON[\"Reconcile Installments\"]\n    DEFAULT[\"Missed Due Date\"] --> PENALTY[\"Enforce 15% APR Penalty & Forfeit\"]\n```\n\n#### Detailed Breakdown of UI Components:\n\n1. **Top 4 Sovereign Debt Metric Cards**:\n   - **TOTAL CONTRACTED (`#totalContractedMetric`)**:\n     - *Meaning*: Cumulative principal obligation agreed across all registered debt contracts.\n     - *Formula*: `SELECT COALESCE(SUM(principal_amount), 0.0) FROM contracts WHERE status != 'cancelled';`\n     - *Backend Endpoint*: `GET /api/v9/contracts/analytics`\n     - *Data Source*: `amae_debt.db` `contracts` table.\n   - **ACTIVE RECEIVABLES (`#activeReceivablesMetric`)**:\n     - *Meaning*: Current outstanding unpaid debt principal plus accrued late penalties.\n     - *Formula*: `SELECT COALESCE(SUM(remaining_balance), 0.0) FROM contracts WHERE status IN ('active', 'signed', 'defaulted');`\n     - *Backend Endpoint*: `GET /api/v9/contracts/analytics`\n     - *Data Source*: `amae_debt.db` `contracts` table.\n   - **COLLECTED REVENUE (`#debtCollectedMetric`)**:\n     - *Meaning*: Total debt installment revenue collected and settled to date.\n     - *Formula*: `SELECT COALESCE(SUM(principal_amount - remaining_balance), 0.0) FROM contracts;`\n     - *Backend Endpoint*: `GET /api/v9/contracts/analytics`\n     - *Data Source*: `amae_debt.db` `contracts` table.\n   - **COLLECTION RATE (`#debtCollectionRateMetric`)**:\n     - *Meaning*: Percentage of contracted principal successfully collected.\n     - *Formula*: `(COLLECTED REVENUE / TOTAL CONTRACTED) * 100.0`\n     - *Backend Endpoint*: `GET /api/v9/contracts/analytics`\n     - *Data Source*: Computed from `amae_debt.db`.\n\n2. **Issue New Findom Debt Contract Form (`#debtContractForm`)**:\n   - **Input Fields**:\n     - `Submissive User ID / Handle` (`#contractUserIdInput`): Target submissive's username or user ID (e.g. `sub_whale_44`).\n     - `Principal Debt Obligation ($ USD)` (`#contractAmountInput`): Monetary debt principal (Min: $50.00, Step: $50.00, e.g. `$5,000`).\n     - `Installment Schedule` (`#contractCadenceInput`): Payment frequency:\n       - `Weekly (4 installments)` — 25% of principal due every 7 days.\n       - `Bi-Weekly (6 installments)` — ~16.67% of principal due every 14 days.\n       - `Monthly (12 installments)` — ~8.33% of principal due every 30 days.\n     - `Late Penalty APR (%)` (`#contractPenaltyInput`): Compounding penalty interest applied if an installment is overdue (5%–50%, default: 15%).\n   - **Action: Button `Generate Binding Contract`**:\n     - Submits `POST /api/v9/contracts/create`.\n     - *What Happens*:\n       1. Generates unique contract ID (e.g. `DCT-A8F9-2026`).\n       2. Creates formal contractual terms incorporating persona identity, submissive obligations, payment deadlines, and disciplinary terms.\n       3. Invokes `amae/installment_engine.py` to calculate installment dates and amortized payments.\n       4. Persists the contract and installment schedule to `amae_debt.db`.\n       5. Triggers an SSE event on `/api/v2/events/stream` and refreshes the debt ledger.\n\n3. **Sovereign Collateral Escrow Vault Table (`#collateralTable`)**:\n   - **Purpose**: Displays collateral pledged by submissives to secure their debt obligations.\n   - **Columns**:\n     - `ID`: Unique collateral UUID (e.g. `COL-9402`).\n     - `Type`: Collateral category (`Government ID Scan`, `Private Confession`, `Crypto Private Key`, `Social Account Credential`, `Sensitive Photo/Video`).\n     - `Title`: Description of the item.\n     - `Status`: Escrow state:\n       - `<span class=\"badge badge-warning\">Escrowed</span>`: Safely encrypted in vault.\n       - `<span class=\"badge badge-danger\">Forfeited</span>`: Seized due to contract default.\n       - `<span class=\"badge badge-success\">Zeroized</span>`: Permanently destroyed upon full loan repayment.\n     - `SHA-256 Hash`: Cryptographic digest for tamper verification.\n   - **Vault Operations Under the Hood**:\n     - *Encryption*: Payloads are encrypted using **AES-256-GCM** with a master vault key derived from environment secrets (`amae/collateral_vault.py`).\n     - *Deposit Action*: `POST /api/v9/contracts/{id}/collateral/deposit` encrypts and stores the file.\n     - *Payoff Zeroization*: `POST /api/v9/contracts/collateral/{id}/destroy` overwrites the encrypted payload with cryptographically random bytes (zeroization) and issues a digital Destruction Certificate.\n     - *Default Forfeiture*: `POST /api/v9/contracts/collateral/{id}/forfeit` flags collateral for disciplinary action.\n\n4. **Active Findom Debt Ledger Table (`#debtContractsTable`)**:\n   - **Columns**: `Contract ID`, `Submissive`, `Principal`, `Remaining Balance`, `Status`, `Signed By`, `Actions`.\n   - **Row Actions**:\n     - `📄 View Agreement`: Renders the agreement in styled legalistic HTML (`GET /api/v9/contracts/{id}/render`).\n     - `✍️ Digital Sign`: Executes cryptographic digital signature (`POST /api/v9/contracts/{id}/sign`).\n     - `💳 Record Payment`: Reconciles incoming installment payments (`POST /api/v9/contracts/{id}/record-payment`).\n     - `⚡ Escalate / Penalize`: Manually triggers disciplinary penalty evaluation (`POST /api/v9/contracts/{id}/escalate`).\n     - `👑 Disciplinary Task`: Generates and assigns an obedience punishment task (`POST /api/v9/contracts/{id}/punishment-task`).\n\n---\n\n### Tab 5: Debt Syndicates & Gladiator Arena (`#gladiatorarena`)\n\n#### Purpose & Capabilities\nCombines multi-submissive tribute battles, P2P submissive lending syndicates, and defaulted debt auctions into an interactive competitive arena.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Live Gladiator Tribute Arena**:\n   - **Match Setup**: Set match title (`#arenaMatchTitle`), entry fee stake (`#arenaEntryFee`), and target combatant IDs.\n   - **Buttons**:\n     - `Join Match` (`#btnArenaJoinCombatant`): Registers submissives into the active match bracket (`POST /api/v10/arena/match`).\n     - `⚡ +$50 Tribute Burst` (`#btnArenaTributeBurst`): Injects an instant $50 burst to boost a combatant's health meter (`POST /api/v10/arena/burst`).\n     - `👑 Crown Victor` (`#btnResolveArenaMatch`): Resolves the match, pays out dominant share, and executes public humiliation decrees on the losing submissive (`POST /api/v10/arena/resolve`).\n\n2. **Submissive Debt Syndicate & Usury**:\n   - Allows liquidity provider (LP) submissives to stake capital (`#lpStakerName`, `#lpStakeAmount`) to fund usurious loans for other submissives (`#syndicateBorrowerName`, `#syndicateLoanAmount`).\n   - *Table `syndicateLoansTable`*: Displays `Borrower`, `Balance`, `Interest`, `Status`, `Action`.\n   - *Data Source*: `amae_debt_syndicate.db`.\n\n3. **Defaulted Debt Contract Auction Block**:\n   - Insolvent submissive debt obligations are listed for public auction where other dominatrices or submissives can buy out debt contracts at a discount.\n   - *Table `debtAuctionListingsTable`*: Displays `Insolvent Sub`, `Original Debt`, `High Bid`, `Status`, `Action`.\n   - *Data Source*: `amae_debt_auction.db`.\n\n4. **Whale Sponsorships & Sudden Death Liquidations**:\n   - *Table `suddenDeathLiquidationsTable`*: Displays `Losing Sub`, `Seized Collateral`, `Decree`, `Time`.\n\n---\n\n### Tab 6: Web3 Shrine & Shadow Swarm (`#web3shrine`)\n\n#### Purpose & Capabilities\nManages non-custodial smart contract escrow vaults on Solana and EVM chains, automated micro-drip streams, tokenized servitude NFT bonds, 3D WebXR digital altars, and hierarchical affiliate recruiting.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Top 6 Metric Cards**:\n   - `TOTAL VALUE LOCKED (TVL)` (`#tvlMetric`): Sum of all on-chain smart vault collateral.\n   - `STREAMED TRIBUTES` (`#streamedTributesMetric`): Cumulative micro-drip tribute inflow.\n   - `TOKENIZED BONDS` (`#tokenizedBondsMetric`): Active tokenized debt agreements on-chain.\n   - `ALTAR TRIBUTES` (`#altarTributesMetric`): Gross tribute collected via the 3D WebXR altar.\n   - `SHADOW SWARM` (`#shadowSwarmMetric`): Count of prospect leads identified by shadow scouts.\n   - `COMMISSIONS PAID` (`#commissionsPaidMetric`): Total referral commissions paid to affiliates.\n\n2. **Deploy Time-Locked Web3 Smart Vault Form (`#web3VaultForm`)**:\n   - **Inputs**:\n     - `Submissive Wallet Address` (`#vaultSubAddressInput`): E.g. `0x71C...` or Solana base58 address.\n     - `Blockchain Network` (`#vaultChainInput`): `Solana`, `Ethereum`, `Polygon`, `Arbitrum`.\n     - `Initial Locked Collateral ($ USD)` (`#vaultDepositInput`): E.g. `$2,500`.\n     - `Lockup Duration (Days)` (`#vaultLockDaysInput`): Number of days funds remain time-locked.\n     - `Daily Tribute Drip ($ USD)` (`#vaultDailyDripInput`): Daily automated stream rate to Dominatrix wallet.\n   - **Action**: `Deploy Smart Vault & Initiate Stream` (`POST /api/v11/web3/vault/deploy`).\n\n3. **WebXR 3D Altar Tribute Sanctuary**:\n   - Interactive 3D WebGL sanctuary rendered with three.js, featuring dynamic lighting, digital candles, and spatial acoustic reverb.\n\n4. **AI Shadow Recruiter Lead Scout (`#shadowScoutForm`)**:\n   - **Inputs**: Prospect Social Handle (`#scoutHandleInput`), Observed Whale Spend (`#scoutSpendInput`), Prospect Bio Signals (`#scoutBioInput`).\n   - **Action**: `Scout & Generate Infiltration Pitch` (`POST /api/v11/shadow/scout`).\n\n5. **Hierarchical Affiliate Referral Matrix Table (`#affiliatesTable`)**:\n   - *Columns*: `User ID`, `Wallet`, `Ref Code`, `Tier 1 Count`, `Commissions Earned`.\n\n---\n\n### Tab 7: Churn Radar & VIP Loyalty (`#churnloyalty`)\n\n#### Purpose & Capabilities\nMonitors submissive engagement decay, calculates churn risk scores, triggers 3-tier automated psychological re-activation drips, and manages VIP loyalty multipliers.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Behavioral Decay & Churn Risk Radar Form (`#recordChurnTelemetryForm`)**:\n   - **Inputs**: Sub Name / Handle (`#churnSubNameInput`), Days Idle (`#churnDaysIdleInput`), Message Latency (`#churnLatencyInput`), Monthly Spend ($) (`#churnSpendInput`).\n   - **Action**: `⚡ Ingest Telemetry & Evaluate Churn Score` (`POST /api/v18/churn/evaluate`).\n   - *Table `highRiskSubsTable`*: `Sub Name`, `Risk Score` (0–100), `Risk Tier` (`Low`, `Medium`, `High`, `Critical`), `At-Risk ($)`, `Prescribed Action`.\n\n2. **Automated 3-Tier Churn Re-Activation Drips Form (`#triggerReactivationDripForm`)**:\n   - **Inputs**: Submissive Target (`#dripSubNameInput`), Drip Tier Escalation (`#dripTierInput`):\n     - *Tier 1: Velvet Reminder* — Elegant, subtle reminder of dominant expectations.\n     - *Tier 2: Cold Dismissal* — Threat of total abandonment and loss of attention.\n     - *Tier 3: Existential Urgency* — Final disciplinary demand with immediate deadline.\n   - **Action**: `🚀 Dispatch Psychological Drip Sequence` (`POST /api/v18/churn/reactivate`).\n\n3. **VIP Loyalty Tiers & Retention Perks Form (`#evaluateLoyaltyTierForm`)**:\n   - **Inputs**: Submissive Handle (`#loyaltySubNameInput`), Lifetime Tribute ($) (`#loyaltyLifetimeTributeInput`).\n   - **Action**: `💎 Calculate VIP Loyalty Tier & Multiplier` (`POST /api/v18/loyalty/evaluate`).\n   - *Table `vipLoyaltyLeaderboardTable`*: `Submissive`, `VIP Tier` (`Bronze`, `Silver`, `Gold`, `Platinum`, `Diamond Sovereign`), `Streak Mult.`, `Lifetime Tribute`, `Active Perks`.\n\n---\n\n## 4. Synthetic Media (Tabs 8–12)\n\n### Tab 8: Persona Studio (`#personas`)\n\n#### Purpose & Capabilities\nProvides visual and automated AI persona creation, prompt engineering, boundary definitions, and active identity switching.\n\n#### Detailed Breakdown of UI Components:\n\n1. **AI Persona Generator Form (`#generatorForm`)**:\n   - **Inputs**: Archetype Prompt (`#archetypePrompt`): Description of the desired persona (e.g. *\"Ultra-wealthy Manhattan heiress with cold condescension and financial humiliation specialty\"*).\n   - **Buttons**:\n     - `✨ Generate Persona Profile` (`#btnGeneratePersona`): Calls Gemini API to generate complete persona config (name, tone guidelines, boundary rules, tribute minimums, bio, payment templates).\n     - `🎲 Fill Random Elite Prompt` (`#btnRandomElitePersona`): Injects high-performing findom prompt templates.\n     - `Save to Enterprise Database` (`#btnSaveGenerated`): Persists persona profile to `amae_memory.db` `personas` table (`POST /api/v2/personas`).\n\n2. **Active Persona Catalog Container (`#personaCatalogContainer`)**:\n   - Renders cards for all stored personas with one-click activation buttons (`PUT /api/v2/personas/{id}/activate`).\n\n---\n\n### Tab 9: Media & Voice Studio (`#media`)\n\n#### Purpose & Capabilities\nConfigures Fooocus / Gradio photorealistic image generation, SD WebUI, synthetic voice notes, and Gemini Omni video synthesis.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Image Generator Engine & Gradio API Config (`#gradioConfigForm`)**:\n   - **Inputs**:\n     - `Image Generator Provider` (`#imageGeneratorProviderSelect`): `Fooocus Gradio API`, `Stable Diffusion WebUI`, `Gemini Imagen 3`, `Local Pillow Fallback`.\n     - `Gradio API Address / URL` (`#gradioApiUrlInput`): E.g. `http://127.0.0.1:7865/` or Gradio Live Share URL.\n   - **Button**: `💾 Save & Test Connection` (`#btnSaveGradioConfig`).\n\n2. **Visual Asset & Photo Generator (`#imageGenForm`)**:\n   - **Inputs**: Preset theme (`#selectedPreset` - Penthouse Luxury, Designer Stiletto, High-Society Gala, Private Jet), Visual Strategy Prompt (`#imagePromptInput`).\n   - **Buttons**: `✨ Suggest Image Description` (`#btnSuggestImagePrompt`), `Generate Visual Asset` (`#btnSubmitImageGen`).\n\n3. **Voice Note Audio Script Generator (`#audioGenForm`)**:\n   - **Inputs**: Voice Tone Modulation (`#audioToneSelect` - Whispering Command, Cold Dismissal, Seductive Demand), Command Script Text (`#audioTextInput`).\n   - **Buttons**: `✨ Suggest Voice Script` (`#btnSuggestAudioScript`), `Generate WAV Voice Note` (`#btnSubmitAudioGen`).\n\n4. **Gemini Omni Flash Video Generator (`#videoGenForm`)**:\n   - **Inputs**: Promotional Video Prompt (`#videoPromptInput`).\n   - **Button**: `Generate Promotional Video` (`#btnSubmitVideoGen`).\n\n5. **Persona Media Gallery (`#mediaGalleryContainer`)**:\n   - Grid displaying all synthesized images, audio clips, and video files with download and inspect options.\n   - **Button**: `⚡ Generate Starting Gallery (12 Assets)` (`#btnGenerateStartingGallery`).\n\n---\n\n### Tab 10: Deepfake Video & Bespoke Drips (`#deepfakevideo`)\n\n#### Purpose & Capabilities\nGenerates personalized humiliation videos, applies invisible steganographic watermarks, deploys pay-per-view (PPV) video teasers, and verifies submissive homage videos via computer vision.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Synthesize Bespoke Humiliation Video Form (`#videoSynthesisForm`)**:\n   - **Inputs**: Sub ID & Screen Name (`#videoSubIdInput`, `#videoSubNameInput`), Outstanding Debt ($) (`#videoDebtInput`), Humiliation Intensity Tier (`#videoTierInput` - Mild, Intense, Extreme), Voice Profile (`#videoVoiceInput`), Custom Directives (`#videoDirectivesInput`).\n   - **Action**: `Synthesize Bespoke Video & Neural Lip-Sync` (`POST /api/v12/video/synthesize`).\n\n2. **Video Studio Monitor & Steganographic Inspector**:\n   - Video player with embedded invisible forensic watermark (`#btnEmbedWatermarkAction`).\n\n3. **Deploy PPV Video Teaser Paywall Form (`#ppvDripForm`)**:\n   - **Inputs**: Drip Job ID (`#dripJobIdInput`), Price ($) (`#dripPriceInput`).\n   - **Action**: `Deploy PPV Drip with Dynamic Blur` (`POST /api/v12/video/ppv`).\n\n4. **Forensic Leak Tracing & Submissive Attribution Form (`#leakDetectForm`)**:\n   - **Inputs**: Leaked Clip Signature / SHA-256 Hash (`#leakHashInput`), Discovery Platform (`#leakPlatformInput`), Penalty ($) (`#leakPenaltyInput`).\n   - **Action**: `Trace Leak & Enforce Disciplinary Penalty` (`POST /api/v12/video/leak/trace`).\n\n5. **Submissive Video Homage & Task Verification Table (`#homageTable`)**:\n   - *Columns*: `Submission ID`, `Sub ID`, `Task Type`, `Compliance` (Score %), `Status`, `Action` (Approve / Reject).\n   - *Backend Endpoint*: `GET /api/v12/homage/submissions` & `POST /api/v12/homage/verify`.\n\n---\n\n### Tab 11: Tone A/B & 9:16 Reel Studio (`#reelstudio`)\n\n#### Purpose & Capabilities\nProvides multi-variate psychological copywriting, multi-armed bandit tone optimization, automated 9:16 vertical video composition, and multi-platform reel publishing.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Psychological Tone A/B Copywriting Workbench (`#createMultivariateCampaignForm`)**:\n   - **Inputs**: Campaign Name (`#campaignNameInput`), Target Fetish (`#campaignFetishInput`).\n   - **Action**: `⚡ Generate 3 Psychological Variants (Imperative/Hypnotic/Aristocratic)` (`POST /api/v17/copywriting/generate`).\n\n2. **Multi-Armed Bandit Tone Auto-Tuner (`#selectAutotunerVariantForm`)**:\n   - **Inputs**: Submissive Archetype (`#autotunerArchetypeInput`), Submissive ID (`#autotunerSubId`).\n   - **Action**: `🎰 Select Resonance Tone Variant` (`POST /api/v17/autotuner/select`).\n   - *Table `variantLeaderboardTable`*: `Tone Vector`, `Impressions`, `Conversions`, `CVR (%)`, `Revenue ($)`.\n\n3. **Autonomous Vertical 9:16 Reel Composer (`#composeVerticalReelForm`)**:\n   - **Inputs**: Reel Title (`#reelTitleInput`), Audio Stem (`#reelAudioTrackInput`).\n   - **Action**: `🎬 Storyboard & Render 9:16 Video Reel` (`POST /api/v17/reel/compose`).\n\n4. **Multi-Platform Social Reel Auto-Publisher (`#scheduleReelDispatchForm`)**:\n   - **Inputs**: Platform (`#dispatchPlatform` - TikTok, IG Reels, YouTube Shorts, Twitter/X), Hashtags (`#dispatchHashtags`), Caption Text (`#dispatchCaption`).\n   - **Action**: `📡 Queue for Peak Engagement Dispatch` (`POST /api/v17/reel/dispatch`).\n   - *Table `socialReelScheduleTable`*: `Platform`, `Caption`, `Views`, `Clicks`, `Status`.\n\n---\n\n### Tab 12: 24/7 Livestream & Live Chat (`#livestreamstudio`)\n\n#### Purpose & Capabilities\nManages 24/7 autonomous RTMP simulcasting, tribute-to-speak live chatroom gatekeeping, tip goal ladders, and spinning punishment wheels.\n\n#### Detailed Breakdown of UI Components:\n\n1. **24/7 Simulcast Live Broadcaster Form (`#startStreamForm`)**:\n   - **Inputs**: Broadcast Title (`#streamTitle`), Resolution & FPS (`#streamResolution`), Bitrate (`#streamBitrate`).\n   - **Buttons**: `🔴 Launch 24/7 Stream Simulcast`, `Stop Stream` (`#btnStopStream`) (`POST /api/v13/livestream/start`, `POST /api/v13/livestream/stop`).\n\n2. **Live Tribute-to-Speak Chatroom Gatekeeper (`#sendChatMessageForm`)**:\n   - **Inputs**: Sub Name (`#chatSubName`), Tribute Amount ($) (`#chatTributeAmount`), Message Text (`#chatMessageInput`).\n   - **Button**: `💸 Send Paid Message` (`POST /api/v13/chat/send`).\n\n3. **Active Tip Goal Ladder & Wheel of Punishment**:\n   - Displays dynamic tip progress bars toward community goals.\n   - **Buttons**: `Create $500 Tip Goal` (`#btnCreateTipGoal`), `⚡ Spin Wheel of Punishment` (`#btnSpinWheelPunishment`).\n\n4. **Whale Tribute Leaderboard & Bounties Table (`#whaleLeaderboardTable`)**:\n   - *Columns*: `Rank`, `Sub Name`, `Total Tributed`, `Status`.\n\n---\n\n## 5. Intelligence & Swarms (Tabs 13–16)\n\n### Tab 13: Whale Swarm & Avatar (`#whales`)\n\n#### Purpose & Capabilities\nAutonomous high-net-worth lead hunting, multi-persona tag-team closing strategies, and real-time WebRTC interactive Dominatrix avatar streaming.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Top 4 Metric Cards**: `WHALES INFILTRATED` (`#totalWhalesMetric`), `SWARM REVENUE` (`#swarmRevenueMetric`), `LIVE BATTLE GMV` (`#battleGmvMetric`), `TOTAL V10 PIPELINE` (`#v10TotalPipelineMetric`).\n2. **Whale Intelligence Dossier Scanner (`#whaleHuntForm`)**:\n   - **Inputs**: Target Submissive Handle (`#whaleUsernameInput`), Platform Source (`#whalePlatformInput`), Social Bio / Post Signals (`#whaleBioInput`).\n   - **Action**: `Scan & Profile Whale` (`POST /api/v10/whales/hunt`). Computes estimated net worth, budget ceiling, psychological vulnerabilities, and tailored closing pitches.\n3. **Live Dominatrix Avatar Stream Preview (`#avatarStreamPreview`)**:\n   - WebRTC video stream previewing live neural avatar.\n4. **Discovered Whale Leads Table (`#whalesTable`)**:\n   - *Columns*: `ID`, `Username`, `Platform`, `Tier`, `Est. Net Worth`, `Budget Ceiling`, `Weaknesses`.\n\n---\n\n### Tab 14: Persona Matrix & Account Vault (`#personamatrix`)\n\n#### Purpose & Capabilities\n1-to-1 dominatrix archetype matching, multi-platform lead prospecting across Reddit and X, AI photo creative director, and multi-site credential storage.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Dominatrix Archetype Matcher Studio (`#matchSubmissiveForm`)**:\n   - **Inputs**: Submissive Handle / Name (`#matchSubName`), Bio / Post Content (`#matchSubBio`), Budget & Financial Tier (`#matchBudgetTier`).\n   - **Action**: `🧠 Match to Peak Dominatrix Persona` (`POST /api/v14/archetype/match`).\n2. **Autonomous Submissive Lead Prospector**:\n   - **Buttons**: `🔍 Scan Reddit (r/findom)` (`#btnScanReddit`), `🐦 Scan X (#paypig)` (`#btnScanX`).\n   - *Table `prospectLeadsTable`*: `Platform`, `Handle`, `Intent Tier`, `Kinks`, `Action`.\n3. **AI Photo Creative Director & Aesthetic Prompt Lab (`#generatePhotoConceptsForm`)**:\n   - **Inputs**: Persona Archetype (`#photoArchetypeSelect`), Mood Theme (`#photoMoodTheme`).\n   - **Action**: `✨ Generate Photography Concepts` (`POST /api/v14/photo/concepts`).\n4. **Multi-Site Account & Session Vault (`#addAccountVaultForm`)**:\n   - **Inputs**: Platform (`#vaultPlatform`), Account Username (`#vaultUsername`).\n   - **Action**: `➕ Store & Bind Account Credentials` (`POST /api/v14/vault/account`).\n   - *Table `vaultAccountsTable`*: `Platform`, `Username`, `Proxy`, `Health`, `Action`.\n\n---\n\n### Tab 15: Shadow Swarm & Telephony (`#shadowtelephony`)\n\n#### Purpose & Capabilities\nAnti-detection browser fingerprint randomization, automated shadow account warming lifecycles, metered pay-per-minute toll telephony, and cloned voice IVR synthesis.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Anti-Detection Browser Fingerprint & Human Cadence (`#generateFingerprintForm`)**:\n   - **Inputs**: Shadow Account Identifier (`#fpAccountIdInput`), Keystrokes Simulation Length (`#fpTextLengthInput`).\n   - **Action**: `⚡ Generate Fingerprint & Simulate Human Cadence` (`POST /api/v19/fingerprint/generate`).\n2. **Autonomous Shadow Swarm Warming Hub (`#registerShadowAccountForm`)**:\n   - **Inputs**: Platform (`#swarmPlatformInput`), Account Handle (`#swarmHandleInput`).\n   - **Action**: `🚀 Register into Automated Warming Lifecycle` (`POST /api/v19/shadow/register`).\n   - *Table `shadowSwarmTable`*: `Handle`, `Platform`, `Warming Day`, `Stage` (`Seed`, `Warming`, `Active`, `Harvest`), `Health Score`.\n3. **Pay-Per-Minute Telephony Dial-In Console (`#initiateTelephonyCallForm`)**:\n   - **Inputs**: Submissive Caller (`#telSubNameInput`), Rate ($/min) (`#telRateInput`), Initial Balance ($) (`#telBalanceInput`).\n   - **Action**: `☎️ Connect Metered Toll Session` (`POST /api/v19/telephony/call`).\n4. **Interactive Voice Response (IVR) & Cloned Voice (`#generateIvrPromptForm`)**:\n   - **Inputs**: IVR Menu Title (`#ivrMenuTitleInput`), Speech Prompt Text (`#ivrSpeechTextInput`).\n   - **Action**: `🔊 Synthesize Persona IVR Voice Prompt` (`POST /api/v19/ivr/prompt`).\n\n---\n\n### Tab 16: Content Scheduler (`#scheduler`)\n\n#### Purpose & Capabilities\nAutomated multi-platform social post queue with Gemini AI caption generation and hashtag optimization.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Create & Schedule Promotional Post Form (`#schedulerForm`)**:\n   - **Inputs**: Target Platform (`#schedulePlatform` - Twitter/X, Reddit, Fansly, Instagram), Topic / Theme Prompt (`#scheduleTopicPrompt`), Post Caption Copy (`#scheduleCaptionText`).\n   - **Buttons**: `✨ Generate AI Caption` (`#btnGenerateCaption`), `Queue Scheduled Post` (`POST /api/v2/posts/schedule`).\n2. **Scheduled Post Queue Table (`#scheduledPostsTable`)**:\n   - *Columns*: `ID`, `Platform`, `Post Caption`, `Scheduled Time`, `Status` (`Pending`, `Published`, `Failed`), `Actions` (`Delete`, `Publish Now`).\n\n---\n\n## 6. Safety & Infrastructure (Tabs 17–19)\n\n### Tab 17: Playwright Automation & Signups (`#playwright`)\n\n#### Purpose & Capabilities\nAutomated browser account registration workers, session cookie persistence, and proxy rotation.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Launch Automated Account Signup Form (`#signupForm`)**:\n   - **Inputs**: Platform (`#signupPlatform` - Fansly, OnlyFans, Loyalfans, Instagram), Target Handle / Username (`#signupUsername`), Verification Email (`#signupEmail`), Proxy Server (`#signupProxy`).\n   - **Action**: `Start Playwright Automation Worker` (`POST /api/v2/playwright/signup`).\n2. **Active Worker Pool Status (`#playwrightWorkersContainer`)**:\n   - Live worker cards showing execution stage, proxy IP, latency, progress logs, and live screenshot snapshots.\n\n---\n\n### Tab 18: Compliance & Safety Studio (`#safetystudio`)\n\n#### Purpose & Capabilities\nDistress detection and crisis intervention, platform and processor compliance auditing, creator burnout monitoring, and privacy firewall management.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Safety & Crisis Interceptor (`#analyzeCrisisMessageForm`)**:\n   - **Inputs**: Test Inbound Message for Distress (`#crisisTestMessage`).\n   - **Action**: `🔍 Analyze Vulnerability & Harm` (`POST /api/v16/crisis/analyze`).\n   - **Button: `🛑 EMERGENCY SAFEWORD` (`#btnEmergencySafeword`)**: Immediately freezes all automated conversations and releases active financial holds (`POST /api/v16/safeword/trigger`).\n   - *Table `crisisIncidentsTable`*: `Submissive`, `Severity`, `Category`, `Status`.\n2. **Platform & Payment Compliance Matrix (`#auditPostComplianceForm`)**:\n   - **Inputs**: Platform (`#compliancePlatform`), Draft Post Text (`#compliancePostContent`).\n   - **Action**: `🛡️ Audit Ban Risk & Get Mitigations` (`POST /api/v16/compliance/audit`).\n3. **Creator Well-Being & 15-Min Workflow (`#recordBurnoutForm`)**:\n   - **Inputs**: Override Rate (%) (`#burnoutOverrideRate`), Active Days (`#burnoutActiveDays`).\n   - **Action**: `📊 Log Burnout Telemetry` (`POST /api/v16/wellbeing/log`).\n   - **Button: `🏖️ Toggle Away Mode` (`#btnToggleAwayMode`)**: Puts system into autonomous cruise control with relaxed response pacing (`POST /api/v16/wellbeing/away-mode`).\n4. **Privacy Firewall & PII Stripper (`#sanitizePrivacyForm`)**:\n   - **Inputs**: Sub Identifier (`#privacySubId`).\n   - **Action**: `🛡️ Test Firewall Hash & Stripper` (`POST /api/v16/privacy/sanitize`).\n   - **Button: `🗑️ Purge Expired PII (7-Day)` (`#btnPurgePii`)**: Cleanses raw identity data older than 7 days (`POST /api/v16/privacy/purge`).\n\n---\n\n### Tab 19: OpSec & Safety Rules (`#settings`)\n\n#### Purpose & Capabilities\nDirect configuration of custom safety rules, forbidden word filters, and payment processor tripwires.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Add Custom OpSec Safety Rule Form (`#opsecRuleForm`)**:\n   - **Inputs**: Rule Type (`#ruleTypeInput` - Regex, Forbidden Word, Processor Blacklist), Pattern / Word (`#rulePatternInput`), Description (`#ruleDescInput`).\n   - **Action**: `Add OpSec Rule` (`POST /api/v2/opsec/rules`).\n2. **Active Custom OpSec Rules Table (`#opsecRulesTable`)**:\n   - *Columns*: `Type`, `Pattern`, `Description`, `Action` (Delete / Toggle).\n\n---\n\n## 7. System Control & Tools (Tabs 20–23)\n\n### Tab 20: System Logs (`#logs`)\n\n#### Purpose & Capabilities\nFull database-backed audit log viewer with live SSE auto-refresh, search, subsystem filtering, and export.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Log Filter Controls**:\n   - `Log Level Filter` (`#logLevelFilter`): `ALL`, `INFO`, `WARNING`, `ERROR`, `DEBUG`, `CRITICAL`.\n   - `Log Source Filter` (`#logSourceFilter`): `ALL`, `pipeline`, `scanner`, `playwright`, `opsec`, `financial`, `server`.\n   - `Keyword Search` (`#logSearchInput`): Live text search across messages and stack traces.\n   - `Row Limit` (`#logLimitSelect`): `50`, `100`, `250`, `500` rows.\n   - `Live Auto-Refresh` (`#logAutoRefreshCheck`): Automatically polls database every 3 seconds.\n2. **Action Buttons**:\n   - `📥 Export TXT`: Downloads raw log file (`GET /api/v2/logs/export?format=txt`).\n   - `📥 Export JSON`: Downloads structured JSON array (`GET /api/v2/logs/export?format=json`).\n   - `🗑️ Clear Logs`: Purges old database records (`DELETE /api/v2/logs`).\n3. **Logs Table (`#logsTable`)**:\n   - *Columns*: `Timestamp`, `Level`, `Source`, `Logger`, `Message / Trace`.\n\n---\n\n### Tab 21: Database Explorer (`#databaseditor`)\n\n#### Purpose & Capabilities\nFull CRUD inspection, search, editing, row insertion, ghost data cleansing, and SQL console for all system SQLite and Postgres tables.\n\n#### Detailed Breakdown of UI Components:\n\n1. **Table Selector & Viewer**:\n   - Choose any database table from the dropdown or sidebar list.\n   - Dynamic schema table (`#dbDataTable`) renders column headers automatically.\n   - Search bar (`#dbSearchInput`) and pagination (`« Prev` `#dbPrevPageBtn`, `Next »` `#dbNextPageBtn`).\n2. **Row Editing & Insertion**:\n   - Click `✏️ Edit` on any row to open the schema-aware modal (`#dbRowEditModal`) and save changes via `PUT /api/v2/db/table/{table}/row/{id}`.\n   - Click `🗑️ Delete` to remove a row via `DELETE /api/v2/db/table/{table}/row/{id}`.\n   - Click `➕ Add New Row` to insert records via `POST /api/v2/db/table/{table}/row`.\n3. **Clean Ghost Data Tool (`#btnCleanGhostData`)**:\n   - Purges phantom simulation records, recalculates user tribute totals from actual payment records, and synchronizes live counters (`POST /api/v2/db/clean_ghost_data`).\n4. **Interactive SQL Console Drawer (`#sqlConsoleDrawer`)**:\n   - Query input area (`#sqlQueryTextarea`), `Execute SQL` button (`#btnExecuteSql`).\n   - Supports `SELECT`, `UPDATE`, `INSERT`, `DELETE` with safety guards against destructive system commands (`POST /api/v2/db/query`).\n\n---\n\n### Tab 22: System Setup (`#setuppage`)\n\n#### Purpose & Capabilities\nCentral platform customizer for menu visibility, target scanner hashtags/subreddits, custom scrape platforms, and Playwright / OpSec diagnostics.\n\n#### Detailed Breakdown of UI Components:\n\n1. **External Service Health HUD (`#serviceStatusContainer`)**:\n   - Real-time connectivity cards for Twitter/X, Reddit, Gemini AI, Playwright, SQLite, and Neon Postgres (`GET /api/v2/setup/service-status`).\n2. **Left Menu Visibility Manager (`#menuVisibilityTogglesContainer`)**:\n   - Toggle switches for all 23 tabs.\n   - Buttons: `Select All`, `Deselect All`, `Save Menu Settings` (`#btnSaveMenuVisibility`).\n3. **Multi-Platform Scanner & Target Hashtags**:\n   - Inputs: Twitter/X Hashtags (`#setupXHashtagsInput`), Reddit Subreddits (`#setupRedditSubsInput`).\n   - Buttons: `Save Scanner Settings`, `⚡ Run Twitter/X Scan`, `⚡ Run Reddit Scan`, `⚡ Run Multi-Platform Scan` (`POST /api/v2/prospector/scan/multi`).\n4. **Custom Target Sites Table (`#customSitesTable`)**:\n   - *Columns*: `Site Name`, `Platform Type`, `Target URL`, `Query / Tags`, `Status`, `Actions` (`⚡ Scan`, `🗑️ Delete`).\n   - Button: `➕ Add Custom Site` (opens `#addSiteModal`).\n5. **Playwright Diagnostics**:\n   - Button: `🔍 Test Playwright Browser` (`#btnTestPlaywright`). Runs Chromium launch verification and displays output (`#playwrightTestOutput`).\n6. **OpSec & Safety Sandbox**:\n   - Input: `#opsecTestInput`, Button: `🛡️ Test OpSec Rules` (`#btnTestOpSec`), Output: `#opsecTestOutput`.\n\n---\n\n### Tab 23: User Guide & Docs (`#userguide`)\n\n#### Purpose & Capabilities\nInteractive in-app documentation viewer rendering this complete manual with instant search and sidebar navigation links (`#guideNavLinks`).\n\n---\n\n## 8. Multi-Processor Payment Webhook Infrastructure\n\nAMAE provides a unified multi-processor webhook endpoint:\n\n```\nPOST /api/v3/tribute/webhook/{provider}\n```\n\n### Supported Providers:\n- `throne` — Throne Wishlist payment events.\n- `wishtender` — Wishtender gift and cash tribute events.\n- `cashapp` — Cash App payment receipt notifications.\n- `crypto` — Native Solana, Ethereum, Polygon, Arbitrum on-chain transfer events.\n- `buymeacoffee` — BuyMeACoffee supporter donations.\n\n### Workflow:\n1. Webhook payload is received and validated against provider signature secrets.\n2. The user's tribute ledger in `users` and `tributes` is immediately updated.\n3. If the user was in a `GATEKEEP` state, the barrier is immediately unlocked.\n4. An event is broadcast on the SSE stream (`/api/v2/events/stream`), updating all connected dashboards in real time.\n\n---\n\n## 9. Comprehensive REST API & WebSocket Reference\n\n| Method | Endpoint Path | Description | Data Store |\n| :--- | :--- | :--- | :--- |\n| `GET` | `/healthz` | Liveness health check | Server |\n| `GET` | `/readiness` | System readiness & DB check | Server |\n| `GET` | `/api/v2/metrics` | Aggregate live dashboard metrics | `amae_memory.db` |\n| `GET` | `/api/v2/events/stream` | Server-Sent Events (SSE) telemetry | Broadcaster |\n| `POST` | `/chat/stream` | Interactive 3-agent chat stream | Pipeline |\n| `POST` | `/tribute` | Record manual tribute | `amae_memory.db` |\n| `POST` | `/api/v3/tribute/webhook/{provider}` | Unified payment webhook | Multi-DB |\n| `GET` | `/api/v9/contracts` | List findom debt contracts | `amae_debt.db` |\n| `GET` | `/api/v9/contracts/analytics` | Debt volume, receivables & rates | `amae_debt.db` |\n| `POST` | `/api/v9/contracts/create` | Issue new binding debt agreement | `amae_debt.db` |\n| `GET` | `/api/v9/contracts/{id}/render` | Render agreement in styled HTML | `amae_debt.db` |\n| `POST` | `/api/v9/contracts/{id}/sign` | Execute cryptographic digital signature | `amae_debt.db` |\n| `POST` | `/api/v9/contracts/{id}/record-payment` | Reconcile installment payment | `amae_debt.db` |\n| `POST` | `/api/v9/contracts/{id}/escalate` | Enforce late penalties & breach | `amae_debt.db` |\n| `POST` | `/api/v9/contracts/{id}/punishment-task` | Issue disciplinary task | `amae_debt.db` |\n| `POST` | `/api/v9/contracts/{id}/collateral/deposit` | Encrypt & deposit collateral (AES-256) | `amae_debt.db` |\n| `POST` | `/api/v9/contracts/collateral/{id}/destroy` | Zeroize collateral & issue cert | `amae_debt.db` |\n| `POST` | `/api/v9/contracts/collateral/{id}/forfeit` | Forfeit collateral on default | `amae_debt.db` |\n| `POST` | `/api/v10/arena/match` | Create / join gladiator match | `amae_gladiator_arena.db` |\n| `POST` | `/api/v10/arena/burst` | +$50 arena tribute burst | `amae_gladiator_arena.db` |\n| `POST` | `/api/v10/arena/resolve` | Crown gladiator victor | `amae_gladiator_arena.db` |\n| `POST` | `/api/v11/web3/vault/deploy` | Deploy time-locked smart vault | `amae_web3.db` |\n| `POST` | `/api/v12/video/synthesize` | Deepfake bespoke video synthesis | `amae_video.db` |\n| `POST` | `/api/v12/video/watermark` | Steganographic leak watermark | `amae_forensics.db` |\n| `POST` | `/api/v13/livestream/start` | Launch 24/7 RTMP simulcast | `amae_livestream.db` |\n| `POST` | `/api/v14/prospector/scan` | Autonomous lead prospecting | `amae_prospector.db` |\n| `POST` | `/api/v16/crisis/analyze` | Distress & harm evaluation | `amae_crisis_interceptor.db` |\n| `POST` | `/api/v16/safeword/trigger` | Emergency safeword shutdown | Multi-DB |\n| `GET` | `/api/v2/logs` | Fetch system audit logs | `amae_memory.db` |\n| `GET` | `/api/v2/db/tables` | List all system tables | All DBs |\n| `POST` | `/api/v2/db/clean_ghost_data` | Purge phantom test data | Multi-DB |\n| `GET` | `/api/v2/docs/guide` | Return complete User Guide | Docs Engine |\n\n---\n\n## 10. Cloud Deployment & 24/7 Autonomous Operation\n\n### Turning on 24/7 Autopilot\n1. Populate your `.env` with live credentials (`GEMINI_API_KEY`, social API tokens, payment webhook secrets).\n2. Set your active persona tone, boundary rules, and minimum tribute threshold ($25.00+).\n3. Connect payment webhooks to `https://your-domain.com/api/v3/tribute/webhook/<provider>`.\n4. Queue promotional content in the **📅 Content Scheduler**.\n5. Launch the daemon under PM2, Docker, or systemd:\n   ```bash\n   python main.py\n   ```\n6. The AMAE engine will autonomously monitor communities, triage inbound leads, enforce gatekeeping, extract tributes, reconcile debt contracts, and stream telemetry 24/7.\n","filename":"USER_GUIDE.md","status":"success"}