Skip to main content
The Windows agent is a WPF desktop application that runs in the system tray. It uses UI Automation to detect text fields across any Windows application, and shows a floating overlay with suggestions near the active field.

Requirements

WebView2 is a hard prerequisite. The Auth0 sign-in window is hosted in WebView2; without the runtime present, users can install the app but cannot log in. WebView2 ships with Windows 11 and current Windows 10 builds, but verify it on older images and add the Evergreen Bootstrapper to your deployment if it is missing.

How it runs

1

Startup

The app initialises its dependency-injection host, enforces a single instance using a named mutex, starts a named-pipe server for intra-process signalling, and shows the system tray icon.
2

Authentication

The user signs in through Auth0 in a WebView2 window. Tokens are written to Windows Credential Manager.
3

Monitoring

Once the user activates monitoring, UIAutomationManager polls for the focused text field at 100 ms intervals.
4

Detection

TextFieldDetector identifies editable elements and raises focus and selection-change events.
5

Suggestion

SuggestionService sends the selected text to the PromptShields API for analysis.
6

Overlay

OverlayWindowManager displays the result in a floating window near the active field.
7

Application

On accept, TextInjector writes the revised text back into the target element.
Because it works through UI Automation rather than a browser hook, the agent covers native applications the browser extension cannot reach.

Configuration

Configuration is environment-specific and selected at build time: Each settings file controls:
  • AppSettings.BaseUrl — the PromptShields API endpoint
  • Auth0 — domain, client ID, audience, and redirect URI
  • Analytics — enable or disable Google Analytics, PostHog, and Firebase
  • Logging — log level
The build system excludes the opposite environment’s settings file from the output, so a production package does not carry development configuration.
If your organisation prohibits third-party analytics on managed endpoints, request a production build with the analytics providers disabled. This is a settings-file change, not a code change.

Custom URI scheme

The installer registers a protocol handler used for deep links:
If you restrict protocol-handler registration by policy, allow-list prompt-shields:// or sign-in will fail to complete.

What it stores on the device

Roaming-profile environments should be aware that %LocalAppData% does not roam; a user moving between machines will see empty local history on each new device. Server-side history is unaffected.

Technology stack

For your application-inventory and change-approval records:

Troubleshooting

The WebView2 Runtime is missing or blocked. Install the Evergreen Runtime and retry. This is by far the most common Windows deployment failure.
The prompt-shields:// protocol handler was not registered, or is blocked by policy. Confirm the registration survived your packaging and deployment method.
That is intended. The app enforces a single instance with a named mutex; launching again signals the existing instance rather than starting a new one. If the app appears to be gone but will not relaunch, check for an orphaned process in Task Manager.
Some applications draw custom text controls that do not expose a proper UI Automation text pattern. Report the specific application and version so coverage can be assessed.