Files
arrr-erp/app/modules/accounting/gst_operator_agent_runtime

ARRR GST Operator Agent 1.6.0
================================

Primary deployment: self-installing Windows EXE.

The Windows setup EXE is built from gst_operator_agent.py using:

    powershell -ExecutionPolicy Bypass -File .\build_gst_operator_agent_exe.ps1

Generated file:

    dist\ARRR_GST_Operator_Agent_Setup_1.6.0.exe

Operator workstation installation
---------------------------------
1. Download ARRR_GST_Operator_Agent_Setup_1.6.0.exe from ARRR ERP.
2. Double-click the EXE.
3. The EXE copies itself to:

       %LOCALAPPDATA%\ARRR\GSTOperatorAgent\ARRR_GST_Operator_Agent.exe

4. It writes config.json for https://office.arrrassociates.com.
5. It registers the current-user Windows protocol:

       arrrgst://

6. It creates a normal Windows Installed Apps uninstall registration.
7. Return to GST Return Reconciliation and start the GST download.

No administrator rights are required.
Python is not required on operator workstations.
No localhost web server or trusted local certificate is used.

Runtime flow
------------
ARRR ERP issues a short-lived signed GST operator token.
Windows opens arrrgst://start?token=...
The installed EXE redeems the token over HTTPS.
GST Portal username/password are retrieved from ERP Credential Vault only after token redemption.
The visible Chrome/Edge GST browser is opened by the operator agent.
The operator completes CAPTCHA/OTP.
The agent downloads the selected GST return JSON/ZIP files and uploads the verified package back to ARRR ERP for client storage.

Source/repair fallback
----------------------
The ERP still exposes a source ZIP for development/repair. The legacy PowerShell source installer remains supported and preserves the previous behavior, but the EXE is the normal workstation installation method from version 1.6.0 onward.

Commands
--------
Self-test:
    ARRR_GST_Operator_Agent.exe --self-test

Repair/install explicitly:
    ARRR_GST_Operator_Agent.exe --install --erp-base-url https://office.arrrassociates.com

Uninstall:
    ARRR_GST_Operator_Agent.exe --uninstall