VigilDesk - your strategy, our safety layer
===========================================

A local risk-control workstation for MetaTrader 5: every trade passes an AI
risk gate, a watchdog keeps everything running unattended, and every decision
is logged and explained.

START HERE (3 steps)
--------------------
1. Double-click  VigilDesk.exe
   - A welcome screen appears and your local dashboard opens in the browser.
2. First time only: run the one-line setup from the same folder
       VigilDesk.exe wizard
   - It finds your MetaTrader 5 installation and any local AI server you
     already run (Ollama / LM Studio / llama-server) - no 4 GB download needed.
3. Activate with the value from your purchase email
       VigilDesk.exe activate "eyJ...your activation token..."
   - Copy the WHOLE activation token line from the email (it starts with 'eyJ'
     and is long) and paste it between the quotes. This works with no internet
     connection: the token is signed and verified locally.
   - Or just copy it and run  VigilDesk.exe activate  with no arguments:
     the value is read from your clipboard. Run with --verbose to see each step.
   - If your email also shows a KEY (VD-XXXX-XXXX-XXXX-XXXX), that one activates
     ONLINE against a license server; it needs a reachable endpoint and is
     configured per install (config.json license.server_url, env
     VIGILDESK_LICENSE_SERVER, or  activate --server <url>). This build ships no
     endpoint, and says so instead of failing with a DNS error - the token above
     always works. Troubleshooting:
       * "online activation is not enabled on this build" -> use the token above
       * "cannot reach <server>"       -> network problem; use the token above
       * "that looks like a placeholder" -> paste the real value, not <TOKEN>
       * "all license slots in use"    -> unbind a device in your dashboard

Your 7-day free trial starts on first launch. Everything is unlocked during the
trial; when it ends, trading pauses until you activate (your positions and logs
stay untouched).

WHAT YOU GET
------------
  Dashboard        VigilDesk.exe            (or: vigildesk dashboard)
  Health snapshot  VigilDesk.exe status
  First-run setup  VigilDesk.exe wizard
  Activation       VigilDesk.exe activate   (or copy the token and run it bare)
  Run 24/7         VigilDesk.exe watchdog   (self-healing supervisor)
  FREE Watchdog Lite - keep MT5 alive, forever free, no card:
                   VigilDesk.exe lite                       (guards MetaTrader 5)
                   VigilDesk.exe lite -- <any command>      (guards anything else)
    Lite starts in the BACKGROUND and returns immediately with
    "Watchdog Lite started (PID: xxxx)". Stop it with:
                   VigilDesk.exe lite-stop
    (foreground mode for debugging: VigilDesk.exe lite --foreground)
    Lite restarts your terminal if it crashes, with a cooldown and backoff, and
    writes an event log. No license, no account, no telemetry.
  Self-check       VigilDesk.exe selftest   (headless verification: no UI,
                   no MT5 terminal, no orders — use it to confirm a healthy
                   install before connecting your broker)

FIRST RUN, IF YOU DO NOT HAVE AN AI YET
---------------------------------------
The full workstation uses a local AI to review each trade. Nothing is uploaded
and there is no monthly API bill. If setup says it needs an AI, pick one:
  1) Install Ollama (free) from ollama.com, then in a terminal run
         ollama pull qwen2.5:7b
     and re-run  VigilDesk.exe wizard
  2) Already running LM Studio or llama-server? Point us at it:
         VigilDesk.exe wizard --external http://127.0.0.1:1234/v1/chat/completions
  3) Have a .gguf model file? See "Bundled runtime" below and the wizard will
     use it instead of downloading anything.

WINDOWS WILL WARN YOU THE FIRST TIME
------------------------------------
VigilDesk is not code-signed yet, so Windows SmartScreen shows
"Windows protected your PC - Unknown publisher". That is expected for a small
independent tool; it does NOT mean the file is unsafe.
  * Click "More info" -> "Run anyway", or
  * Right-click the .zip -> Properties -> Unblock before extracting.
Verify you have the genuine build by comparing the SHA-256 shown on the download
page with:
     Get-FileHash .\VigilDesk 0.1.11-win64-portable.zip -Algorithm SHA256
If the hash matches, the file is exactly what we published.

WHERE YOUR DATA LIVES
---------------------
%LOCALAPPDATA%\VigilDesk   (config.json, logs, decisions, reports, license)
Set the VIGILDESK_HOME environment variable to move it - useful on a VPS: keep
that folder across re-installs and nothing is lost.

WHAT'S IN THIS FOLDER
---------------------
  VigilDesk.exe     the app (self-contained; Python is NOT required)
  _internal\        runtime files used by the app
  legal\            EULA and the no-advice disclaimer - please read DISCLAIMER.txt
  manifest.json     model/runtime manifest (SHA-256 verified downloads)
  INSTALL-VERIFY.md how to verify your installation end to end

IMPORTANT
---------
- VigilDesk is a software tool. It is NOT investment advice, NOT a signal
  service, and it does not promise profits. You are responsible for your own
  trading. See legal\DISCLAIMER.txt.
- The dry-run mode exists for installation checks only - never run it alongside
  real trading on the same account.
- Support: 760808632@qq.com  |  FAQ: https://xuks124.github.io/vigildesk/faq.html
